My current code is
vid = VideoReader('vid.mp4');numrames = vid.NumberofFrames;n = numFrames;for i = 1:1:n frames = read(vid,i); imwrite(frames,['mydirectory\'int2str(i),'.jpg']); im(i) = image(frames);end
I know that we can use natsortfiles to read a folder of images in numerical order, but how do you do it with a video file?
Thanks in advance
Best Answer