I use the following code to crop an image according to a rectangular selection generated with imrect():
figure();
imshow(img);
h = imrect();
crop_area = wait(h);
cropped = imcrop(img, crop_area);
But naturally, the region of interest might not be rectangular, or might be tilted, etc.
Therefore my question: is there a way to use impoly() with imcrop()?
seems like
roipoly()is the way to go.