Subband Coding and Template Matching
for Pattern Recognition

Nasir Rajpoot, Cenk Sahinalp and Roland Wilson


This page presents an outline of some work done on the recognition of squares in an image using template matching in the frequency domain. The effects of wavelet coding on the accuracy of recognition were observed and it was found that wavelet coding offers reasonably good accuracy upto certain levels of compression.

The test image, with a resolution of 256x256, was created by drawing squares of length 10 using a shot-noise Poisson process. The image was limited to be binary and the squares were not allowed to overlap. It contained 42 squares of length 10 and looked like:

Figure 1: Test Image

Image was then compressed by wavelet coding scheme and was reconstructed after dropping all high frequency components of the coded image. This was done after finding out that most of the energy contents of coded image were concentrated in its lowest frequency section.

Figure 2: Coded Image after Chopping High Frequency Components (Level 1)

Figure 3: Image Decoded by IWT of Image in Figure 2

Different levels of wavelet coding were tested for the coded image. It was found that more the number of levels, more deformed the decoded (reconstructed) image, after dropping all the high frequency components in coded image. The squares became more blurred as the number of levels of wavelet coding was increased, causing more problems in the accuracy of recognition of squares. Recognition process was carried out by using the local maximum technique for detection of peaks with template matching scheme in frequency domain (due to its efficient computation of FFT.)

False detections were defined as deviation of the corner of square detected from the eight-neighbours of the corner of orignial square. Number of false detections, termed as error rate, was plotted against number of levels. The graph shows that the detection is absolutely accurate, with no error rate, upto the first two levels of wavelet coding which compress the image to a resolution of 128x128 and 64x64 respectively. The error rate rises to a value of 2 at the third level of wavelet coding and it gets the respective values of 36, 40, and 42 for the 4th, 5th, and 6th levels of wavelet coding.

Figure 4: Error Rate Vs. Number of Levels

Further work needs to be done to consider overlapped squares of different sizes. Moreover, work is still to be carried out for the detection of anyother geometrical shape, such as circle. For recognition purposes, a scheme which is density-adaptive would be more efficient.


Back