This activity is a demonstration of the many uses of the Fourier Transform.
We did this part by part and here are my results.
5.A FAMILIARIZATION WITH DISCRETE FFT
The FFT of an image is a transformation into inverse space or spatial frequency.
The function is built into Scilab and here are our results when fft2 is applied to a circle and to the letter A.
Original Image
FFT and zoomed Shifted FFT
FFT of FFT
The output of fft2 has the quadrants along the diagonals interchanged; therefore fftshift is needed to realign the quadrants back. As expected the fft of a circle resulted to an Airy disk. Applying fft2 twice just resulted to an inverted copy of the original image.
5.B SIMULATION OF AN IMAGING DEVICE
The convolution model predicts the image produced when an object is viewed using an imaging sytem. Convolution is the smearing of one function with another such that the resulting function looks a little like both. In Fourier space, the product of the FTs of the image and the imaging system will give us the FT of the resulting image.
We then applied fft2 to the image and fftshift to the aperture since the aperture is already in Fourier plane). The results after convolving are shown below. It was observed that as the diameter of the aperture gets bigger, the image becomes sharper. This is because a larger circle results to a smaller Airy disk.
5.C TEMPLATE MATCHING USING CORRELATION
Correlation measures the degree of similarity between two functions. The correlation value peaks at points where there is an exact match.
For example to find the letter A in the text…
…we use the template
We then element per element multiplied the fft of the template and the conjugate of the fft of the text. The image of the inverse fft is
The text is now inverted but we can still check that the bright peaks occur at the locations of the letter A.
5.D EDGE DETECTION USING THE CONVOLUTION INTEGRAL
Another application would be edge detection. We can convolve an image with a matrix pattern of an edge using the function imcorrcoef in Scilab.
When the edge pattern is horizontal the horizontal edges are emphasized.
No comments:
Post a Comment