Morphological Functions

NI Vision Assistant

Morphological Functions

Use the following morphological functions to modify the shape of objects in an image.

Gray Morphology (Grayscale»Gray Morphology)

Dilate Increases the brightness of each pixel surrounded by neighbors with a higher intensity.
Erode Reduces the brightness of pixels that are surrounded by neighbors with a lower intensity.
Close Removes dark spots isolated in bright regions and smoothes boundaries.
Open Removes bright spots isolated in dark regions and smoothes boundaries.
Proper Close Removes dark pixels isolated in bright regions and smoothes the boundaries of dark regions.
Proper Open Removes bright pixels isolated in dark regions and smoothes the boundaries of bright regions.
Auto Median Generates simpler objects with fewer details.

Related Topics

Expanding (dilating) objects in grayscale images

Filling gaps and holes (close) in grayscale images

Gray Morphology (Grayscale»Gray Morphology)

Reducing (eroding) objects in grayscale images

Removing small objects (open) from grayscale images

Smoothing object boundaries in grayscale images

Basic Morphology (Binary»Basic Morphology)

Erode objects Eliminates pixels isolated in the background and erodes the contour of objects based on the structuring element. Erosion makes objects smaller.
Dilate objects Eliminates tiny holes isolated in objects and expands the contour of the objects based on the structuring element. Dilation makes objects larger.
Open objects Removes small objects and smoothes boundaries. An opening is an erosion followed by a dilation, which does not significantly alter the area or shape of objects. Borders removed by erosion are restored by dilation, but small objects that were absorbed during erosion do not reappear after dilation.
Close objects Fills tiny holes and smoothes boundaries. A closing is a dilation followed by erosion, which does not significantly alter the area or shape of objects. Objects are expanded by the dilation and then reduced by erosion, so borders are smoothed and holes are filled.
Proper Open Removes small particles and smoothes the contour of objects based on the structuring element. It is a finite and dual combination of openings and closings.
Proper Close Fills tiny holes and smoothes inner contours of objects based on the structuring element. It is a finite and dual combination of closings and openings.
Gradient In Extracts the interior contour of a particle.
Gradient Out Extracts the exterior contour of a particle.
Auto Median Simplifies objects based on the structuring element so that they have fewer details. The Auto Median function uses dual combinations of openings and closings.
Thick Alters the shape of objects by adding parts to the object that match the pattern specified in the structuring element. Use thickening for filling holes and smoothing right angles along edges of objects.
Thin Alters the shape of objects by eliminating parts of the object that match the pattern specified in the structuring element. Use thinning for removing single pixels isolated in the background and right angles along edges of objects.

Related Topics

Basic Morphology (Binary»Basic Morphology)

Expanding (dilating) objects in binary images

Extracting the contours of a particle

Filling gaps and holes (close) in binary images

Filling holes and smoothing right angles

Reducing (eroding) objects in binary images

Removing single pixels and right angles

Removing small objects (open) from binary images

Smoothing object boundaries in binary images

Adv. Morphology (Binary»Adv. Morphology)

Remove small objects Removes small objects.
Remove large objects Removes large objects.
Remove border objects Eliminates particles that touch the borders of an image.
Fill holes Fills the holes found in a particle. Holes are filled with a pixel value of 1.
Convex Returns the convex hull of objects. You can use the convex hull of an object to make measurements when the object is amorphous (irregular).
Skeleton Applies a succession of thinnings until the width of each object equals one pixel.
Separate objects Breaks narrow isthmuses and separates objects that touch.
Label objects Produces a labeled image using grayscale values equal to the number of objects in the image plus the grayscale 0 used in the background area.
Distance Assigns to each pixel a grayscale value equal to the shortest distance to the border of the object, which might be to a hole within the object.
Danielsson Creates a distance map similar to the Distance function. Danielsson uses a more accurate algorithm than Distance.
Segment image Partitions a labeled image into segments, each centered on an object, so that the segments do not overlap and leave empty zones.

Related Topics

Adv. Morphology (Binary»Adv. Morphology)

Computing the convex hull of objects

Creating a distance map

Filling holes

Labeling objects

Reducing objects to their skeletons

Removing large objects

Removing objects touching the border of an image

Removing small objects

Segmenting an image

Separating objects