This is machine translation

Translated by Microsoft

Morphological Operations

Dilate, erode, reconstruct, and perform other morphological operations


bwhitmiss Binary hit-miss operation
bwmorph Morphological operations on binary images
bwulterode Ultimate erosion
bwareaopen Remove small objects from binary image
imbothat Bottom-hat filtering
imclearborder Suppress light structures connected to image border
imclose Morphologically close image
imdilate Dilate image
imerode Erode image
imextendedmax Extended-maxima transform
imextendedmin Extended-minima transform
imfill Fill image regions and holes
imhmax H-maxima transform
imhmin H-minima transform
imimposemin Impose minima
imopen Morphologically open image
imreconstruct Morphological reconstruction
imregionalmax Regional maxima
imregionalmin Regional minima
imtophat Top-hat filtering
watershed Watershed transform
conndef Create connectivity array
iptcheckconn Check validity of connectivity argument
applylut Neighborhood operations on binary images using lookup tables
bwlookup Nonlinear filtering using lookup tables
makelut Create lookup table for use with bwlookup


strel Morphological structuring element
offsetstrel Morphological offset structuring element

Examples and How To

Dilate an Image Using imdilate

This example shows how to dilate an image using the imdilate function.

Erode an Image Using imerode

This example shows how to erode a binary image using the imerode function.

Operations That Combine Dilation and Erosion

Dilation and erosion are often used in combination to implement image processing operations.

Dilation- and Erosion-Based Functions

This section describes two common image processing operations that are based on dilation and erosion:


Morphological Dilation and Erosion


Structuring Elements

An essential part of the morphological dilation and erosion operations is the structuring element used to probe the input image.

Understanding Morphological Reconstruction

Morphological reconstruction can be thought of conceptually as repeated dilations of an image, called the marker image, until the contour of the marker image fits under a second image, called the mask image.


To reduce all objects in an image to lines, without changing the essential structure of the image, use the bwmorph function.

Perimeter Determination

The bwperim function determines the perimeter pixels of the objects in a binary image.

Lookup Table Operations

Describes functions that perform lookup table operations

Was this topic helpful?