Image Processing Reference
In-Depth Information
Clearly this code will be different when the start point changes. Accordingly, we need
start point invariance. This can be achieved by considering the elements of the code to
constitute the digits in an integer. Then, we can shift the digits cyclically (replacing the
least significant digit with the most significant one, and shifting all other digits left one
place). The smallest integer is returned as the start point invariant chain code description.
This is illustrated in Figure 7.5 where the original chain code is that from the shape in
Figure 7.4 . Here, the result of the first shift is given in Figure 7.5 (b) - this is equivalent to
the code that would have been derived by using point P1 as the starting point. The result
of two shifts, in Figure 7.5 (c) is the chain code equivalent to starting at point P2, but this
is not a code corresponding to the minimum integer. The minimum integer code, as in
Figure 7.5 (d), is the minimum of all the possible shifts and is actually the chain code which
would have been derived by starting at point P8. That fact could not be used in application
since we would need to find P8, naturally, it is much easier to shift to achieve a minimum
integer.
In addition to starting point invariance, we can also obtain a code that does not change
with rotation . This can be achieved by expressing the code as a difference of chain code:
relative descriptions remove rotation dependence. Change of scale can complicate matters
greatly, since we can end up with a set of points which is of different size to the original
set. As such, the boundary needs to be resampled before coding. This is a tricky issue.
Furthermore, noise can have drastic effects. If salt and pepper noise were to remove or add
some points then the code would change. Clearly, such problems can lead to great difficulty
with chain codes. However, their main virtue is their simplicity and as such they remain a
popular technique for shape description. Further developments of chain codes have found
application with corner detectors (Seeger, 1994; Liu, 1990). However, the need to be able
to handle noise, the requirement of connectedness, and the local nature of description
naturally motivates alternative approaches. Noise can be reduced by filtering , which naturally
leads back to the Fourier transform , with the added advantage of a global description.
code = {3,4,3,4,4,5,4,6,7,7,7,0,0,1,1,2}
(a) Initial chain code
code = {4,3,4,4,5,4,6,7,7,7,0,0,1,1,2,3}
(b) Result of one shift
code = {3,4,4,5,4,6,7,7,7,0,0,1,1,2,3,4}
(c) Result of two shifts
code = {0,0,1,1,2,3,4,3,4,4,5,4,6,7,7,7}
(d) Minimum integer chain code
Figure 7.5
Start point invariance in chain codes
7.2.3
Fourier descriptors
Fourier descriptors , often attributed to early work by Cosgriff (1960), allow us to bring the
power of Fourier theory to shape description. The main idea is to characterise a contour by
a set of numbers that represent the frequency content of a whole shape. Based on frequency
analysis we can select a small set of numbers (the Fourier coefficients) that describe a
shape rather than any noise (i.e. the noise affecting the spatial position of the boundary
pixels). The general recipe to obtain a Fourier description of the curve involves two main
steps. First, we have to define a representation of a curve. Secondly, we expand it using
Fourier theory. We can obtain alternative flavours by combining different curve representations
and different Fourier expansions. Here, we shall consider Fourier descriptors of angular
Search WWH ::




Custom Search