Ask Your Question
0

VideoCapture::get(CV_CAP_PROP_POS_MSEC) returns -1

asked 2014-03-26 12:29:35 -0600

us62 gravatar image

updated 2014-03-26 12:32:12 -0600

  1. I am trying to get the timestamp at which the frame was captured using VideoCapture::get(CV_CAP_PROP_POS_MSEC) but i get the value -1. Am i doing something wrong or is there another way of retrieving the timestamp at which a particular frame was captured from the camera?

  2. If i just take the millisecond count using GetTickCount() function from windows API just before capturing a frame, will it represent an accurate timestamp for the captured frame ?

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
1

answered 2014-03-26 12:40:05 -0600

xaffeine gravatar image

On question 2, if you want to use cv::getTickCount() to estimate a time stamp, you should call it immediately after a grab, not before, since grab() may wait for a frame to be available.

I'll leave question 1 to others, other than to say I wouldn't surprised if prop_pos_msec doesn't work for live streams.

edit flag offensive delete link more

Comments

-1 usually means that this feature is simply not supported. So you are right.

Moster gravatar imageMoster ( 2014-03-27 02:31:04 -0600 )edit

Question Tools

1 follower

Stats

Asked: 2014-03-26 12:29:35 -0600

Seen: 2,408 times

Last updated: Mar 26 '14