I am trying to process 16-bit single-channel uncompressed TIFF images with OpenCV 2.1, but when I call cvLoadImage, apparently they get converted to 8-bit:
IplImage* img = cvLoadImage("myImage.tif",
CV_LOAD_IMAGE_ANYDEPTH | CV_LOAD_IMAGE_ANYCOLOR);
std::cout << img->depth << std::endl;
prints
8
The images have been produced by a fluorescence scanner that generates only this kind of images, and I have confirmed with a commercial software package that they really are 16-bit.
How can I open these images and work with the original bit depth?
In OpenCV Loading a tif image (16 bits for example) in python should work by typing:
im = cv.LoadImageM("test.tif",cv.CV_LOAD_IMAGE_UNCHANGED)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With