Thursday, July 14, 2011

seven

We’ve already met Mr. Fourier Transform before (see here).  Now, we get to know him better.  The Fourier Theorem tells us that any images and signals in general can be expressed as a superposition of sinusoids.  In this activity, that was exactly what happened.
 
We first have to look at the Fourier Transforms of different 2-dimensional patterns.  Specifically, we study a square, an annulus, a square annulus, two slits and two dots the last two of which are symmetric along the center and located the x-axis.  Save for the double slits, all of these were hand-made via MS Paint.  I had to generate the double slits through Scilab because, long story short, I should have learned to maximize the figures before declaring that something was wrong.  The code I used to obtain the Fourier Transforms of these patterns used Scilab’s fft2() and fftshift() functions. 
 
a
Figure 1. (A to E) Square, annulus, square annulus,two slits and dots located the x-axis and symmetric along the center and (F to J) their Fourier Transform patterns.
 
From the previous activity, it was seen that patterns with similar original structures will also have similar Fourier Transforms.  That can also be observed here for the square, the annulus and the square annulus. 
 
As I’d previously mentioned, images and signals can be represented through the superposition and/or variation of sinusoids.  Studying the Fourier Transforms of different sinusoids now has renewed importance.  We start with the sinusoids of varying frequencies.  I highly recommend clicking on the image of the Fourier Transforms of these sinusoids to view it properly – unless, of course, you have bionic eyes and, in that case, ignore Figure 4. 
 
b_1_sinusoids
  Figure 2. Sinusoids of frequency (A) 2, (B) 4 and (C) 10 Hz.
 
b_1_fft
Figure 3. Fourier Transforms of sinusoids of frequency (A) 2, (B) 4 and (C) 10 Hz.
 
b_1_fft_close
Figure 4. Close-up shots of the Fourier Transforms of sinusoids of frequency (A) 2, (B) 4 and (C) 10 Hz.
 
For all Fourier Transforms, we see two tiny (and I mean tiny) dots whose separation increases with frequency.  I suppose that these paired dots which are symmetrical along the center are a result of the sine function being odd.  That is, the sinusoids that are being analyzed have negative and positive values.  These two dots represent the positive and negative values of equal magnitudes. 
 
We crash back to reality with the idea that images don’t have negative values and so to keep values positive, we shift these sinusoids by some value.  First, we do this using constants – a.k.a. applying a constant bias.  Mostly because I didn’t realize it was needed, I varied the values of the constant and I got some interesting results.  Basically, the Fourier transform of a constant biased sinusoid yields three dots.  The middle dot is the one that represents the bias.  The greater the bias, the less we see of the sinusoid’s Fourier Transform.
 
b_2_sinusoids
Figure 5. Sinusoids with constant bias of (A) 1, (B) 2 and (C) 3.
 
b_2_fft
Figure 6. Fourier Transforms of sinusoids with constant bias of (A) 1, (B) 2 and (C) 3.
 
b_2_fft_close
Figure 7. Close-up shots of the Fourier Transforms of sinusoids with constant bias of (A) 1, (B) 2 and (C) 3.
 
We now launch ourselves back down to earth and apply an unconstant bias in the form of another sinusoid.  The addition of a constant bias simply adds another pair of dots which you can differentiate from the main sinusoid because it’s amplitude is half of that.
 
b_3_sinusoids
Figure 8. Sinusoids with non-constant bias of half-amplitude sinusoid with frequency of (A) 2 and (B) 10 Hz.
 
b_3_fft
Figure 9. Fourier Transforms of sinusoids with non-constant bias of half-amplitude sinusoid with frequency of (A) 2 and (B) 10 Hz.

b_3_fft_close
Figure 10. Close-up shots of Fourier Transforms of sinusoids with non-constant bias of half-amplitude sinusoid with frequency of (A) 2 and (B) 10 Hz.
 
When sinusoids are rotated by some degree, I found that their Fourier Transforms are rotated with a some “mirror” effect going on.  Also, the greater the rotating angle, the greater the intensity of the dots.
 
b_4_sinusoids
Figure 11. Sinusoids rotated by (A) 30, (B) 45 and (C) 60 degrees.
 
b_4_fft
Figure 12. Fourier Transforms of sinusoids rotated by (A) 30, (B) 45 and (C) 60 degrees.
 
b_4_fft_close
Figure 13. Close-up shots of Fourier Transforms of sinusoids rotated by (A) 30, (B) 45 and (C) 60 degrees.

Finally, I make a checkerboard … err … a sinusoid along the x- and y-axis.  Did I forget to mention that the sinusoids used so far were along the x-direction?  Well, I have now. *evil smile*
 
b_5_sinusoid
Figure 14. Sinusoid along the x- and y-direction.
 
b_5_fft
Figure 15. Fourier Transform of a sinusoid along the x- and y-direction.
 
b_5_fft_close
Figure 16. Close-up shot of the Fourier Transform of a sinusoid along the x- and y-direction.
 
Compared to the previous results, there are now 4 dots present which I somehow expected since the sinusoid was along the x- and y-direction and hence, it would have “dots” that are symmetric along both of these axes.
 
Is it right to give myself a 9.5 for this activity? I was originally planning on giving myself a 9 because I wasn’t able to combine the sinusoid in the x- and y-direction with rotated sinusoids.  However.  I realized that I investigated a few properties that weren’t asked for as well.  That has to count for something right?
 
Credits to Mr. Kirby Cheng and Mr. James Pang because they gave me the idea of making image layouts in MS Paint (they use PowerPoint but the idea is the same) before placing it on my blog. 
 
SUPPLEMENTARY INFORMATION
 
Once again, I omitted the first few lines because they were just used to change the directory and the stacksize but here’s the code I used for the sinusoid-related items.
 
code
Figure S1. Scilab code used for the study of the Fourier Transforms of sinusoids.

REFERENCES

Activity 7 – Properties of the 2D Fourier Transform, Applied Physics 186 Manual

No comments:

Post a Comment