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