c++ - alternative to VideoCapture::set in opencv -


i have been writing code in have take 2 frames per iteration absdiff(); cp>>frame1; cp>>frame2; absdiff(frame1,frame2,out) frame1 getting 0,2,4,6,8,10,.... frame2 getting 1,3,5,7,9,11,.... not getting combinations of frame1,frame2. let's call process-1

but,i needed frame1 0,1,2,3,4,5,6,..... , frame2 1,2,3,4,5,6,7,...... so,i used

 cp.set(cv_cap_props_pos_frames,cp.get(cv_cap_props_pos_frames)-1); 

to set next frame number of frame2 instead of frame2+1.now ,i getting desired output. getting combinations of frame1,frame2. let's call process-2 but, processing speed process-2 1/5 of process-1 so,i guessing setting videocapture property i.e next frame position responsible decreasing speed.am wrong?if not, there other way desired output.

you're not wrong. repositioning video way slow. you're better reading frames in sequence , handling pairing yourself.


Comments

Popular posts from this blog

resizing Telegram inline keyboard -

command line - How can a Python program background itself? -

php - "cURL error 28: Resolving timed out" on Wordpress on Azure App Service on Linux -