MATLAB Answers

How can I generate a "movie" using a series of binary images?

4 views (last 30 days)
I have a 3-D matrix where each x-y plane defines a binary image.
variable(:,:,1) calls image one; variable(:,:,2) is image 2 etc.
How can I generate a movie in MATLAB using each image as a frame? Also, how can I specify the frame-rate of this movie? Thanks in advance!


Sign in to comment.

Accepted Answer

Image Analyst
Image Analyst on 2 Jun 2015
See my attached demo. The first half extracts frames from a movie and saves them to disk as individual images. The second half reconstructs the video by reading in those images and using VideoWriter it makes a video file. You can just do that, though you won't have to call imread() since your frames are already in memory.

More Answers (0)

Community Treasure Hunt

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

Start Hunting!