Documentation

This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English version of the page.

Note: This page has been translated by MathWorks. Click here to see
To view all translated materials including this page, select Country from the country navigator on the bottom of this page.

Image Segmentation Using the Image Segmenter App

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.

Segmentation Tools Available in the Image Segmenter App

The Image Segmenter app provides many segmentation tools, available in the app toolstrip.

Segmentation Tools

ToolDescription
Threshold

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.

Graph Cut

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.

Auto Cluster

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.

Find Circles

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.

Flood Fill

An automatic technique where you specify starting points and the method segments areas with similar intensity values.

Draw ROI

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.

Including Texture Features in a Segmentation

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.

Tools to Refine the Segmentation in the Image Segmenter

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

ToolDescription
Morphology

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.

Clear borders

A fast way to remove small regions on the edge of the image.

Fill holes

A fast way to fill small holes in foreground regions. For an example, view Use Morphology to Refine Mask in Image Segmenter.

Invert mask

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

See Also

Related Topics

Was this topic helpful?