For this activity [1] , we make use of several shapes, namely:
to be manipulated by several structuring elements, namely
All the shapes were generated by Python’s imaging library (PIL), and the operations were performed using OpenCV. For the shapes, their origin is located at the shape’s geometric center, while for the structuring elements, their origin is located in the lower-left corner. The result for the dilation of the images is shown in Fig. 1, while Fig. 2 shows the result for erosion.
Figure 1: The result of dilation on the images. The first column shows the original images used, while the first row shows the structuring elements.
Figure 2: The result of erosion on the images. The first column shows the original images used, while the first row shows the structuring elements.