This stage implements contour decoding. An arbitrary
curve is composed from a sequence of unitary vectors with
a limited set of possible directions. Once a skeleton has
been extracted, the image curves can be well represented by
storing only the direction to the next pixel for each of the
connected pixels in the boundaries. A chain code method
using an 8-connected grids models its layout and direction.