Activity 8- Enhancement in the Frequency Domain

First, by creating two dirac delta’s along the x-axis or equivalently two points and getting its Fourier transform as shown below. We expect that its FT is a corrugated roof along the x-axis. This will be the basis for the figures to follow.

Two dots and its FT

Using the two dots created, the following images are formed by convolving a square, circle and gaussian images to it. The images are presented below.

Two dots and circles of varying radius convolved

Two dots and squares of varying lengths of sides convolved

Two dots and gaussians of varying variances convolved

We can see that when we convolve these two dots symmetric with respect to the center with different images, those images just replaces the dots, meaning their geometric centers are still positioned where the original dots are located. The sizes of the images corresponds to the actual size of the shapes convolved with the dots.

Now, if we get the FT’s of the above figures, we can observe the following images. We note here that for every shape convolved with the two dots, only a single FT is shown since the same images can be seen only that the size of the different convolved shaped vary inversely with the size of the shape per se.

(from left to right) FT of two circle with r=0.05, two squares with l=0.1 and gaussin with v=0.001

The three figures above show how the FT of the convolution of two different images behaves. In the frequency space, it behaves as the product of the FT’s of the two images, in this case, the corrugated roof and the FT’s of circle, square and gaussian. Notices the sinusoidal behavior of the images above which corresponds to the FT of the two dots and the enveloping pattern is the FT’s of circle, square and gaussian.

If we try to make an arbitrary 3×3 matrix and convolved it with randomly positioned dots. We get the matrix positioned into the positions of those dots as shown.

Now, if we try to create a matrix with an alternating values of ones and zeros along both axes just like making a checkered image and take its FT

For the images shown, we can infer that since the patterns are just binary i.e. composed of only ones and zeros and not like a sinusoid where the function is continuous from a negative to a positive value. However, any repeating pattern can still be decomposed into weighted summation of sinusoidal signal. Now, each FT above has a dirac delta in the middle meaning that a constant value is always present in the summation of the sinusoid and therefore no neagtive values will occur. The rest of the points represents different sinusoid along different axes and having different frequencies as depicted by their distances from the center of the image.

The next thing that was done was the enhancement of a fingerprint pattern. The fingerprint presented was from “http://www.vosizneias.com/wp-content/uploads/2009/02/fingerprint.jpg”. Using the knowledge of convolution, I basically convolved a gaussian function to the fingerprint pattern selected from the larger one. The one inside the square the enhanced pattern. In frequency space, I multiplied a gaussian function of variance equal to 0.95 and almost encompassing the entire mesh. Doing this, I was able to give lesser contributions from the higher frequancy values. The enhanced image is presented in the second row of figures and the last is the filter I used.

The figure below shows how I enhanced the image of a lunar landing picture taken from “http://www.lpi.usra.edu/lunar/missions/apollo/apollo_11/images”. For easier manipulation, i transform the RGB image to its grayscale image. The enhancement is equivalent to the removal of the repeating vertical patterns on the image. One remnant of the vertical pattern is encircled on the left. And if my enhancement would be succesful, I would if not eliminate, just lessen the obvious vertical line on the encircled pattern. Since i want to remove the vertically repeating patterns, I would probably multiply in frequency space pairs of points(whose values are zero) along symmetric along the x-axis pattern and thus removing the sinusoidal component on the image and perhaps the repititive image. I used as many pairs of points as possible so that I will be able to hit the right sinusoidal pattern in the picture. And fortunately, the vertical line on the spot is reduced.

Finally, we go on enhancing the image of an oil painting from UP Vargas Museum collection. We wanted to removed the canvas weave pattern. The pattern looks like an egg tray and this for me, is very much similar to a product of sinusoids along the x and y-axes. So, the challenge here is to find the corresponding FT of the sinusoid. So by trial and error, I looked for the proper “4 vertices of a square symmetric about the center” which is the FT of the egg tray pattern that would somehow fit the spacing of the canvas weave pattern. The 4 dots I used was 28 pixel spaces along the x and y-coorndinated relative to the center of the image. The result is shown below.Based from the effort I exerted and the amount of learnings I gained, it would be fair enough to give myself a grade of 10 for this activity although I may honestly accept that my image enhancements were not that perfect. But, I gave my best shot!

About jrafrica

applied physics student
This entry was posted in Uncategorized. Bookmark the permalink.

Leave a comment