Reading series of images
Mostrar comentarios más antiguos
Hi I have the next code:
function Image(ImaIn,ImaFin,coordinates)
for i=ImaIn:ImaFin
I=imread(['DSCN0594 ',num2str(i),'.jpg']);
I2=imcrop(I,coordinates);
imwrite(I2,[num2str(i),'.png'])
end;
This is for reading and cropping the images with the giving coordinates, it functions well. But the problem is that I need to do it for many series. So, the serie DSCN0594 it is not the only I will read and crop and maybe not all the images will be '.jpg' maybe they will be '.png' . I need that this code more flexible. Thank you for your time.
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre Data Import and Analysis en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!