Ask Your Question

stansy's profile - activity

2014-07-03 08:24:34 -0600 received badge  Teacher (source)
2014-07-03 04:25:46 -0600 received badge  Self-Learner (source)
2014-07-03 04:15:08 -0600 answered a question OpenCV 2.4.9 on linux can not read jpeg image

The problem has been resolved. I use libjpeg 8.0 instead of 6.2

2014-06-30 11:19:32 -0600 commented question OpenCV 2.4.9 on linux can not read jpeg image

haha no solution. I already did. Thanks unxnut

2014-06-30 11:02:04 -0600 commented question OpenCV 2.4.9 on linux can not read jpeg image

The program returns no error.

2014-06-29 20:01:43 -0600 received badge  Editor (source)
2014-06-29 19:59:07 -0600 asked a question OpenCV 2.4.9 on linux can not read jpeg image

Please help me how to read a jpeg image. I have no problem reading the images in tif format. I used the example OpenCV-2.4.9/sources/samples/cpp/image.cpp for testing.

Thanks Stan

Media I/O: ZLib: build (ver 1.2.7) JPEG: libjpeg (ver 62) PNG: build (ver 1.5.12) TIFF: build (ver 42 - 4.0.2) JPEG 2000: build (ver 1.900.1) OpenEXR: build (ver 1.7.1)

try {
            Mat img = imread(fname); 
            if(img.empty())
            {
                fprintf(stderr, "Can not load image %s\n", fname);
                return -1;
            }
    }
    catch(cv::Exception& e )
    {
        fprintf(stderr, "Error: %s\n", e.what());
        return -2;
    }

message: Can not load image: lena.jpg. Program works well for lena.png, lena.tif, lena.bmp