Clear Filters
Clear Filters

convert video to frames and then delete some frames???

3 views (last 30 days)
i have a video,i need to divide video into different frames..and then delete some of the frames below some threshold??please help me

Answers (2)

John Rogers
John Rogers on 10 Jul 2019
Here is an example:
% speedUpVideo
% Keeps one out of ten frames
videoIn = VideoReader('hangar_free_air.mp4');
videoOut = VideoWriter('hangar_free_airFAST.mp4','MPEG-4');
frameNum = 0;
while hasFrame(videoIn)
videoFrame = readFrame(videoIn);
frameNum = frameNum+1;
if frameNum == 10
frameNum = 0;

Walter Roberson
Walter Roberson on 3 Mar 2014
VideoReader() to read each frame, then process it, then VideoWriter() to save the frame if it is one that needs saving.

Community Treasure Hunt

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

Start Hunting!