We can enhance or filter out unwanted frequencies of an image by removing them in the Fourier map and then reapplying the transform to obtain the final image.
Note: The reconstructed images are180 degrees rotated (with respect to the original) due to the FT.
8A. Convolution Theorem
Figure 1. L-R Two-dot binary image and it's FT.
Fig. 1 is an example of how the FT of a FT of an image would revert back to the original image. If we reverse the image labels (i.e. if we take the right image as the original one), one can remember that the 2 dots are representative of the quantitative value of the frequency on the original image.
Figure 2. R-L: Dots were replaced with circles of increasing radii. Top-Bottom: Original image and its FT.
Fig. 2 shows that as the circles were increased, the overall size of its FT diminishes. Why? This is because of the now 2D nature of our image. As the circles increase in size, this is interpreted in a Fourier-sense that a more constant and non-repetitive image is being generated. We can note that the black lines in the FT are remnants of the 1D layout (the center of the circles are still on the x-axis) and the concentric light bands are the 2D components of the circles.
Figure 3. R-L: Dots were replaced with squares of increasing areas. Top-Bottom: Original image and its FT.
Fig. 3 shows a similar behavior as Fig. 2. The shape of the squares are reflected in its FT.
Figure 4. R-L: FT of circles with Gaussian intensity distribution (increasing variance)
Just as with Fig. 2, as the size of the Gaussian circles increase, the radius of the resulting FT pattern decreases. However, due to the the distribution of the intensity, the resulting FT also has a less distinct concentricity.
Figure 5. Convolution of 10 randomly placed dots and a random 3x3 matrix
Fig. 5 uses convolution. This image is not very different from the original image. The only difference is that the dots became broader. The 3x3 matrix appeared to have been transposed to the dot locations, as noticeable from the convolution of a function f(x) with a dirac-delta.
Eq. 1 shows that as the convolution causes f(t) to appear on the previous location of the dirac-delta. Fig. 5 has white dots (1 pixel in size) that are considered dirac-deltas. So the result of imconv() reflects the 3x3 mask on the location of the 10 random dots.
Figure 6. L-R: FT of equally spaced white pixels. (5, 10, 50, 100 & 200 pixel separation on both x and y axis, respectively)
Fig. 6 further cements our first-hand experience that the FT is in frequency space. As the "wavelength" is increased, the frequency decreases, so the magnitude of the separation of the dots in the corresponding FT decreases, too.
8B. Ridge Enhancement
This time, I will do a more practical application of Fourier map knowledge. Since fingerprints have a repetitive structure, filtering in the Fourier map may enhance their images.
Figure 7. L-R: My own fingerprint and it's FT
From Fig. 7, we can see that there are a lot of noise on the radial extreme of the FT. A prominent halo can be distinguished in the middle (with the DC term on the origin). I tried to blacken out the noisy parts and retain the middle parts, and this is what I got:
Figure 7. L-R: Filtered FT (top) and their respective reconstructed images (bottom)
Fig. 7 shows how the filtering of signal in the Fourier map affects the quality of the reconstructed image. When the mask covers the "halo" signal, the reconstructed image suffers a poor quality; the ridges become indistinguishable. The leftmost filter works well, however, the clarity could have been better had I removed the DC component (middle spot)
8C. Line Removal
Now, let's try some more basic filtering: line removal.
Figure 7. Top: FTs of original image (left) and it's filtered form (right) Bottom: Corresponding reconstructed images
Fig. 7 shows the results of line removal. The lines ultimately became less accented. The position is based my previous work with FTs. If the pattern persists in a certain dimension, it would also be in the Fourier map. As such, the lines were along the image's x-axis, as such the FT had reflections on its x-axis, too.
8D. Weave Removal
Finally, let's do masking for 2D signals.
Figure 8. Top: FTs of original image (left) and it's filtered form (right) Bottom: Corresponding reconstructed images
Similar to Fig. 7, filtering removed the blotch patterns of the original image. Note that the presence of the peaks on the FT that has x & y components signify some angled patterns. These can be thought of the collection of the individual x & y patterns viewed at a certain angle. Comparing this with Fig. 7, we see that since the weave pattern has is 2D repetitive, there are bright spots on the x & y axis of the FT image. Thus, blocking these signals and those that has has both x & y components improves our reconstructed image.
To further illustrate that these are indeed the FT components of the weave pattern, I have reconstructed the mask using FT:
Figure 9. Top-Bottom: Mask and its FT
Fig. 9 shows the inverted mask and its FT. The mask was inverted because the original was meant to block out the signals. Inverting it would approximate a FT that has peaks at the once "masking" areas. The FT clearly reveals that it is indeed the weave pattern as seen in Fig. 8.
This activity has again increased my insight on the nature of FTs and their possible applications.
Self-Assessment: 10/10
No comments:
Post a Comment