How can I save an altered image in MATLAB?
问题 I want to read an image into MATLAB, draw a rectangle on it, and then save the image. Also, I\'m just learning MATLAB--please be gentle. It seems like it should be simple, but I can\'t seem to do it. im = imread(\'image.tif\'); imshow(im); rectangle(\'Position\', [100, 100, 10, 10]); imwrite(im, \'image2.tif\'); Even though I can see the rectangle on the image, the saved image does not display the rectangle. How can I save the image and have the rectangle show up? FWIW, I\'ve already tried