write pictures into a video in matlab

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/seamanj/article/details/86947676
video = VideoWriter('V3.avi'); %create the video object
open(video); %open the file for writing
for i=1:193 %where N is the number of images
  name = ['V3_' num2str(i) '.png'];
  I = imread(name); %read the next image
  writeVideo(video,I); %write the image to file
end
close(video); %close the file

猜你喜欢

转载自blog.csdn.net/seamanj/article/details/86947676