Mga Pahina

Linggo, Hulyo 14, 2013

Fourier Transforms! 2D version: model of image formation

We have already encountered several applications of the Fourier transform during our Applied Physics 183 and 185 class. It is so powerful that one couldn't possibly imagine the fields of Optics and signal/image processing progressing as much as they do nowadays without it. Fourier transforms use the sum of cosines and sines in representing a certain signal. In this activity, we extend it to two-dimensional to mimic the lens of a camera as a Fourier Transformer and this it is represented by the following equation.
One property of the Fourier transform is its symmetry. The following figure schematically presents the 2-D symmetry of FT.
2D-Symmetry of FT 
ref: [2]

You will be able to observe this symmetry when we get to the result of each Fourier transformations done in this activity. 

Fourier transform can be implemented through numerical simulations. Several algorithms have been presented in solving Fourier transform, and the best one so far is the Fast Fourier Transform by Cooley and Tukey[1]. Taking in mind that Fourier transform represents a signal/image as a sum of sines and cosines, we examine the FFT of a synthetic sinusoidal image shown below:

FFT of sinusoid images along the vertical and horizontal axis

The FFT of an image of a sinusoid is relatively much simpler than other images. Its direction is also consistent with the direction of the sinusoid. Note that the FFTs shown in the figure above are zoomed-in versions for us to be able to distinguish their FFTs.

In this activity, we explore the different techniques in implementing the use of Fourier transforms in simulating an imaging device as well as editing and manipulation of images. The first part of the activity is exploring the discrete Fourier transform. We note that FFT2 best works when it's size is in the power of 2. Thus, we create synthetic images of size 128x128 in each of the applications to be explored in this activity. The first task is to create a circle of any radius. In my case, I created three with different radii and each of their FFT and shifted FFT are presented in the following figure.



FFT and shifted FFT of circles of increasing radii

The Fourier transform of an image has to be shifted because the quadrants of the image are interchanged. The resulting image is that of an Airy pattern. As the radius of the circle increases, the airy pattern decreases in size. It is interesting to  find the right radius that would result to an image of an airy pattern fit for the 128x128 px. 

I was also curious what happens if we place the circular object at the edge of a picture. Since Fourier transform detects all frequencies that appear in an image, its output is not necessarily dependent on the actual position of the signal in the image. This is demonstrated by the figure below.


The next task is to simulate an imaging device. An image of a circle represents the aperture of a camera, and the VIP image represents the object to be captured. The FFT of the object is obtained and the circular aperture is shifted. Their product is calculated the inverse is obtained to get the convolved image. The result of increasing aperture size is presented in the following figure. 

Simulation of an imaging device with increasing aperture size (circle)

The object appears more focused as the aperture size increases since the aperture is responsible for the amount of light that is captured by a lens. Simulation of an imaging device is just one of the many applications of the convolution theorem. It is what makes the use of Fourier transform very useful in the fields of Optics and image processing. The key point in this theorem is that:
Multiplication in Real Space <--->  Convolution in Fourier Space
    Convolution in Real Space <--->  Multiplication in Fourier Space










References:
[1] Maricor Soriano. A7 – Fourier Transform Model of Image Formation
[2] The Fourier Transform (What you need to know) . School of Physics, The University of Edinburgh from http://www2.ph.ed.ac.uk/~wjh/teaching/Fourier/documents/booklet.pdf Retrieved 16 July 2013

Walang komento:

Mag-post ng isang Komento