Make a movie from series of Fig file
16 次查看(过去 30 天)
显示 更早的评论
Hello everyone
I have a series of .fig file as shown like this.
How I can create the video by MATLAB.
Thanks in advance
0 个评论
回答(2 个)
Sudhakar Shinde
2020-10-15
编辑:Sudhakar Shinde
2020-10-15
Try VideoWriter
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 个评论
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
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.
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Convert Image Type 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!