Integration of Qt with opencv-3.3.0 on ubuntu 14
Hello Everyone,
I am new to linux and Qt. I am facing problem in integrating Qt with opencv-3.3.0 on ubuntu 14.
I followed the procedure provided in the link below. http://rodrigoberriel.com/2014/11/usi...
once the integration was done. I tested it by writing a imread , imshow program on opencv. There was error of segmentation fault.
cv::Mat inputImage = cv::imread(“{PATH_TO_IMAGE}”); if(!inputImage.empty()) cv::imshow("Display Image", inputImage);
Can anyone help me in figuring out whether the problem is with the integration of Qt with opencv 3.3 or is there a problem with the code.
Try first to run the samples in OpenCV before, for instance run this sample. Follow the tutorials.
Hi Eduardo, Thanks for the reply. I ran the sample code provided by you . It works well. There is no problem with opencv3.3.0 installation on linux 14.04. The problem arises when i integrate opencv 3.3.0 with Qt on linux 14.04 . To integrate i follow the link provided by http://rodrigoberriel.com/2014/11/usi... . I use his example to test the integration. The program is able to read the image perfectly. I tested it by printing out the dimension and the length and width of the image. But , when i try to display the image it crashes. I get the following error
/Desktop/programming/Qt/build-qt_Input_output_debug-Desktop_Qt_5_9_0_GCC_64bit-Debug/qt_Input_output_debug... The program has unexpectedly finished. /Desktop/programming/Qt/build-qt_Input_output_debug-Desktop_Qt_5_9_0_GCC_64bit-Debug/qt_Input_output_debug crashed.
From the path, your program seems to be built in Debug mode, is OpenCV also built in Debug?
I just followed the installation proceduer from link text. These are the CMAKE options given in the link
cmake -D CMAKE_BUILD_TYPE=RELEASE \ -D CMAKE_INSTALL_PREFIX=/usr/local \ -D INSTALL_C_EXAMPLES=ON \ -D INSTALL_PYTHON_EXAMPLES=ON \ -D WITH_TBB=ON \ -D WITH_V4L=ON \ -D WITH_QT=ON \ -D WITH_OPENGL=ON \ -D OPENCV_EXTRA_MODULES_PATH=../../opencv_contrib/modules \ -D BUILD_EXAMPLES=ON ..
But, when opening a new qt project i have chosen both the Release and debug options.