Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

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

Precompiled headers: YES

OpenCV modules: To be built: core flann imgproc highgui features2d calib3d ml video legacy objdetect photo gpu ocl nonfree contrib java python stitching superres ts videostab Disabled: world Disabled by dependency: - Unavailable: androidcamera dynamicuda viz

GUI: QT 5.x: YES (ver 5.1.1) QT OpenGL support: NO OpenGL support: NO VTK support: NO

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

Precompiled headers: YESMedia 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)

OpenCV modules: To be built: core flann imgproc highgui features2d calib3d ml video legacy objdetect photo gpu ocl nonfree contrib java python stitching superres ts videostab Disabled: world Disabled by dependency: - Unavailable: androidcamera dynamicuda viz

GUI: QT 5.x: YES (ver 5.1.1) QT OpenGL support: NO OpenGL support: NO VTK support: NO

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

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.jpglena.jpg program works well for lena.png, lena.tif, lena.bmp

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 lena.jpg. Program works well for lena.png, lena.tif, lena.bmp