MATLAB: How to save an image displayed

image display

Dear friends, i would like to save an image displayed by imshow(I) command in tif format. for example, ifter displaying the image, i select an interactive ROI using "imfreehand(gca", them i wud like to save the image with that RIO borders. when whenever i try this, it is saving its borders also with the image. I dont want that border frame to be saved. may you plz help ? the image shud be saved in .tif format only…

Best Answer

The saved image must be rectangular, no matter what your freehand ROI looks like, but the outer layer of pixels shouldn't be white unless you're cropping the image and then setting them white. You are using imwrite() to save the cropped portion aren't you?