※ 引述《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)