Morphological Operations
Mathematical morphology is a theory and technique for the analysis and processing of geometric structures, based on set theory, lattice theory, topology, and random functions [1]. It is the foundation of morphological image processing, which consists of a set of operators that transform images.
Morphological operations are used to understand the structure or form of an image [2]. They apply a structuring element of arbitrary shape to an input image, to produce an enhanced image. The most basic morphological operations are dilation and erosion. Dilation adds pixels to the boundaries of objects in an image, while erosion removes pixels on object boundaries [2]. In both processes, the transformation of the object depends on a certain shape called structuring element.
For this activity, the objects to be dilated and eroded are shown in Figure 1 whereas the structuring elements used are shown in Figure 2.

Figure 2. Structuring elements. The colored boxes refer to the origin used for dilation and erosion.
Dilation
When the origin of a structural element is positioned at a given point on the object, it attaches itself to that point such that it adds pixels to the boundary of the object. The images below show different objects and the result of their dilation by different structuring elements. My predictions match those of Scilab’s dilate() outputs. The yellow blocks depict the original shape of the object.

Figure 3. Dilation of a 5x5 square with the structuring elements. My predicted outputs (upper images) match the outputs using Scilab (lower images).
Erosion
If, when positioned at a point on the object, the structuring element is included in the object, then this point will appear in the result of the transformation, otherwise not. The following images show the results of erosion of the objects by different structuring elements. Again, the predicted outputs matched Scilab’s erode() outputs. The pink blocks correspond to the transformed image.
References:
[1] http://en.wikipedia.org/wiki/Mathematical_morphology
[2]http://www.mathworks.com/access/helpdesk/help/toolbox/images/f18-12508.html
I give myself 9/10 for this activity.









