Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Skipping frames in VideoCapture

I'm doing some motion detection on a video and while doing the processing, it sometimes is handy to simply skip a couple of frames in order to have a bigger impact on the e.g. optical flow detection. Currently I'm simply loading frames in a loop like that:

for( int i = 0; i < playbackSpeed; i++ )
{
    originalImage = videoReader.getNextImage();
}

Though I'd much rather just skip a couple of frames instead of just loading more, because doing this ends up in a little performance problem. Cheers for the help.

mrzl

click to hide/show revision 2
retagged

updated 2013-11-29 03:20:34 -0600

berak gravatar image

Skipping frames in VideoCapture

I'm doing some motion detection on a video and while doing the processing, it sometimes is handy to simply skip a couple of frames in order to have a bigger impact on the e.g. optical flow detection. Currently I'm simply loading frames in a loop like that:

for( int i = 0; i < playbackSpeed; i++ )
{
    originalImage = videoReader.getNextImage();
}

Though I'd much rather just skip a couple of frames instead of just loading more, because doing this ends up in a little performance problem. Cheers for the help.

mrzl

Skipping frames in VideoCapture

I'm doing some motion detection on a video and while doing the processing, it sometimes is handy to simply skip a couple of frames in order to have a bigger impact on the e.g. optical flow detection. Currently I'm simply loading frames in a loop like that:

for( int i = 0; i < playbackSpeed; i++ )
{
    originalImage = videoReader.getNextImage();
}

Though I'd much rather just skip a couple of frames instead of just loading more, because doing this ends up in a little performance problem. Cheers for the help.

mrzl