Thursday, September 23, 2010

Activity 8: Enhancement in the Frequency Domain


Results:

A. Convolution Theorem
The first step in understanding the use of the convolution theorem is in familiarizing ourselves with the FFT pairs and how can convolution be seen on these initial results. Figure 1 show the FT pairs of two dots lying along the x axis symmetric on the origin.

Figure 1: FT transform two dots results in a sinusoid in the Fourier Space.

Changing the shape of the dot such as converting it into a square, a circle or a gaussian would further familiarize us with the properties of convolution. Figure 2 summarizes all of these effects when the dot was changed into different shapes.

Figure 2: Effects varying dimensions of the same shape in FT space.

It can be seen that as we increase the size of the object in xy space, the pair becomes smaller in FT space. Likewise i can be seen that the FT of each of the patterns are the products of the FT of the circle multiplied by the FT of two dots. Thus it can be seen here that the convolution is just the product of their FT in FT space.

The imconv function of SciLab maps an matrix onto an image using the convolution. Likewise it can be seen from Figure 3 that the spacing between dots in XY space is inversely proportional to its spacing in FT space.

Figure 3: Application of imconv using different mapping matrices and inverse dependence of spacing on XY and FT domain.

B. Fingerprints: Ridge Enhancement
Fingerprint detection encounters a problem when the riges at not well defined. Here we implement a method in enhancing ridges in fingerprints through masks done in the fourier space. Figure 4: shows an example of a raw image of a fingerprint.

Figure 4: Original Fingerprint Image

Taking the Fourier transform of the image and representing it into log scale. Figure 5 shows the frequencies present in the image.

Figure 5: FFT of Original Fingerprint

We can see repetitive patterns of a skewed circle, in order to enhance the ridges we must filter the frequencies such that only the center spot would be left. Also we remove the central peak to remove the DC offset and enhance the reconstruction. Figure 6 shows the proposed mask and the masked FFT.

Figure 6: Filter Mask(Top) and Filtered FFT(bottom)

Using the masked FFT to reconstruct the image and further binarizing the image to clearly show the ridges it can be seen that the method works in enhancing ridges.


Figure 7: Reconstructed Image(Top), Binarized Image(Bottom)

C. Lunar Landing Scanned Pictures
Using the another mask in improving the quality of an image shown in Figure 8, a mask must be created to filter the vertical lines seen in the image.

Figure 8: Original Lunar Landing Scanned Image

Taking the FFT of the image Figure 9 shows that the part producing the vertical lines are the frequencies lying in the x axis and y axis. Therefore a mask that would remove those frequencies is needed. However we must not remove the central peak since removing the DC offset might reduce the quality of the image. Figure 10 shows the mask and the masked FFT.


Figure 9: FFT of Lunar Landing Image



Figure 10: Filter Mask(top) and Filtered FFT(bottom)

Using the masked FFT to reconstruct the image Figure 11 shows an improved Lunar Landing image with no vertical lines to reduce the quality of the image.

Figure 11: Improved Lunar Landing Image after Masking in FT domain

D. Canvas Weave Modelling and Removal
Figure 12 shows a painting on a canvas. It can be seen that the image shows a prominent canvas weave pattern and removing the canvas weave effect would further enhance the image quality.
Figure 12: Gray scale image of Original Canvas Weave Image

Taking the Fourier transform of the image it can be seen that spikes or dots are prominent in the FFT. These dots and spikes based from past activities are sinusoidal patterns that may represent the canvas weaves.

Figure 13: FFT of canvas weave image

By masking these spikes and reconstructing the image we removed the canvas weave pattern and improved the image.


Figure 14: Mask(Top), Filtered FFT(bottom)

Figure 15: Enhanced Image by removing canvas weave patterns.

References:
[1] M. Soriano, "Acivity 8: Enhancement in the Frequency Domain 2010", AP 186, 2010.

Self Evaluation: 10

No comments:

Post a Comment