Reading series of images
Afficher commentaires plus anciens
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.
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Data Import and Analysis dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!