Filter löschen
Filter löschen

i want to write a SImple code to delete frames of a video(simple video with static background) which are below a threshod level??

2 Ansichten (letzte 30 Tage)
please help me..i m getting error..
i have a simple video with static backround..first there is no motion ...after 5 sec there is a motion for 5 sec...again there is no motion..so i just want to keep the frames where there is motion using threshold...
i think..when there is no motion..it will have diff value than when there is motion
please help me to get started

Antworten (1)

Image Analyst
Image Analyst am 9 Jan. 2014
Just subtract the frames and retain only those where the sum of the difference image is more than some specified amount. See my attached demo below in blue text.
% Demo macro to extract frames and get frame means from an avi movie
% and save individual frames to separate image files.
% Then rebuilds a new movie by recalling the saved images from disk.
% Also computes the mean gray value of the color channels
% And detects the difference between a frame and the previous frame.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by