Reading series of images
Mostra commenti meno recenti
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.
Risposta accettata
Più risposte (0)
Categorie
Scopri di più su Data Import and Analysis in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!