A chain code is a more succinct way of representing a list of points than a simple [ , ..... ]. It may be defined either with respect to the pixels or the boundaries between pixels. A pixel in a rectangular grid has either 4 or 8 neighbours depending on the definition of connectivity, as represented in Figure 7, below. The chain code is defined in this case by tracking around the white pixels in the outer boundary ( as opposed for example to tracking round the black pixels in the inner boundary ). For the examples shown, the codes are 1100100 etc. and 21017 etc. Alternatively, it is possible to track between the black and white regions along the intersections of the pixels using a 4-connected code. In Figure 8, the edge data is tracked directly, again using an 8-connected form; the short bars represent the thinned edges from a standard edge detection algorithm. A chain code describes the boundary as a series of one (or 1.414 !) pixel vector transitions at different orientations; only the starting point is defined explicitly.