This is machine translation

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

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan 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.


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


activecontour Segment image into foreground and background using active contour
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
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


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 better 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 the Image Segmenter App

This example shows how to segment different tissue in a medical image using the Image Segmenter app.

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.

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.

Segment Image Using Graph Cut

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

Was this topic helpful?