OpenCV 3.0- Exception when trying to open monochrome tiff
Hello Team,
I am getting an exception while trying to load a monochrome tiff having CCITT Group 4 Fax Encoding compression.
The environment I am using is as follows: Visual Studio 2013 (VS 12) 32 Bit Windows 7 64 Bit Open CV 3.0 I am facing the issue in both compiled OpenCV from source code and direct binaries provided.
C:\fakepath\Koala.tiff C:\fakepath\Tiff_Load_Exception.tiff
Code is as below:
int main(int argc, char* argv) { //const char filename = argc >= 2 ? argv[1] : "pic1.jpg"; const char* filename = "Koala.tiff"; //Mat src; Mat src = imread(filename, 0);
if (src.empty())
{
help();
cout << "can not open " << filename << endl;
return -1;
}
return 0;
}
Please review and suggest.
Thanks a lot.
Please provide code and image, and also exception
Use full paths when loading the image, and also the image is Koala.tiff and not Koala.tif
I have used full paths and the exception is coming from a libTiff method which confirms that the file was loaded and there is a check already for file loading failure in code.
Thanks
P.S. - I had to change extension to tiff from tif as the site does not accept tif extension to be uploaded.