how to convert set of tiff files to AVI file

6 views (last 30 days)
I have a set of tiff files and I am trying to put that set of images into AVI file for processing but my code does not work for me. I have a problem massege ("IMG must be of one of the following classes: double, single, uint8") but I couldnt find a solution.
this is my code I am using
v = VideoWriter('testing.avi','Uncompressed AVI');
open(v);
for k=1:10 % assumes 10 images to write to file
str1 = '%d.tiff';
str1pass = sprintf(str1,k);
writeVideo(v,str1pass);
end
close(v);
thanks for the helpers

Accepted Answer

Walter Roberson
Walter Roberson on 27 Feb 2022
v = VideoWriter('testing.avi','Uncompressed AVI');
open(v);
for k=1:10 % assumes 10 images to write to file
str1 = '%d.tiff';
str1pass = imread(sprintf(str1,k));
writeVideo(v,str1pass);
end
close(v);

More Answers (0)

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!