Monday, July 6, 2009

Activity 5: Fourier Transform Model of Image formation

A. Familiarization with discrete FFT

For this activity, we were able to demonstrate Fourier transform and convolution. The first exercise that we did was to get the Fourier transform of an image.


The first column in the images above are the original images of a circle and letter A. The second column on the other hand is the calculated shifted fast Fourier transform of the original images. These were computed using the function fft2 in Scilab. Lastly the last column are the resulting images after getting the fast Fourier transform of the images in the second column.

Analytically the Fourier transform of a circle is an airy disk. The image of the calculated Fourier transform of the circle looks similar to an airy disk.

Observe that the obtained Fourier transform of the first Fourier transform of the image is the inverted version of the original image.

B. Simulation of an imaging device.

Convolution is used in modeling the linear regime of instruments or detection devices such as those used in imaging [1]. For the next exercise, we demonstrated the use of convolution in imaging systems.

In imaging, given an object f and the transfer function g, the image produced by the imaging system is the convolution of of f and g. From the convolution theorem, we know that the Fourier of the convolution of two functions is equal to the the product of their respective Fourier transform. With this in mind, we used a circular aperture and the image "VIP" as the object. Multiplying the fft shift of the aperture and the fft of the image and lastly getting the inverse Fourier of the product will lead to the second column of the images below.

The images above shows the image of the aperture and the corresponding resulting image. It can be observed that as the aperture size decreases, the image of the object becomes more blurred. This is expected since when the aperture is small less amount of light will be able to enter the system; thus resulting to a blurred image. Again it can be observed that the resulting image is inverted. This is because of it resulted from the inverse Fourier. The same reason for the inverted images in the first part of the activity.

C. Template Matching using correlation

Correlation measures the degree of similarity between two functions. [1] Similar to the convolution theorem the Fourier of the correlation P is equal to the product of two Fourier transformed functions, F* and G where * stands for complex conjugation.

P = F*G

For this part of the activity we used an image containing the text, "THE RAIN IN SPAIN STAYS MAINLY IN THE PLAIN" as the function F and the previously used image of "A" as the function G. The inverse Fourier P is the image below.

The image of the correlation as can be seen above is blurred for the same reason as the other two previous part of exercise. However notice that all the letters A in the resulting image does not look like A but looks like a bright spot. This is expected since the function g used is the image "A". Correlation measures the degree of similarity. In this case, all the letter A in the text in function F contain a high correlation value resulting to the bright spot for all locations of A.

D. Edge detection using the convolution integral

For this part of the activity, 3 matrices where used in order to perform edge detection. Each matrix used has a total sum of zero. Edge detection was done by convolving the matrix unse with the image "VIP".As can be seen in the images above, the image "VIP" became more clear at directions same as the direction of similar values in the matrix. For example in the first image, the matrix used has same values in the vertical direction and because of this the resulted image has a clearer vertical spots. This is because this parts of the image are the ones detected as dictated by the used matrix.

For this activity I'm giving myself a grade of 10 for I was able to do the exercise right.

I thank Ms Herminia Balgos for making the "VIP" image for me.

No comments:

Post a Comment