Make a movie from series of Fig file

조회 수: 17 (최근 30일)
Trang Hu Jia
Trang Hu Jia 2020년 10월 15일
답변: Image Analyst 2020년 10월 15일
Hello everyone
I have a series of .fig file as shown like this.
How I can create the video by MATLAB.
Thanks in advance

답변 (2개)

Sudhakar Shinde
Sudhakar Shinde 2020년 10월 15일
편집: Sudhakar Shinde 2020년 10월 15일
video = VideoWriter('Movie.avi');
open(video);
folder = 'D\Folder';
str = int2str(i);
for i=1:N
Image = strcat(folder,'\',int2str(i),'.fig');
I = imread(Image);
writeVideo(video,I);
end
close(video);
  댓글 수: 10
Trang Hu Jia
Trang Hu Jia 2020년 10월 15일
But my .fig file are larger than 5 mbs.
Is there any possible way to attach the files ?
Sudhakar Shinde
Sudhakar Shinde 2020년 10월 15일
편집: Sudhakar Shinde 2020년 10월 15일
fig file is not supported for imread. So it could not works. Check supported formats for imread by using command - 'imformats'.
One thought if there will not be any data loss , you can convert .fig to supported format and use above solution. But look for any kind of data loss during conversion.

댓글을 달려면 로그인하십시오.


Image Analyst
Image Analyst 2020년 10월 15일
It's best not to save your screenshots out as .fig files. You should save them as PNG instead. Or just create the video directly from the axes on the figure as you change it. See attached demos.

카테고리

Help CenterFile Exchange에서 Convert Image Type에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by