JPEG 2000 compression for 16 bit images does not work for me
according to the OpenCV documentation, I should be able to save a 16 bit (unsigned) image to
a JPEG 2000 image, and then later read it again from the file.
I am using OpenCV 2.3.1 on a Windows 7 computer (PC) with the C++ interface.
And I need to save 16 bit images with a fairly compression (so loosy compression is accepted). This should be easy using JPEG 2000 according to documentation.
The following code snippet shows the problem (I start by loading a simple 8 bit JPG image as I asume not every body reading this have a 16 bit image available - also I am working on gray level images only):
Mat image8 = imread("c:\\tmp\\about.jpg", 0);
Mat newImage16 = imread("c:\\tmp\\test16.jp2", 0), imageNew8;