How to Extract photos at Each frame from a Video in MATLAB?
Show older comments
I am working on a project where I need to create a dataset by extracting photos from a video. Specifically, I need to capture a photo at each frame of the video, after extracting I need to store all these in a folder Does MATLAB have any toolboxes which helps me doing that??I would appreciate any guidance on how to achieve this.
1 Comment
Pavan Sahith
on 2 Aug 2024
Hi ,
you can use Videoreader and readFrame
Accepted Answer
More Answers (1)
KSSV
on 2 Aug 2024
vidObj = VideoReader('C:\Users\Public\Videos\Sample Videos\Wildlife.wmv');
numFrames = 0;
while hasFrame(vidObj)
F = readFrame(vidObj);
numFrames = numFrames + 1;
imagesc(F)
drawnow
end
numFrames
1 Comment
Nooruddin Shaik
on 2 Aug 2024
Categories
Find more on Audio and Video Data in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!