Converting GIF image to movie, the color in the video of images is changing....could see only in gray scale....
10 views (last 30 days)
Show older comments
faisal hussain
on 7 Oct 2018
Commented: Adam Danz
on 26 May 2020
if true
% code
end
fullFileName = 'C:\Users\Documents\MATLAB\3_3.gif';
v = VideoWriter('newfile.avi','Uncompressed AVI');
open(v)
[gifImage map] = imread(fullFileName,'Frames', 'all');
writeVideo(v,gifImage)
close(v)
0 Comments
Accepted Answer
Walter Roberson
on 7 Oct 2018
Loop using im2frame https://www.mathworks.com/help/matlab/ref/im2frame.html
writeVideo can accept a numeric array of rgb images, and it can accept a strut array of frames that can be pseudocolor, but it cannot accept a numeric array of pseudocolor images even if they have the same colormap.
There are also ways to batch convert a numeric array of pseudocolor to a numeric rgb array if the same colormap is used for all of them, but I do not know of any built in or file exchange contribution that does that.
1 Comment
Adam Danz
on 26 May 2020
I've written a function based on this method described by Walter. Walter is attributed within the documentation of the function.
Download gif2avi() from the file exchange.
More Answers (0)
See Also
Categories
Find more on Convert Image Type in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!