storing an image
조회 수: 1 (최근 30일)
이전 댓글 표시
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
Chandra Kurniawan
2012년 1월 12일
you mean, you've managed to split video file into frames?
and now you want to save the image frames into a folder?
채택된 답변
Chandra Kurniawan
2012년 1월 12일
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
추가 답변 (0개)
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!