This is one of those activities that really made me appreciate Fourier transform. Aside from its use on determining the frequencies in a signal, Fourier transform can also be used to enhance an image by blocking or putting a mask on unwanted frequencies.
A. Fourier Transform of Different Apertures
First, given two dots equally-spaced along the x-axis, applying Fourier transform would give you alternating dark and white bands. A dot is a representation of a dirac-delta.
Two dots symmetric along the x-axis and its FT modulus(left to right) |
Circular Apertures and its FT modulus at varying radii |
It can be observed that these circles are considered as circular apertures. Their Fourier transform is an Airy pattern. As the radius of the circular apertures increases, the Airy disc decreases in radius.
Square apertures and their FT modulus |
Gaussian apertures and their FT modulus |
B. Inverse Fourier Transform
random points (left), arbitrary pattern (middle), Inverse Fourier Tranforn when the two are convolved (right) |
When two images are convolved and their inverse Fourier transform are taken, the resulting image is just a product of the two images. The pattern adheres to the location of the dirac-deltas (dots). The image above shows how the Array Theorem works. When you a function and a dirac-delta, the functions will add linearly but shifted to an new location, depending on where the dirac-deltas are located.
original image (left) and FT of hte modulus (right) |
The Fourier transform of the image on the left is the image on the right and vice-versa. As one increases the spacing in the original pattern, the spacing between the dots in the Fourier transform of the image is narrower.
C. Line Removal
Unwanted lines in a picture can be removed by creating a mask that filters these lines out.
(left to right) original image, FT of the image, mask, and masked image |
D. Canvas Weave Modeling and Removal
(left to right) original cropped image, FT of the original cropped image, mask filter, result |
After applying the mask, it can be seen that the weave pattern has been partly removed. Here is the Fourier transform of the inverted filter mask used.
Inverted mask filter (left) and its Fourier Transform (right) |
The Fourier transform of the filter mask shows us the weave pattern in the painting that was removed.
Despite the long hours of debugging, I enjoyed doing this activity. :)
Thus, I give myself a 13 for learning the techniques, applying what I have learned in my optics class and for patiently debugging my code until it gives the right results.
A big thanks to Eloi for the helpful discussions and to Mabel for helping me debug my code. :)
What are the graphs in the middle column of the 2nd and 4th figure?
ReplyDeleteHi, ma'am! Those were the results using imshow(). :)
ReplyDelete