2016-08-05 13:08:30 -0600 | commented question | imread not working in opencv2.4.13 on centos6.5 Hey, I did a fresh build from scratch and got it working. However, imread() is not able to read a .jpg image although it reads .png image. I have libpng.so and libjpeg.so both installed in the same directory, which I add to the LD_LIBRARY_PATH. Also, the output of cmake is: JPEG: /usr/lib64/libjpeg.so (ver 1.2.1 ) PNG: /usr/lib64/libpng.so (ver 1.2.49) Could you pl. help me make imread() read a .jpg image? Which other library do I need to install, if any? Thanks. |
2016-08-04 12:31:28 -0600 | commented question | imread not working in opencv2.4.13 on centos6.5 Thanks for your suggestions. I tried what you suggested, but it did not work. Is there a possibility that there are issues with opencv2.4.13 with cpp interface? I was loading a jpg image. I also tried png, but it shows the same error. As an aside, could you please point me to some resource that talks about configuration during build, if possible? Also, it will be helpful if there is some easy workaround for this problem. |
2016-08-04 09:44:09 -0600 | asked a question | imread not working in opencv2.4.13 on centos6.5 Hello All I built opencv2.4.13 from source in RELEASE mode like so:
cmake -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/home/ssomesh/usr/local/opencv -D WITH_CUDA=ON .. This I followed with
When I run the sample code provided in the 'samples' folder by openCV, it is able to read and display images. However when I compile my program, the imread() function does not seem to work. Here's the code that is throwing error: #include "opencv2/core/core.hpp" #include "opencv2/highgui/highgui.hpp" using namespace cv; using namespace std; int main( int argc, char** argv ) { if( argc != 2) { printf(" Usage: display_image ImageToLoadAndDisplay\n"); return -1; } Mat image; image = imread(argv[1], CV_LOAD_IMAGE_UNCHANGED); // Read the file |