opencv/modules
StefanBruens 8d78400052
Merge pull request #16494 from StefanBruens:jpeg2000_openjpeg_port
Jpeg2000 OpenJPEG port

* OpenJPEG based JPEG2000 decoder implementation

Currently, the following input color spaces and depth conversions are
supported:

- 8 bit -> 8 bit
- 16 bit -> 16 bit (IMREAD_UNCHANGED, IMREAD_ANYDEPTH)

- RGB(a) -> BGR
- RGBA -> BGRA (IMREAD_UNCHANGED)
- Y(a) -> Y(a) (IMREAD_ANYCOLOR, IMREAD_GRAY, IMREAD_UNCHANGED))
- YCC -> Y (IMREAD_GRAY)

* Check for OpenJPEG availability

This enables OpenJPEG based JPEG2000 imread support by default, which
can be disabled by -DWITH_OPENJPEG=OFF. In case OpenJPEG is enabled
and found, any checks for Jasper are skipped.

* Implement precision downscaling for precision > 8 without IMREAD_UNCHANGED

With IMREAD_UNCHANGED, values are kept from the input image, without it
components are downscaled to CV_8U range.

* Enable Jpeg2K tests when OpenJPEG is available

* Add support for some more color conversions

Support IMREAD_GRAY when input color space is RGB or unspecified.
Support YUV input color space for BGR output.

* fix: problems with unmanaged memory

* fix: CMake warning - HAVE_OPENJPEG is undefined

Removed trailing whitespaces

* fix: CMake find_package OpenJPEG add minimal version

* Basic JPEG2K encoder

Images with depth CV_8U and CV_16U are supported, with 1 to 4 channels.

* feature: Improved code for OpenJPEG2000 encoder/decoder

 - Removed code duplication
 - Added error handlers
 - Extracted functions

* feature: Update conversion openjpeg array from/to Mat

* feature: Extend ChannelsIterator to fulfill RandomAccessIterator named requirements

 - Removed channels split in copyFromMatImpl. With ChannelsIterator no allocations are performed.
 - Split whole loop into 2 parts in copyToMat -> where std::copy and std::transforms are called.

* fix: Applied review comments.

 - Changed `nullptr` in CV_LOG* functions to `NULL`
 - Added `falls through` comment in decoder color space `switch`
 - Added warning about unsupported parameters for the encoder

* feature: Added decode from in-memory buffers.

Co-authored-by: Vadim Levin <vadim.levin@xperience.ai>
2020-03-27 07:18:58 +00:00
..
calib3d Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2020-03-24 11:12:11 +00:00
core core(persistence): fix resource leaks - force closing files 2020-03-24 11:38:09 +00:00
dnn Merge pull request #16888 from YashasSamaga:cuda4dnn-redundant-act-fusion-check 2020-03-24 08:41:11 +00:00
features2d Fixs several problems found by static analysis 2020-03-16 19:15:26 +03:00
flann Fix spelling typos 2019-12-27 12:46:53 +00:00
gapi Merge pull request #16841 from TolyaTalamanov:at/warp-perspective 2020-03-25 11:23:32 +00:00
highgui Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2020-02-28 18:34:37 +00:00
imgcodecs Merge pull request #16494 from StefanBruens:jpeg2000_openjpeg_port 2020-03-27 07:18:58 +00:00
imgproc Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2020-03-23 16:54:35 +00:00
java Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2020-01-28 14:26:57 +03:00
js Fix spelling typos 2019-12-27 12:46:53 +00:00
ml Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2019-12-31 10:11:39 +00:00
objdetect Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2020-03-23 16:54:35 +00:00
photo Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2020-01-22 16:58:30 +03:00
python Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2020-03-20 21:41:15 +00:00
stitching stitching: don't use nonfree by default 2020-03-17 15:09:23 +03:00
ts Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2020-03-23 16:54:35 +00:00
video Fix spelling typos 2019-12-27 12:46:53 +00:00
videoio Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2020-03-23 16:54:35 +00:00
world Merge pull request #13422 from mshabunin:split-videoio-cmake 2018-12-26 15:50:20 +03:00
CMakeLists.txt