i want to write a SImple code to delete frames of a video(simple video with static background) which are below a threshod level??
1 次查看(过去 30 天)
显示 更早的评论
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
0 个评论
回答(1 个)
Image Analyst
2014-1-9
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.
0 个评论
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!