VideoCapture class cannot initialize

asked 2013-10-08 07:57:21 -0500

Hello Masters, I'm very newbie in OpenCV. I'm trying to capture image from webcam. But, if I "declare" an VideoCapture object, my program crashes instantly. This is my code:

#include "opencv2/opencv.hpp"
#include <stdio.h>
using namespace cv;
int main()
    VideoCapture cap;

My system is with Windows XP SP2. Not a good machine too. Not found anything like this yet...

edit retag flag offensive close merge delete


what's the actual error ?

please check, if you linked the right libs, debug<-->release, 32bit<-->64bit, vs versions, etc.

berak gravatar imageberak ( 2013-10-08 08:14:49 -0500 )edit

Checked and didn't find anything. The error is a "Illegal Operation" with no further details. On my screen the message "trying" appears, but "done" not. I'll still looking for a solution, but nothing yet.

Auradrummer gravatar imageAuradrummer ( 2013-10-08 09:06:48 -0500 )edit

Looking in the "details" I found the exception 0xc0000005. This helps?

Auradrummer gravatar imageAuradrummer ( 2013-10-08 09:17:11 -0500 )edit