how to convert set of tiff files to AVI file

6 visualizaciones (últimos 30 días)
shuki firuz
shuki firuz el 27 de Feb. de 2022
Comentada: shuki firuz el 27 de Feb. de 2022
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

Respuesta aceptada

Walter Roberson
Walter Roberson el 27 de Feb. de 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);

Más respuestas (0)

Categorías

Más información sobre Convert Image Type en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by