Classical Chain Code

    Once we have identified the boundary pixels of a region, we can get the classical (Freeman) chain code by only storing the relative directions as we go from pixel to pixel counterclockwise around the contour. To obtain the classical chain, we will use the directions shown in Fig. 5.3a. Fig. 5.9 shows a simple image and its classical chain.

    From Fig. 5.9 we note that, the classical chain code of a boundary is invariant under translation, but it depends on the starting point. Also, if the image is rotate the chain code will differ.