How can I select a mask of irregular shape in an image in Matlab without using the imfreehand but automatically? The background of the image is black and I would like to select the entire image as mask just without the black background (everything without the black background).
Share
try this:
given that the background is truly black, i.e. pixels values are 0, the set threshold to zero. Otherwise, select a value that captures the background (there are ways to do that automatically)