简体   繁体   中英

How to average all the frames of a video file in which objects are not moving in OpenCV?

I have different frames of a video file. Now, on observing each frames separately, I noticed there are many frames in which objects has not moved. I need to do averaging of all those frames and make a single frame using OpenCV.

I am totally new in OpenCV, so It will be great help if can able to get codes for frame averaging.

One simple technique...

Subtract previous frame from present frame... using this opencv function . Take only those frame which have difference negative or positive above a threshold...like in the frames where the object is almost static then on doing frame difference you will get low value...skip those frames....again when only the object is moving and the rest of the background is more or less static like a man moving in a park, there just you can store the position of the man and the background gets duplicated...

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM