I am using the following code to read and extract entire frames of a video, but problem is the frames are stored in "multi" as shown in the attached image. It is not stored as 1.jpg, 2.jpg, 3.jpg….. .How to resolve this problem. or tell me how can we extract and store entire frames and how to use it in any for loop.
clc;clear all;close all;tic;vid=VideoReader('I:\testing\video1.avi'); numFrames = vid.NumberOfFrames; n=numFrames;for i = 1:1:n frames = read(vid,i); imwrite(frames,['I:\testing\abrupt\' int2str(i), '.jpg']);end multi = dir('I:\testing\abrupt\*.jpg*');for i = 1:1:length(multi)----------------------------end
Best Answer