opencv/modules/imgcodecs/test
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
..
test_exr.impl.hpp imgcodecs(test): add OpenEXR I/O test 2019-06-08 21:30:26 +00:00
test_grfmt.cpp Merge pull request #16494 from StefanBruens:jpeg2000_openjpeg_port 2020-03-27 07:18:58 +00:00
test_jpeg.cpp ts: refactor OpenCV tests 2018-02-03 19:39:47 +00:00
test_main.cpp Merge pull request #11897 from Jakub-Golinowski:hpx_backend 2018-08-31 16:23:26 +03:00
test_png.cpp Merge pull request #12971 from sturkmen72:upd_imgproc_hpp 2018-10-31 18:08:24 +03:00
test_precomp.hpp Merge pull request #16309 from ganesh-k13:bugfix/imdecode-resize 2020-01-20 14:00:45 +03:00
test_read_write.cpp Merge pull request #16494 from StefanBruens:jpeg2000_openjpeg_port 2020-03-27 07:18:58 +00:00
test_tiff.cpp imgcodecs(tiff): sanitize tiff decoder 2019-04-04 14:16:53 +03:00
test_webp.cpp imgcodecs(webp): multiple fixes 2018-08-30 20:42:33 +00:00