PDA

View Full Version : Read video with Qt and Opencv



amaiaman
29th October 2013, 16:33
Hello!

I need load a video files with opencv.
I used this programming in the main.cpp.

VideoCapture capture("video2_alcorcon.avi");
for(;;) {

capture >> src;
imshow("imagen", src);
waitKey(10);
}

In file.pro I include:


INCLUDEPATH += C:\\Users\\Amaia\\Desktop\\opencvmin\\install\\inc lude
LIBS += -LC:\\Users\\Amaia\\Desktop\\opencvmin\\install\\li b \
-lopencv_core240 \
-lopencv_highgui240 \
-lopencv_imgproc240 \
-lopencv_features2d240 \
-lopencv_calib3d240

And in header too:


#include <opencv/cv.h>
#include <opencv2/core/core.hpp>
#include <opencv2/highgui/highgui.hpp>
#include <opencv2/imgproc/imgproc.hpp>

using namespace cv; //opencv

But, I have got an error (file upload). I'm looking for a solution but I haven´t got.

Please help me. I need use opencv in my proyect.

amleto
29th October 2013, 17:49
why don't you ask on an opencv forum?

amaiaman
29th October 2013, 20:48
I don´t know where there are an opencv forum.
The error occurs when running the application. the programming in this well because opencv visual basic works.
Please, help me :)
Thank you in anticipation.

ChrisW67
29th October 2013, 22:39
The problem is you are in a Qt forum asking a question that has nothing but the most tenuous link to Qt.

If it compiles (it seems to) then the problem is at run time. The most likely issue is that the OpenCV libraries are not in the PATH and thus are not found.

Here is the OpenCV forum to start in: http://answers.opencv.org/questions/