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?