PDA

View Full Version : Integrating OpenCV and QT



Grand_Magister
9th March 2016, 00:38
Hello. I am new to QT and I am interested in computer vision using OpenCV 3.1.0 with QT 5.5. I'm having trouble integrating both environments and the tutorials or forum posts I find are a couple years old and don't seem to work. Specifically i'm having problems with CMake (I have attached images of the issue I have and the settings I am using). I'm not sure if CMake is still required to integrate both frameworks, but this is the best information I have to go off of at the moment. Has anyone successfully completed this recently and is there an update guide to do this?
According to the tutorials I've found this is the last hurdle to get OpenCV working with QT.

117841178511786

Vikram.Saralaya
10th March 2016, 09:35
You can follow the steps in:
http://www.laganiere.name/opencvCookbook/chap1s1_2.shtml

These are the few points I noted when I installed openCV, it might help you:

In Step 7: If you get error saying cannot find CMAKE_MAKE _PROGRAM, either add path to mingw32-make.exe to the environment PATH variable or click "Advanced" and configure the path there.
Before configuring CMake3.2.3 WITH_IPP should be OFF. This is because mingw uses runTmChk which is a msvc library (Known bug).
Go to ..\openCV\sources -> OpenCVCompilerOptions.cmake -> comment out the line "add_extra_compiler_option(-Werror=non-virtualdtor).
Step 9: Add ..\openCV\build\install\x86\mingw\bin to PATH.


Good luck :)

Regards
Vikram