※ 引述《WasiTerry (小眼)》之銘言:
: 各位大大請教一下
: 這是網路的範例程式
: writerObj = VideoWriter('VH3');
: writerObj.FrameRate =30;
: writerObj.Quality=100;
: writeObj.CompressionRatio=40;
: open(writerObj);
: ss=3;
: for tt=1:361
: handles=waitbar(tt/(361));
: fname=sprintf('H%dX%dY.bmp',ss,tt);
: filename=['.\Holog\',fname];
: im=imread(filename);
: writeVideo(writerObj,im);
: end
: close(writerObj);
: delete(handles)
: 假設我的檔案是m001~m300
: 存放在C:\MATLAB\eye <<這資料夾
: 那我應該如何修改程式內路径和文件名
試試看
writerObj = VideoWriter('VH3');
writerObj.FrameRate =30;
writerObj.Quality=100;
writeObj.CompressionRatio=40;
open(writerObj);
for tt=1:300
handles=waitbar(tt/(300));
sprintf('m%03d.bmp',tt)
filename=['C:\MATLAB\eye\',fname];
im=imread(filename);
writeVideo(writerObj,im);
end
close(writerObj);
delete(handles)