I am using the iamge 'peppers.png' whose size is [384*512*3]. After selecting the ROI from the image using the following code, I have saved the image as 'I1'. But the size of the new image 'I1' is [745*1072*3]. How to save the new image with size [384*512*3]? Please help.
I= imread('peppers.png');ROI=roipoly(I); %select a close polygon
myImage=findall(gcf,'type','image');set(myImage,'AlphaData',ROI);saveas(gcf,'newImage.png');I1=imread('newImage.png');size(I1)
Best Answer