Sunday, August 2, 2009

Activity 8 : Morphological Operations

Introduction
For this activity we observed the effect of different morphological operations like dilation, erosion, and other function in Scilab such as thin and skel. We also observed the effect of different structuring element (SE) on the output image.

Dilation
Dilation basically enlarges an image. The expansion or elongation is dependent on the shape of the structuring element. The figure below shows the effect of dilation on a solid circle, solid square, hollow square, right triangle and a cross (i.e. the top row) using a 4x4, 4x2, 2x4 and cross image as structuring element (i.e. leftmost column). (Click on the image to enlarge)


Figure 1. Demonstration of dilation on different test patterns.

As demonstrated in figure 1 expansion is uniform in all direction when a 4x4 SE is used. Elongation is along the vertical and horizontal when a 4x2 and a 2x4 SE are used respectively. With a cross as SE, the expansion is also uniform except at the corners where a dent is observed reflecting the shape of the cross SE.

Erosion
Erosion is just the opposite of dilation. All observations mentioned above are valid except that instead of expansion, reduction is observed.


Figure 2. Demonstration of erosion on different test patterns.

Scilab's skel and thin
skel function basically prunes a binary image, thus revealing its "skeleton". thin function thins an image by border deletion.


Figure 3. Demonstration of skel and thin on different test patterns.

For completing the activity, I'll give myself a 10 ^_^

1 comment: