I’ve been working on a simple Qt C++ OpenCV app and I want to integrate a Kalman filter.
I include:
opencv/cv.h;opencv/highgui.h and opencv/cxcore.h;
in my .pro file I have:
INCLUDEPATH += -I/usr/include/opencv LIBS += -lopencv_core \
-lopencv_highgui \
-lopencv_imgproc
However, when I do this CvKalman* kalman = cvCreateKalman(8,4,0); I just get undefined reference to cvCreateKalman and collect2: ld returned 1 exit status. Compile output doesn’t provide additional info.
I tried finding help online but Google wasn’t really helpful. I also tried to include additional OpenCV libs like ml or object tracking but nothing happened.
It seems a bit weird to me that CvKalman and cvCreateKalman are available in the autocomplete since right after loading the original libs…
Any help would be greatly appreciated!
Thanks.
In
INCLUDEPATH, Specify your library like this,And add the modules to LIBS vaiable like this,
This should work.