opencv/cmake/templates
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
..
cmake_uninstall.cmake.in Normalized file endings. 2013-08-21 18:59:25 +04:00
custom_hal.hpp.in cmake: refactor HAL attaching process 2016-06-15 17:34:30 +03:00
cv_cpu_config.h.in cmake: support multiple CPU targets 2017-02-13 19:52:59 +03:00
cvconfig.h.in Merge pull request #16494 from StefanBruens:jpeg2000_openjpeg_port 2020-03-27 07:18:58 +00:00
dllmain.cpp.in Support building shared libraries on WINCE. 2019-08-01 15:28:04 +02:00
opencv_abi.xml.in Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2019-11-29 18:57:33 +03:00
opencv_modules.hpp.in cmake: add OPENCV_ENABLE_NONFREE option and macro 2016-08-04 19:23:49 +03:00
opencv_run_all_tests_android.sh.in opencv_run_all_tests.sh implemented for Android SDK. 2014-02-12 14:21:58 +04:00
opencv_run_all_tests_unix.sh.in exclude dates from report names 2015-09-21 13:44:34 +02:00
opencv_run_all_tests_windows.cmd.in Add a script to run all tests on Windows 2015-03-10 16:24:23 +03:00
OpenCV-abi.mk.in Separate OpenCV.mk files for different ABIs 2015-06-17 18:10:28 +03:00
opencv-XXX.pc.in Updated pkg-config generation, added sample makefile 2015-05-22 16:09:07 +03:00
OpenCV.mk.in android: move .a files into 'staticlibs' directory 2018-02-15 16:31:49 +03:00
OpenCVConfig-ANDROID.cmake.in cmake: refactoring of OpenCVConfig 2016-06-20 15:15:21 +03:00
OpenCVConfig-CUDA.cmake.in Merge pull request #14660 from YashasSamaga:dnn-cuda-build 2019-06-02 14:47:15 +03:00
OpenCVConfig-IPPICV.cmake.in cmake: refactoring of OpenCVConfig 2016-06-20 15:15:21 +03:00
OpenCVConfig-IPPIW.cmake.in cmake: update handling of IPPICV/IPPIW 2017-04-26 00:15:54 +03:00
OpenCVConfig-version.cmake.in Properly check for version in find_package 2015-12-17 17:00:30 +03:00
OpenCVConfig.cmake.in cmake: enable C++11 implicitly 2020-02-03 17:45:37 +03:00
OpenCVConfig.root-ANDROID.cmake.in cmake: refactoring of OpenCVConfig 2016-06-20 15:15:21 +03:00
OpenCVConfig.root-WIN32.cmake.in cmake: fix OpenCV_ARCH 2019-12-14 15:02:43 +00:00
pylint.cmake.in cmake: change Pylint integration 2017-08-24 14:59:33 +03:00
setup_vars_linux.sh.in cmake: introduce setup_vars scripts 2018-11-01 17:38:40 +03:00
setup_vars_macosx.sh.in cmake: introduce setup_vars scripts 2018-11-01 17:38:40 +03:00
setup_vars_win32.cmd.in win32: update setupvars.cmd 2018-11-15 23:36:26 +00:00
vs_version.rc.in build: added VERSIONINFO resource 2017-06-20 15:45:21 +03:00