movie from matlab plot saved in .png format

1 回表示 (過去 30 日間)
swamp
swamp 2015 年 12 月 4 日
回答済み: Image Analyst 2015 年 12 月 4 日
Hi guys,
I need to make a movie using my image matlab plot stored in .png... Is it possible?
Thank you!!! Have a nice day!

回答 (2 件)

Geoff Hayes
Geoff Hayes 2015 年 12 月 4 日
swamp - consider using the videowriter object to create your movie from a series of images (your png files). You can instantiate the object as
v = VideoWriter('newfile.avi');
You can set the frame rate (frames per second) using set and open the file for writing as
set(v,'FrameRate',1);
open(v);
Now, you can load each of your images (from file) and then write to the avi (or whatever) as
writeVideo(v,myPng);
Once you have written all images to your movie file, then just close the object with
close(v);

Image Analyst
Image Analyst 2015 年 12 月 4 日
I'm attaching two example for you so you can see how to make movies from figures or still frames/images.

Community Treasure Hunt

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

Start Hunting!

Translated by