Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

imread doesn't open pbm/tiff images

Hi, I have a code that works with low dynamic range images (like png, jpeg and other normal extensions), but it can't read pbm/tiff files. What can I do?

cv::Mat img = cv::imread(argv[1], CV_LOAD_IMAGE_ANYDEPTH | CV_LOAD_IMAGE_ANYCOLOR);

if (img.rows*img.cols==0){
    printf("\nImage not acquired.");
    return 0;
}

..of course, if I load one of those kind of images, it returns 0. I've already asked on stackoverflow but nobody answerd me. I'm getting crazy.