Wednesday, July 15, 2009

Activity 7: Enhancement in the Frequency Domain

In this activity images are enhanced by filtering unwanted frequencies in the frequency domain.
For the first part of the activity, we were instructed to create symmetric dots and squares and obtain its Fourier transform. These were the images(left) and their corresponding Fourier transform(right) .


The Fourier transform of a point is a sinusoid. This is observed in the first pair of images where it can be seen that the image of the Fourier transform of the points looks like a mesh with varying intensity which is actually a sinusoid; and is only seen as that because the image is two dimensional.
On the other hand, the Fourier transform of two symmetric circles looks like an airy disk with a mesh inside. This is because the Fourier of the circles can be thought as the product of the Fourier transforms of two points and a circle. We know that the Fourier of a point is a sinusoid and that of a circle is an airy disk. Thus this resulted to the observed Fourier transform of the symmetric circles.
The same analogy applies for the square. The Fourier transform of the symmetric squares can be thought as the product of the Fouriers transforms of a square and two points. Again the Fourier of a point is a sinusoid and that of a square is a sinc. The product of the two will look like a sinc with a mesh of varying intensity inside. This is the observed Fourier transform of the symmteric squares.

It was also observed that as the radius of the circle and the sides of the square increases, the size of its corresponding Fourier transform decreases. This is the scaling property of the Fourier transform. Given a function, h = f(ax), its Fourier transfrom will be, H = (1/a)F(ax) [1].

Aside from circle and square, the Fourier transform of Gaussians were also observed for varying values of the variance.variance = 0.1variance = 0.4
variance = 0.8

Gaussian unlike other functions has a Fourier transform similar to a Gaussian. It is a self reciprocal function [2]. It can be observed that the obtained Fourier transforms looks like a gaussian with a mesh inside. The explanation for this is similar to what was discussed earlier. The Fourier transform of two symmetric gaussians can be thought as the product of the Fourier transfor of a gaussian and two points. Thus this will result to the image obtained.

Similar to what was observed earlier for the circle and square, increasing the variance of the gaussian results to the decrease in the size its Fourier transform. This is due to the scaling property of the Fourier transform.

After familiarizing ourselves with different Fourier transform, we then enhanced images by filtering unwanted frequencies in its Fourier transform. This was first done with the image of a fingerprint as shown below.Taking the Fourier transform of this image will result to the image below.

The Fourier transform of the image contains frequencies of the image. Blocking unwanted frequencies will result to an image absent of the unwanted details corresponding to the blocked frequencies. With this in mind a filter was created using gimp.

Multiplying this filter to the Fourier transform of the image will block unwanted frequencies and will result to the image below.

As can be observed, other details like the text "CO" and "09" and "INDEX" were omitted from the filtered image.

Using the same principle, the process was applied to another image below.

Its Fourier transform is the image below.

This is the masked used to block unwanted frequencies.

After getting the inverse Fourier of the product of the Fourier transform of the image and its mask..
As can be observed the lines present in the original image are not visible in the filtered image. Also notice the mask used to block the unwanted frequencies. It can be noticed that the mask looks like the Fourier transform of a sinusoid with different frequencies. This is because the lines present in the original image can be thought as sinusoids.

The same process was used for an oil painting in Vargas Museum. Since the oil painting was painted in a canvas, one can actually separate the painting itself from the canvas using frequency filtering. The painting is the picture below. The Fourier transform of the image is..


To create a filter mask removing the canvas weaves, we must first think what should the Fourier transform of the canvas weave look like. Based from the knowledge from the previous exercise we have an idea that the Fourier transform of the canvas will look like the Fourier transform of several sinusoids with different frequencies. Thus the filter will look like...
The resulting filtered image will then be...

As can be observed the brush strokes are more enhanced than the canvas weaves. Similarly, we can invert the filter used to mask the canvas weave so that we will be able to simulate the appearance of the canvas weave.


As can be observed, the simulated canvas weave thus looks like the canvas weave of the painting.

I would like to acknowledge Irene Crisologo for teaching me how to create a filter in Gimp.

for this activity I will give myself a grade of 10 for I was able to do and enjoy all the requirements for this activity.

References:

[1]http://en.wikipedia.org/wiki/Fourier_transform
[2]http://cnyack.homestead.com/files/afourtr/ftgauss.htm
[3]Activity 7: Enhancement in the Frequency Domain Manual

No comments:

Post a Comment