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

Segment images

Image segmentation is the process of partitioning an image into parts or regions. This division into parts is often based on the characteristics of the pixels in the image. For example, one way to find regions in an image is to look for abrupt discontinuities in pixel values, which typically indicate edges. These edges can define regions. Other methods divide the image into regions based on color values or texture.

Apps

Color ThresholderThreshold a color image
Image SegmenterSegment an image by refining regions

Functions

activecontour Segment image into foreground and background using active contours (snakes)
imsegfmmBinary image segmentation using Fast Marching Method
imseggeodesic Segment image into two or three regions using geodesic distance-based color segmentation
gradientweightCalculate weights for image pixels based on image gradient
graydiffweightCalculate weights for image pixels based on grayscale intensity difference
grayconnected Select contiguous image region with similar gray values
graythreshGlobal image threshold using Otsu's method
multithresh Multilevel image thresholds using Otsu’s method
otsuthreshGlobal histogram threshold using Otsu's method
adaptthreshAdaptive image threshold using local first-order statistics
boundarymaskFind region boundaries of segmentation
superpixels2-D superpixel oversegmentation of images
lazysnappingSegment image into foreground and background using graph-based segmentation
grabcutSegment image into foreground and background using iterative graph-based segmentation
superpixels33-D superpixel oversegmentation of 3-D image
imoverlayBurn binary mask into 2-D image
labeloverlayOverlay label matrix regions on 2-D image
label2idxConvert label matrix to cell array of linear indices
jaccardJaccard similarity coefficient for image segmentation
diceSørensen-Dice similarity coefficient for image segmentation
bfscoreContour matching score for image segmentation

Topics

Segmentation Using the Image Segmenter

Image Segmentation Using the Image Segmenter App

This topic provides an overview of the Image Segmenter app and its capabilities.

Segmentation Using Graph Cut in Image Segmenter

Use graph cut to segment an image into foreground and background elements, using classification lines you draw over the image.

Segmentation Using Local Graph Cut (Grabcut) in Image Segmenter

Use local graph cut (grabcut) to segment an image into foreground and background elements, using classification lines you draw over the image.

Segmentation Using Find Circles in Image Segmenter

To segment circles from an image, use the Find Circles option in Image Segmenter app and specify a range of acceptable diameters.

Segmentation Using Auto Cluster in Image Segmenter

Use the Auto Cluster option in Image Segmenter app to segment an image into foreground and background elements.

Segmentation Using the Color Thresholder

Image Segmentation Using the Color Thresholder App

This example shows how to segment an image based on regions with similar color. You can display the image in different color spaces to differentiate objects in the image.

Acquire Live Images in the Color Thresholder App

You can perform color thresholding on an image acquired from a live USB webcam.

Image Segmentation Using Point Clouds in the Color Thresholder App

Use point cloud control to segment an image by selecting a range of colors belonging to the object to isolate.

Segmentation Using Gabor Filters, Superpixels, and Other Techniques

Texture Segmentation Using Gabor Filters

This example shows how to use texture segmentation to identify regions based on their texture.

Plot Land Classification with Color Features and Superpixels

This example shows how to perform land type classification based on color features using K-means clustering and superpixels.

Segment Lungs from 3-D Chest Scan and Calculate Lung Volume

This example shows how to perform a 3-D segmentation using active contours, and how to view the results using the Volume Viewer app.

Was this topic helpful?