Chain codes are represented as NUL-terminated ASCII strings, using the characters 0 – 7, see the figure below.
Next section: Contour Chain Code Generation