[討論] 連續存圖片錯誤
我想將30fps avi檔裡面每一個影格存起來成jpg圖片
但一開始人應該是閉嘴的,但圖片存進去卻是張嘴的,且前幾百張圖都是同一張圖
到了約30後圖片才不一樣,但同時錄的.avi檔有些會有些不會
找不到原因
跟我開avi檔用media player一開始播放圖一樣
但讀取條拉回一開始影片就正常了
I=zeros(480,640);
figure('visible','off');
for pp=6:9
for p00=1:2
mov=VideoReader(strcat('pp',num2str(pp),'_',num2str(p00),'.avi'));
numFrames = mov.NumberOfFrames;
nowPath='F:\Desktop\matlab_code';
outputPath =strcat('F:\Desktop\matlab_code\pp',num2str(pp),'_',num2str(p00)');
for b=1:1:numFrames
I = read(mov,b);
imshow(I);
cd(outputPath)
saveas(gcf,strcat(num2str(b),'.jpg'),'jpg');
cd(nowPath)
end
end
end
--
※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 140.113.202.193
※ 文章網址: https://www.ptt.cc/bbs/MATLAB/M.1438007392.A.BD8.html
推
07/30 00:53, , 1F
07/30 00:53, 1F
推
07/30 00:57, , 2F
07/30 00:57, 2F
→
07/30 04:12, , 3F
07/30 04:12, 3F