Altering the local structure in a predictable way is exactly what “Morphological” filters can do!!
Morphological filter is introduced to solve the removing an essential detail in the image. Morphological filters are applicable not only to binary images but also to grayscale and even color images.
Shrink and Let Grow
Shrinking means to remove a layer of pixels from a foreground region around all its borders against the background (a) to (c).

Growing means to adds a layer of pixels around the border of a foreground region (a) to (c).

Shrinking removes the smaller structures step by step, and only the larger structures remain. The remaining structures are then grown back by the same amount. Eventually the larger regions should have returned to approximately their original shapes, while the smaller region shave disappeared from the image.

Basic Morphological Operations
Structuring element is the properties of a morphological filter. In binary morphology, the structuring element contains only the values 0 and 1.
The hot spot marks the origin of the coordinate system of H. It is not necessarily located at the center of the structuring element, nor must its value be 1.
Binary structuring element example. 1–elements are marked with •, 0–cells are empty.

A binary image I or a structuring element H can each be described as a set of coordinate pairs, QI and QH, respectively. The dark shaded element in H marks the coordinate origin (hot spot).

Dilation
A dilation is the morphological operation that corresponds to concept of “growing”.
Dilation example.

Erosion
An erosion is the morphological operation that corresponds to concept of “shrinking”.
Erosion example.

Implementing erosion via dilation.

Composite Operations
Opening
A binary opening I◦H denotes an erosion followed by a dilation with the same structuring element H.
Closing
A binary closing I•H denotes an dilation followed by a erosion with the same structuring element H.
Binary opening and closing with disk-shaped structuring elements. The radius r of the structuring element H is 1.0 (top), 2.5 (center), or 5.0 (bottom).
Grayscale Morphology
The result of grayscale dilation I⊕H is defined as the maximum of the values in H added to the values of the current subimage of I, Similarly, the result of grayscale erosion is the minimum of the differences.
Grayscale dilation

Grayscale erosion

Outlining
A typical application of morphological operations is to extract the boundary pixels of the foreground structures.

Reference
Principles of digital image processing, Fundamental techniques, Wilhelm Burger Mark J. Burg

Leave a comment