Image Processing Reference
In-Depth Information
point, to achieve the image in Figure 5.5 (d). When this is inverse Fourier transformed, the
result, Figure 5.5 (e), shows where the template best matched the image (the co-ordinates
of the template's top left-hand corner). The resultant image contains several local maximum
(in white). This can be explained by the fact that this implementation does not consider the
term in Equation 5.10. Additionally, the shape can partially match several patterns in the
image. Figure 5.5 (f) shows a zoom of the region where the peak is located. We can see that
this peak is well defined. In contrast to template matching, the implementation in the
frequency domain does not have a border. This is due to the fact that Fourier theory
assumes picture replication to infinity. Note that in application, the Fourier transforms do
not need to be rearranged (fftshif) so that the d.c. is at the centre, since this has been
done here for display purposes only.
(a) Flipped and padded template
(b) Fourier transform of template
(c) Fourier transform of image
(d) Multiplied transforms
(e) Result
(f) Location of the template
Figure 5.5
Template matching by Fourier transformation
There are several further difficulties in using the transform domain for template matching
in discrete images. If we seek rotation invariance, then an image can be expressed in terms
of its polar co-ordinates. Discretisation gives further difficulty since the points in a rotated
discrete shape can map imperfectly to the original shape. This problem is better manifest
when an image is scaled in size to become larger. In such a case, the spacing between
points will increase in the enlarged image. The difficulty is how to allocate values for
pixels in the enlarged image which are not defined in the enlargement process. There are
several interpolation approaches, but it can often appear prudent to reformulate the original
approach. Further difficulties can include the influence of the image borders: Fourier
Search WWH ::




Custom Search