Wednesday, September 22, 2010

Enhancement in the Frequency Domain





This activity utilizes the Fourier space in modifying selected image in order to enhance its quality.
One modification to enhance the image quality using Fourier space is the image filtering. Using the frequency space, Fourier transforms and the convolution theorem, it is possible to filter an image to omit unwanted frequencies. This frequency filtering is affects the whole image in a way that it enhances the image.

Initial exercises in Fourier transforms involved the following:

1) Two dots were constructed and the Fourier transform of it was examined. The reconstructed dots is shown in (1) and the Fourier transform of it is in (2).

(1) Two dots
(2) Fourier transform of two dots.

2) Instead of dots, 2 small circles were constructed in a way that the radius is to be varied. Shown below are Two small circles with radius 5 and 20 pixels as well as their Fourier transforms. It is observed that as the radius increases, the central circle in the Fourier domain decreases. Also, at radius equal to 5, irregularities in the somewhat circle of the Fourier transform is more defined that that in the Fourier transform of radius equal to 20.


Two dots with r= 5
Two dots with r= 20
Fourier transform of two dots with r= 5
Fourier transform of two dots with r = 20

Also more variations were done such as squares with different width and Gaussians with varying variance. Their constructed images and Fourier transforms are shown below.

Squares

Squares with width = 5
Squares with w = 20
Fourier transform of Squares with w w = 5
Fourier transform of Squares with w = 20

Gaussians

Gaussians with variance = 10
Gaussians with variance = 20
Fourier transform of Gaussians with variance = 10
Fourier transform of Gaussians with variance = 20

3) In this exercise, we are to familiarize with the convolution and what it does. Based upon the observation, when 2 images are convolved, the resulting image is somewhat the both images combined. It has attributes of both images. In the first exercise, a random array of ones and a patter is convolved to produce an image. The patter is shown below as well as the pattern and the convolved image.

Random Ones

Array of Ones randomly distributed


Pattern used. It looks like a "T".

Convolved image with the ones obtaining the form of the pattern.

4) a 200x200 array of ones were made. The Fourier transform of this was obtained. Another array of ones were done and this time, the separation was changed. Shown below are the result.

Array of Ones (f defines the separation)

Array of ones with f = 100
Fourier transform of Array of ones with f= 100

Array of Ones with f = 10
Fourier transform of Array of ones with f = 10.

It is seen that the peaks or the white pixel in the Fourier space increases it separation as the f is decreased.

Enhancement.

Fingerprints.Ridge Enhancement


Fingerprint images were enhance using convolution. Given the Fourier transform of the fingerprint image to be enhanced, a certain mask is convolved onto it to be able to filter out the undesirable frequencies that reduces the quality of the image. Using this Fourier transform-mask-convolved-inverse Fourier transform method, the fingerprint image was enhanced. results are shown below.







Fingerprint image thanks to http://www.webschool.org.uk/revision/archfprint.jpg


Mask used.

Resulting Image. This is inverted due to the fast fourier transform.
There are more defined sections of the fingerprints that are darker in the original image.

Line Removal.
In this section, the method of enhancement is also the same. It involves a mask in the Fourier space to filter out undesired frequencies.

from this image,

Image of lunar landing. Note the vertical lines.

yielded this image:

Reconstructed image without the vertical lines.

CanvasWeave.

A subject painting was used in this part. Same method of concept that involves filtering is used. Initial painting is shown below:

Canvas Weave.

Enhanced Canvas weave. There are less dots in the painting.

This is a fun activity. Specially the enhancement part. I'd like to thank Maam Jing for most of the intellectual inputs that served as stepping stones to complete this activity.

I'd say, I got 10/10 in this activity.


No comments:

Post a Comment