Example

    If we apply the previous steps to the three images shown in Fig. 5.5, we will obtain the contour of the images as depicted in Fig. 5.6. In Fig. 5.6a Step 1 of the algorithm is shown, while Fig. 5.6b represents Step 2 to find the contour of a binary image, and Fig. 5.6c shows Step 3 of the algorithm. 

    It is worth noting that we can apply this algorithm to practical images to obtain their contours. Fig. 5.7 shows a tree leaf and its contour. Also, the previous algorithm can be applied to obtain the contour of the binary images even if these images with holes. Fig. 5.8 shows the contour of an image with holes.