You are here: User's Guide > Gray Scale Morphological Filters > Gray Scale Morphological Filters

Gray Scale Morphological Filters

 

 

SPIP™ offers a group of gray scale morphology filters. These are mostly used in connection with Particle & Pore Analysis in order to improve detection. The morphological filters will modify the size of features such as particles or pores.

The two basic operations of the morphological filters are dilation and erosion.

Dilation will within a neighborhood of a given pixel replace all pixels with the highest (or brightest) pixel value inside that neighborhood. Erosion will do the opposite: replace all pixels in a neighborhood around a given pixel with the lowest (darkest) pixel value inside that neighborhood. Opening and closing are combinations of dilation and erosion, see below.

 

The morphological filters are activated from the Modify->Filter Panel of the Ribbon:

 

Filter size and shape (neighborhood)

The filter (or neighborhood) shape is a circular disc. This means that during the filtering process pixels are modified in a circular pattern around each pixel in the original image.

The size, i.e. the radius of the disc, of each morphological filter is configurable.

 

 

 

Principle and usage

Dilation will add bright pixels to the rim of particles (bright features). This can be used to enlarge bright features, to connect them, and to fill holes and gaps.

 

Erosion will remove bright pixels along the rim of particles. This is used for shrinking bright features, for separating them, and for enhancing holes and gaps.

 

Opening will first perform erosion and then dilation. In effect any holes and gaps will be enhanced filled, yet keeping the original sizes of the features.

 

Closing will first dilate and then erode the features. This means that holes and gaps will be filled; bright features close to each other will be joined, still keeping the original feature sizes.

 

Bright or dark features

For pores (dark features) dilation and opening will do what erosion and closing, respectively, do for particles (bright features).

 

Binary images

For two-level (binary) images the minimum and maximum pixel values are fixed. In this case the morphological filters will simply add or remove the pixels with the high (brighter) value. Note that any images can be transformed to two level images by using the Binarize function available in Histogram analysis.

 

Example of the use of morphological filters on a two level (binary) image:

 

Original

 

Dilated

 

Eroded

 

Opened

Closed

 

 

 

 

of