SaveVideo = 1 ; % 设置是否写入视频
if SaveVideo
v = VideoWriter('test_5.8mm_DPHE_3.avi','Motion JPEG AVI');
v.FrameRate = 3 ;
open(v)
end
if SaveVideo
% writeVideo(v,Result );
Frame_tobewrt = getframe(figure(1));
writeVideo(v,Frame_tobewrt);
end
if SaveVideo
close(v)
end