-1

Is it possibile in Matlab, to create a specific mask (which is not a rectangular/square) for the imcrop command? I need to exclude boundaries from an image, but they are irregular, so I need to make like a crop mask.

Thanks

Giovanna
  • 41
  • 6
  • You may want [`imfreehand`](https://www.mathworks.com/help/images/ref/imfreehand.html) – Adiel Mar 27 '17 at 13:30
  • what are you expecting to get from this cropping? a rectangular image or a vector of pixel values? see [`poly2mask`](https://www.mathworks.com/help/images/ref/poly2mask.html) – user2999345 Mar 27 '17 at 13:44

1 Answers1

0

Try displaying the image using imshow, then just use the command

roipoly 

and you should be able to define irregular boundaries.

See Selecting a ROI manually in Matlab

Community
  • 1
  • 1
roadRunner
  • 100
  • 1
  • 9
  • imcrop seems that it doesn't permit to define irregular boundaries, but just regula shape like rectangular. I'd like to define an irregular shape, like T or L. – Giovanna Mar 28 '17 at 13:46