I'm new to the OpenCV / QT environment (and in programming in general). I'm trying to run this code:
https://github.com/Terranlee/Realtime_EVM
Can someone please tell me step by step what I need to install/compile in order to run this script on Windows 10? Not sure what versions to install or if it even matters.
I've tried following directions from here (https://wiki.qt.io/How_to_setup_Qt_and_openCV_on_Windows) but I keep getting 'undefined reference' errors which means I'm not referencing the libraries properly... or I need to edit the code somehow to point to my libraries but I'm not quite sure what to edit and how.
Thanks in advance and please excuse my noobieness!
-jay
Reply to answer
I compiled OpenCV using CMake per the wiki guide using the following commands:
mingw32-make -j 8
mingw32-make install
Once this was done, I opened Qt Creator and opened the Github EVM code by downloading the zip file then extracting it and opening the rvm.pro file.
Without making any changes, I tried to build the code and my first error was that it couldn't find "opencv_world310.dll" library.
I searched for it and found the file locally in the "E:\opencv\build\x64\vc14\bin" directory so I edited the rvm.pro file to look in that directory like so:
win32 {
OPENCVFOLDER = E:/_CODE_/_EXTERNAL_/OpenCV/my_git_build/
OPENCVVERSION = 310
INCLUDEPATH += E:\opencv\build\install\include
INCLUDEPATH += E:\opencv\build\x64\vc14\lib
CONFIG(release, debug|release) {
LIBS += -LE:\opencv\build\x64\vc14\lib
LIBS += -lopencv_world$${OPENCVVERSION}
}
CONFIG(debug, debug|release) {
DEFINES += DEBUG_MODE
LIBS += -LE:\opencv\build\x64\vc14\lib
LIBS += -lopencv_world$${OPENCVVERSION}d
}
This got rid of the initial error but then I get several 'undefined reference' issues afterward:
C:\Eulerian Real-Time OpenCV build\Realtime-Video-Magnification-master\build-rvm-Desktop_Qt_5_9_0_MinGW_32bit-Debug\debug\main.o:-1: In function `ZN2cv6StringD1Ev':
E:\opencv\build\include\opencv2\core\cvstd.hpp:664: error: undefined reference to `cv::String::deallocate()'
C:\Eulerian Real-Time OpenCV build\Realtime-Video-Magnification-master\build-rvm-Desktop_Qt_5_9_0_MinGW_32bit-Debug\debug\main.o:-1: In function `ZN2cv6StringaSERKS0_':
E:\opencv\build\include\opencv2\core\cvstd.hpp:672: error: undefined reference to `cv::String::deallocate()'
C:\Eulerian Real-Time OpenCV build\Realtime-Video-Magnification-master\src\main\threads\CaptureThread.h:42: error: undefined reference to `cv::VideoCapture::~VideoCapture()'
...... there are about 50 of these issues so I won't list them all.
Is it just a matter of correctly referencing the library?
In summary I'm just trying to run the Github code using Qt Creator, mingGW, CMake, & OpenCV. Please let me know how I need to edit the .pro file to link the library properly.
My OpenCV is in e:\opencv
Thanks again for the help and for your patience!
-Jay