CS 7321 Winter 1998

PS#2 Solutions by Gabriel J. Brostow

Images & Spatial Properties


Index


How I solved it

  1. Read in the image of 3 vertical stripes:
    1. Decided to threshold them to get a nice binary image.
  2. Took Fast Fourier Transform (fft) in 2D.
  3. Then I obtained and plotted the Log's of the Power Spectrum:
    1. squared the real and imaginary components of the fft (separately)
    2. "imshow'd" the log of the abs() of the log of the Power Spectrum Image.
  4. I next repeated the above steps for one low-pass and one high-pass image:
    1. The high-pass image was obtained by AND'ing its Fourier Transform with a fftshifted image of a black circle which served as a mask - blocking out all the low-frequency components of the image.
    2. The high-pass image was then rotated by 30 deg. (and cropped back to original size) - resulting in a Fourier Transform that was also rotated by 30 deg. from its normal orientation (perpendicular to all 3 bars).
    3. The low-pass image was obtained in the same way as the high-pass, but the inverse of the same mask was used instead.
    4. The low-pass image was processed in the same way as the original image, and then zoomed in - to show more detail where the low-frequency information had concentrated.
to TOP


Assumptions and Weaknesses

I made the following assumptions
  1. Assumed: Power Spectrum = (real value of each pixel of fftImage)^2 + (imaginary value of each pixel of fftImage)^2
  2. Approximated: I threw away the imaginary components of images which I obtained using ifft2.
  3. Weakness: meaningful-looking Fourier-Transform images were obtained empirically: log(abs(log( fftImage))) was a guess.
I think the major weakness of my solutions is:
  1. Algorithm isn't very useful in current form: Except for obtaining orientation information, results are obtained only after "tweaking" of mask sizes and power-spectrum logs.

to TOP


Results

 

Image 1

Figure 1: Original image and the log of its Power Spectrum.

 
 
Figure 2: Rotated (by 30 deg.) high-pass image and the log of its Power Spectrum.

 

Figure 3: Low-Pass image, the log of its Power Spectrum, and a zoomed version of the Power Spectrum.

to TOP


Source Code