Qt - Opencv background subtraction issue
Hi there! I'm using Qt5.8 with Visual Studio 2017. The below piece of OpenCV code works well in VS, but when I run it using Qt Creator, it doesn't seem to work.
cv::Mat frame, output;
Ptr<BackgroundSubtractor> bgS = createBackgroundSubtractorMOG2();
cvtColor(frame, output, CV_BGR2GRAY);
The background subtractor doesn't seem to work (but no error is thrown) and output is showing blank (plain gray color) whereas this is working fine in VS. Anyone encountered this issue before?
Thanks in advance.
If you mean "run in creator" that you compile it via creator with same vs compiler or
is it other compiler in Creator ? ( like mingw)
In the project folder, there is a run environment settings.
You might need to add a path to the opencv dlls for it to find them.
Else it will work the same as Creator is just an editor.
i'm running using vs compiler (CDB, not mingw).
Then it must be the loading of the dlls.
Since Creator it self cannot change how code works.