Make a video from images in while loop
조회 수: 11(최근 30일)
Hello I had a video that I separated to "n" frames, I apply a segmentation on them and now I would like to make the video again from that frames. But I do not want to save it in file. Only make a variable in matlab.
How can I do that.
Thank you so much.
KALYAN ACHARJYA 2022년 10월 29일
#Ensure that all images having same size & format
writerObj=VideoWriter('Video_test.avi'); % Change the video file name
%Change the frame rate as per requirements
writerObj.FrameRate = 5;
open(writerObj); % Open Video writer
% write the frames to the video
vid_file= getframe(gcf); % Get the displayed image/figure
writeVideo(writerObj,vid_file); % write video
#Check the video file at Current Working Diretory (File Name: Video_test)