Ask Your Question
0

CvGetCaptureProperty returning -1 all the time

asked Jun 3 '13

sachin_rt gravatar image

updated Jun 3 '13

When I am trying to get the frame number and Milli sec time using CvGetCaptureProperty() I am getting -1 all the time ?? I have searched a lot on the net but haven't found any solutions . Please help if anybdy has got it solved Brief Code looks like this :

CvCapture* capture = cvCaptureFromCAM(0);

while(1) { IplImage* frame = cvQueryFrame(capture);

cout << (int) cvGetCaptureProperty(capture,CV_CAP_PROP_POS_MSEC);

cvShowImage("Video_Input",frame);

if ( (cvWaitKey(10) & 255) == 27 ) break;

}

Preview: (hide)

1 answer

Sort by » oldest newest most voted
2

answered Jun 3 '13

czerhtan gravatar image

It might be the normal behavior that a camera feed does not provide timestamps for each frame; seeing how you're the one querying the frames at your own rate/will, you are probably supposed to generate those on your own.

Preview: (hide)

Question Tools

Stats

Asked: Jun 3 '13

Seen: 803 times

Last updated: Jun 03 '13