reading video from a frame grabber

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

reading video from a frame grabber

hulijo_struc
Hi all,
I have a problem reading video from a USB capture device (AVerMedia DVD EZMaker). I am using Win7 (64bit) and openCV 2.1. I tried to access the capture device just like any WebCAM but did not succeed. At first I thought that the device might not be supported by OpenCV, as I read that a lot of webCAMs are not. However, when I was debugging the code and looked at my "frame" variable (at one break point) it was emty only for the first few frames, after that the frames started appearing and the video was stremed normally. My question is, how is this possible? Why are the frames shown only if I insert a break point and not during run time? A would be thankful for any help.

Here is the relevant snippet of my code (it's pretty basic):


...

VideoCapture myCapture(0);
if(!myCapture.isOpened())
        return -1;


namedWindow("tmp",1);
Mat frame;
while(1)
{
     myCapture >> frame; //the code works after a few iterations if I                
                          //insert break point here or somewhere else
     imshow("tmp", frame);
     if(waitKey(5) >= 0) break;
}
...

Thanks for the help!

Regards,

Hulijo

Reply | Threaded
Open this post in threaded view
|

Re: reading video from a frame grabber

Richard Macwan
This post has NOT been accepted by the mailing list yet.
Hi,
Were you ever able to use opencv with AverMedia DVD EZMaker?