# Revision history [back]

### 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++ )
{
}


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

 2 retagged berak 32993 ●7 ●81 ●312

### 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++ )
{
}


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

 3 retagged sturkmen 6772 ●3 ●48 ●79 https://github.com/stu...

### 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++ )
{