Is it possible to export an imageset as a movie?

조회 수: 2 (최근 30일)
Pranaya Kansakar
Pranaya Kansakar 2020년 6월 15일
댓글: Ameer Hamza 2020년 6월 15일
HI!
I have a series of images imported as an imageset into the workspace. Would it be possible to convert this imageset into a video format that I can then export?
Thanks!!

채택된 답변

Ameer Hamza
Ameer Hamza 2020년 6월 15일
See VideoWriter(): https://www.mathworks.com/help/releases/R2020a/matlab/ref/videowriter.html. Something like this will work
imgSet = % create the imageset object
v = VideoWriter('vidFileName.mpr', 'MPEG-4');
open(v)
for i=1:imgSet.Count
frame = read(imgSet,i);
writeVideo(v, frame);
end
close(v)
This assumes that all images have same resolution.
  댓글 수: 2
Pranaya Kansakar
Pranaya Kansakar 2020년 6월 15일
Thanks for your answer!
It works for appending images from the imageset to a tiff as well!
Ameer Hamza
Ameer Hamza 2020년 6월 15일
I am glad to be of help!

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

추가 답변 (0개)

제품


릴리스

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by