Monday, July 6, 2009

Activity 5: Fourier Transform and Correlation

In this activity, we explored the uses of FFT and correlation in image processing. We started by taking the FFT of a circle and a character just to see how the 2D FFT function works in Scilab. I got the following results:




Original/FFT/double FFT

Top: Circle, Bottom: A

These results agree with the analytical expectation: we get an Airy disk for the circle and we inverse the image when the FFT is performed twice.

We then used FFT to convolve an image of an aperature and an image to simulate the effect of an imaging device with limited aperature. I got the following result:



Original image/ Convolution of "VIP" and circular aperature of r=40/30/20/10/5

We get an image of the original object but it is now inverted and less resolved. Decreasing the aperature size causes the image to blur and gain artifacts which somehow resemble the shape of the aperature.

Our next task was to use correlation to find a certain pattern in an image. In this case, we had an image of the line "THE RAIN IN SPAIN STAYS MAINLY IN THE PLAIN" and we had to look for the A's via correlation. Correlating the image and an image of the letter "A", I came up with the following result:



Original image/Correlation of the image and pattern

We find that the peaks of the resulting image correspond to the posistions of the A's in the image thus verifying that the method was correct.

Finally, we attempted to do edge detection by correlating small matrices of either a vertical line, a horizontal line, or a point with a given image. I came up with the following results:


Vertical/horizonal/point edge detection

We can see that the method worked as it highlighted only the parts which correspond to the types of edges being detected.

For this activity I give myself a 10/10 because I was able to complete the tasks completely and efficiently.

No comments:

Post a Comment