The Image Segmenter app provides access to many different ways to segment an image. Using the Image Segmenter can be an iterative process where you might try several of the segmentation options. Some segmentation techniques might work better with certain types of images than others. After segmenting an image, you can save the binary mask. You can also retrieve the code the Image Segmenter used to create the mask.The following is an overview of the Image Segmenter app. For information about opening the app, see Open Image Segmenter App and Load Image.
The Image Segmenter app provides many segmentation tools, available in the app toolstrip.
An automatic technique where you specify an intensity value that you want to isolate. This technique can be useful if the objects you want to segment in the image have similar pixel intensity values and these values are easily distinguished from other areas of the image, such as the background. For more information, see Segment Using Threshold Technique in Image Segmenter.
A semi-automatic technique that can segment foreground and background. This technique does not require careful placement of seed points and you can refine the segmentation interactively. For more information, see Segmentation Using Graph Cut in Image Segmenter.
An automatic technique where the app groups image features into a binary segmentation. This option is only available if you have the Statistics and Machine Learning Toolbox. For more information, see Segmentation Using Auto Cluster in Image Segmenter.
An automatic technique where you specify the minimum and maximum diameter of the circular objects you want to detect. For more information, see Segmentation Using Find Circles in Image Segmenter
|Local Graph Cut (grabcut)|
A semi-automatic technique, similar to the Graph Cut method, that can segment foreground and background. With Local Graph Cut (grabcut), you first define an ROI that encompasses the object in the image that you want to segment. The Image Segmenter automatically segments the object in the ROI. You can refine the segmentation by drawing lines on the image to identify the foreground and the background within the ROI. Everything outside the ROI is considered background. For more information, see Segmentation Using Local Graph Cut (Grabcut) in Image Segmenter.
An automatic technique where you specify starting points and the method segments areas with similar intensity values.
A manual technique where you draw shapes that outline the region the objects you want to segment. Using the mouse, you can draw rectangles, ellipses, polygons, or freehand shapes. For more information, see Segment By Drawing Regions in Image Segmenter.
When using the Auto Cluster, Graph Cut, and Flood Fill segmentation tools, you can also include texture as an additional consideration in your segmentation. Click Include Texture Features to turn the texture option on and off. When enabled, the Image Segmenter uses Gabor filters to analyze the texture of the image as a preprocessing step in the segmentation. Texture filtering can help distinguish foreground from background. For an example of using Gabor filters in an image segmentation, see Texture Segmentation Using Gabor Filters.
In addition to these segmentation techniques, the Image Segmenter app provides access to several tools that you can use to refine the mask you created.
Tools to Refine the Binary Mask
Many morphological techniques, such as dilation and erosion. For an example, view Use Morphology to Refine Mask in Image Segmenter.
|Active contours (also known as snakes)|
An iterative method that grows (or shrinks) regions in an image. You identify the regions with seed points. For an example, view Use Active Contours to Refine Segmentation in Image Segmenter.
A fast way to remove small regions on the edge of the image.
A fast way to fill small holes in foreground regions. For an example, view Use Morphology to Refine Mask in Image Segmenter.
Sometimes the segmentation is easier to evaluate if you invert the foreground and background. For an example, view Segmentation Using Auto Cluster in Image Segmenter