Is it possible to export an imageset as a movie?
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
Pranaya Kansakar
am 15 Jun. 2020
Kommentiert: Ameer Hamza
am 15 Jun. 2020
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!!
0 Kommentare
Akzeptierte Antwort
Ameer Hamza
am 15 Jun. 2020
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 Kommentare
Weitere Antworten (0)
Siehe auch
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!