OpenCV 3.0- Exception when trying to open monochrome tiff

asked 2015-06-24 05:53:08 -0500

AyBee gravatar image

updated 2015-06-24 07:13:08 -0500

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.

edit retag flag offensive close merge delete

Comments

Please provide code and image, and also exception

LorenaGdL gravatar imageLorenaGdL ( 2015-06-24 06:14:31 -0500 )edit

Use full paths when loading the image, and also the image is Koala.tiff and not Koala.tif

LorenaGdL gravatar imageLorenaGdL ( 2015-06-24 06:47:41 -0500 )edit

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.

AyBee gravatar imageAyBee ( 2015-06-24 07:15:42 -0500 )edit