Monday, July 6, 2009

Act 5: Fourier Transform Model of Image Formation

In this activity, the various applications of the fast Fourier transform (FFT) were applied. The FFT was implemented using Scilab 4's various FFT functions.

A. Familiarization with discrete FFT
First we were required to perform 2-D FFT, inverse FFT, as well as performing 2-D FFT twice on the same image.
The first image used was this circle:


And the outputs produced were:

The next image used was the letter "A":

And the outputs produced were:



B. Simulation of an Imaging Device

The second part of the activity requires the convolution of this image


to circles of various sizes


The circle is to act as the aperture for the "VIP" image, since a lens basically acts as an FFT to an image. The output is as follows



C. Template Matching using correlation
The third part of the activity makes use of correlation in order to find patterns in an image. This was shown by correlating these two images:

so that the A's in the image can be seen. The output of the correlation is this image:


D. Edge detection using the convolution integral
The final part of the activity requires the convolution of various 3x3 matrices with this image:


The matrices used were as follows:
vertical: horizontal: diagonal: spot:
[-1 -1 -1] [-1 2 -1] [-1 -1 2] [-1 -1 -1]
[ 2 2 2] [-1 2 -1] [-1 2 -1] [-1 8 -1]
[-1 -1 -1] [-1 2 -1] [ 2 -1 2] [-1 -1 -1]

The output images are as follows:


What happens is that the matrix pattern highlights the edge that is related to it. For example, in the first image, the original image was convolved with a horizontal matrix, thus resulting to the horizontal parts of the edge of the image being highlighted.

I would like to grade myself 10/10 for fully accomplishing this activity in the given time. Also, I would like to thank Earl and Raffy for helping me improve my code.

No comments:

Post a Comment