Introduction to the Fourier Transform

Correlation

The correlation p of two functions is defined as

correlation_formula

where p is related to the similarity of the two functions. Hence, correlation can be used in pattern recognition or template matching. Furthermore, correlation is also easily performed in Fourier space as it is simply the item-by-item multiplication of F and the conjugate of G. (F and G are the fourier transforms of f and g.)
For this portion of the activity, the goal is to determine the locations of the letter ‘A’ in the following image.
Test sentence for correlation.
Test sentence for correlation.

This is done by first generating an image of the letter ‘A’ of the same size and font as in the test sentence (see below), and then performing correlation on them.

An A
An A of the same size and font

The result is as follows.

correlated
The result.
It appears like a blurred version of the test sentence. Note that the lengths of the words and spacing are similar to the lengths of the blurred gray and black sections in the correlation. Note however that among the gray areas are “bright” white spots. These represent points where the correlation is high. Checking the test sentence, we can see that these white points correspond to the letter A’s in the sentence!! Hence, the FFT was used in pattern recognition.
A limitation of this technique is that the size of the pattern must be its size in the image. Hence, it is best used for images where the pattern does not rotate or change size.

Leave a comment