Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

CvGetCaptureProperty returning -1 all the time

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

CvGetCaptureProperty returning -1 all the time

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;

}