how to convert set of tiff files to AVI file

38 次查看(过去 30 天)
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

采纳的回答

Walter Roberson
Walter Roberson 2022-2-27
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);

更多回答(0 个)

Community Treasure Hunt

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

Start Hunting!

Translated by