Noisy Shapes

   Finally, we consider the problem of eliminating slight differences of shape (due perhaps to noise in the digitalization of real-world images). For instance, we apply a transformation to chain elements such as the following:

    3 1 1 3 --> 2 2.

    When we apply this transformation of chain elements to a shape we eliminate protruding pixels. Due to the fact that we use pixels with fourconnectivity, the use of this transformation does not change the topological properties of shapes.

   Finally, we apply the above mentioned transformation to the chain elements of  the "lemon leaf" shown in Fig. 5.29a and we obtain the resultant contour shown in Fig. 5.29b. Note that three pixels were eliminated from the shape.