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.
Best Answer