You are on page 1of 6

Dilation Example

Dilation is one of the elementary operators of Mathematical Morphology, that is, it is a building block for a large class of operators. The key process in the dilation operator is the local comparison of a shape, called structural element, with the object to be transformed. When the structural element is positioned at a given point and it touches the object, then this point will appear in the result of the transformation, otherwise it will not. The images bellow show an original object and the result of its dilation by a 3x3 square structural element.

The image bellow shows the original object (yellow foreground), the transformed object (white foreground), and the structural element (red foreground) when positioned in a critical point.

The images bellow shows a more complex object and the result of its dilation by a digital disk as a structural element.

Erosion Example
The erosion is one of the elementary operators of Mathematical Morphology, that is, it is one of the building blocks of a large class of operators. The key mechanism under the erosion operator is the local comparison of a shape, called structural element, with the object that will be transformed. If, when positioned at a given point, the structural element is included in the object then this point will appear in the result of the transformation, otherwise not. The figures below show an object and the result of its erosion by a 3x3 cross.

The figure below shows the original image (foreground in black and white, and background in blue), the transformed image (foreground in white), and structural element positioned in a critical point.

The figure below shows a more complex object and the result of its erosion by a digital disk.

Morphological Gradient Operator


This morphological operator is a composition of three basic operators: a dilation, an erosion of the input image by the input structuring element and a subtraction of these two results. In the example bellow, the input image (figure 2) is dilated by the structuring element seen on figure 1, resulting the image shown on figure 3. The same input image is eroded by the same structuring element than before and the result is seen in the image shown on figure 4. The image on figure 5, the final result, is the morphological subtraction of the dilation and the erosion. One important application of the morphologic gradient in binary images is to find their bounderies.
0 1 0 1 1 1 0 1 0 fig 1. Structuring element used

fig. 2 - Input image

fig. 3 - The Dilation

fig. 4 - The Erosion

fig. 5 - The Subtraction

Opening Operator
This morphological operator can be expressed as a composition of an erosion followed by a dilation, both by the same input structural element. As erosions and dilations, the key mechanism under the opening operator is the local comparison of a shape, the structural element, with the object that will be transformed. If, when positioned at a given point, the structural element is included in the object than the whole structural element will appear in the result of the transformation, otherwise none of its points will appear. The following figures present a binary image and the result of its opening by a small Euclidian disk.

Closing Operator
This morphological operator can be expressed as composition of a dilation followed by an erosion. As in the opening operator, the key mechanism under the closing operator is the local comparison of a shape, the structural element, with the object that will be transformed. if, when positioned at a given point, the structural element is included in the complement of the image, then the whole structural element will appear in the complement of the transformed image, otherwise none of its points will appear in this image. The following figures present a binary image and the result of its closing bu a small euclidian disk.

The following figure presents a colored composition of the original image, its closing by a small Euclidian disk and the structural element positioned in some critical points.

Symmetrical Difference Operator


This morphological transformation is used to detect pixels that are different in two images. The operator is a composition of two basic operations: Union and Intersection. Here we show as an example the result of the transformation on two images step by step. The first two are the input images. The third is the union of those images and the forth is the intersection. The last image is the final result, a morphological subtraction of the union by the intersection.

You might also like