Thursday, October 13, 2011

Enhancement in the Frequency Domain

From the previous entry, we learned that when we add patterns, the Fourier transform of the resulting pattern is just the sum of the Fourier transforms of the component patterns. We can use this idea to remove unwanted patterns in images by manipulating their Fourier transforms. We can do this by filtering out the frequencies of the unwanted patterns using a filter mask. When making filter masks, familiarity with the convolution theorem is necessary.

The Convolution Theorem
According to the Convolution Theorem, the Fourier transform of the convolution of two functions is the product of their Fourier transforms functions


We can take advantage of the dirac delta function to generate patterns with the help of the convolution theorem. If we convolve a pattern and an image containing dots (to represent the dirac delta function), the resulting image is the pattern replicated on the location of the dirac delta.


The Fourier transform of the resulting pattern is


Increasing the width of the circle convolved with the dirac deltas makes the Airy pattern from the Fourier transform of the circle smaller but retains the separation width of the vertical parallel lines from the Fourier transform of the dirac deltas.




We see the same for a square convolved with two dirac deltas as above,




And also for Gaussians convolved with the dirac deltas,






Notice that when the Gaussians get too large and merge, the Fourier transform is reduced to a sharp point, similar to a dirac delta.

We can also use dirac deltas to create complicated patterns




Enhancement of Images

Here is an image with unwanted lines. 

From: http://www.lpi.usra.edu/lunar/missions/apollo/apollo_11/images
Image of a lunar surface with vertical lines due to stitching of multiple images.


We can remove the lines by blocking out the Fourier transform of these lines from the Fourier transform of the image.

Fourier transform of image and the filter used.

The resulting image is clean and void of lines:

Enhanced image.


And here's another one:

Image of painting with the canvas weave showing in the background.

Grayed image.

This is a painting with the pattern of the canvas weave showing in the background. We can remove this by filtering the Fourier transform of the image.

Fourier transform of image and the filter used.

Enhanced image.






__________________________________________________________________________________
I'm only giving myself a 9 for this blog since I wasn't able to show the enhancement of fingerprint ridges.

No comments:

Post a Comment