storing an image
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
I have taken a video converted in number of frames and created a folder named NEW ,
nframes is 40
for k = 1:nFrames
................. .................
end
please tell how to write imaged into NEW folder in that for loop
1 Kommentar
Chandra Kurniawan
am 12 Jan. 2012
you mean, you've managed to split video file into frames?
and now you want to save the image frames into a folder?
Akzeptierte Antwort
Chandra Kurniawan
am 12 Jan. 2012
obj = mmreader('yourvideofile.avi');
vid = read(obj);
nFrame = 5;
for k = 1 : nFrame
newname = strcat('frame0',num2str(k),'.jpg');
imwrite(vid(:,:,:,k), newname);
end
2 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Image Preview and Device Configuration finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!