In this activity, the convolution theorem is used to enhance images. In the first part of the activity, we explored the convolution theorem. The succeeding parts deals with ridge enhancement, line removal, and canvas weave modeling and removal from images. All of which were done by exploiting the convolution theorem in the Fourier space.
A. Convolution Theorem
For this part, the Fourier transform (FT) of images were done. The images used are two dots of 1 pixel each, circles of different radii, squares of different area symmetric about the center. A Gaussian function of varying variance also was used instead of dots. The following are the images described above and their corresponding FTs.
It can be observed from the above images that with increasing area for circles and squares, the FT becomes smaller. It can also be seen that the FTs are sine and a sinc for circles and a squares, respectively. For FTs for the Gaussian functions decreases in area with increasing variance (or effectively increasing area).
B. Ridge Enhancement
Using the FT of an image, we can create a filter such that only the high frequencies can pass. This is what we did here. High frequencies in your image correspond to bright areas in your Fourier space. These high frequencies are repetitive in your image. Particularly for a fingerprint, these are the ridges. This is the reason why the particular filter below was used. The following shows the original fingerprint, the enhanced fingerprint, the filter used and the FT of the original image. Notice that in the reconstructed image, the blotches were minimized. they were acutally spread out, thus a more enhanced ridges were obtained. However, there is a downside with this enhancement. The reconstructed image was blurry on other areas. This maybe due to the filtered frequencies that should not be filtered out.
C. Line Removal
For this part, The inverse of part B was done. Here, we actually filtered out the bright areas in the image. This bright areas correspond to the lines you like to remove in the image. We designed a filter such that these high frequencies cannot pass. Indeed, we obtained an image without the lines. Again, the following are the image,its FT, the filter used, and the reconstructed image.
D. Canvas Weave Modeling and Removal
The same technique as that in C is applied here. The repetitive patterns of the canvas weave correspond to high frequencies in the Fourier space. To remove the canvas weave in the image, we designed a filter such that these high frequencies are blocked. In the canvas weave modeling, the filter (only the black dots) used is basically the canvas weave patterns. So taking its inverse FT is like modeling the canvas weave itself. However, results showed that the canvas weave model is angled either 90 or 180 degrees with respect to the original canvas. Results are shown below.
*** To enhance the image properly, make sure that the FT of the image coincides with the filter design. The problem I encountered was I cannot get an enhanced image. This is because my filter did not actually filtered the frequencies I wanted since it did not coincide with the FT of the image.
I give myself an 8/10 for this activity since I am not sure if I did the ridge enhancement properly. Remember that a blurry image was formed.
Thank you to Gary and Gilbert for suggesting to use "imwrite" instead of" imshow" in obtaining the FTs and designing the filters.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment