Saturday, July 11, 2009

A6 PROPERTIES OF THE 2D TRANSFORM

In A5 we familiarized ourselves with the 2D transform. In this activity we take a more in depth look at some of the properties of the 2D transform.


A6A Familiarization with FT of Different 2D Patterns


The FT of a 2D image will give us the resulting diffraction pattern for an aperture of the same shape. It is therefore important to familiarize ourselves with the FT of some common 2D patterns.


Annulus


The FT of an annulus looks like the FT of a circle (Airy disk) with some of the fringes missing.



Figure 1


Square


Mathematically, the FT of a square are sync functions along the x and y axes. This can be seen below.




Figure 2


Square Annulus


The FT is similar to that of the square, but with some fringes missing.




Figure 3

Two Slits

This is actually a simulation of Thompson Young’s Double slit experiment, and our results agree with the experimental results.



Figure 4


Two Dots


The FT looks like that of the circle but with vertical fringes due to destructive interference from the signals coming from the two dots.


Figure 5


The 2D patterns are generated in Scilab using the following code


/////// 6A

x = [-1:0.01:1];

[X,Y] = meshgrid(x);

/////////// annulus

r = sqrt(X.^2 + Y.^2);

annulus = zeros(size(X,1), size(X,2));

annulus(find (r <=0.3 & r>=0.2)) = 1.0;

////// square

square= zeros(size(X,1), size(X,2));

square(find(abs(X)<=0.4 & abs(Y) <=0.4 ))=1.0;

////// square annulus

square2=square;

square2(find(abs(X)<=0.25 & abs(Y) <=0.25 ))=0.0;

//////slits

slits= zeros(size(X,1), size(X,2));

slits(find(abs(X)>=0.47 & abs(X) <=0.5 ))=1.0;

//////dots

r1 = sqrt((X-0.5).^2 + Y.^2); r2 = sqrt((X+0.5).^2 + Y.^2);

dots = zeros(size(X,1), size(X,2));

dots(find (r1 <=0.05 )) = 1.0; dots(find (r2 <=0.05 )) = 1.0;

image=dots;

subplot(1,2,1);

imshow(image,[]);

subplot(1,2,2);

imshow(fftshift(abs(fft2(image))),[]);


A6B Anamorphic Property of the Fourier Transform


The FT of a sinusoid is two peaks located at its positive and negative frequency values. Increasing the frequency therefore makes the peaks farther apart. We can also say that because the spacing between dark and light bands becomes narrower, since the FT is in inverse space, the spacing between the peaks will be wider. This is shown in the images below. The images in the first row are the sinusoids while those below are the FTs.



Figure 6

Real digital images do not have negative values. Therefore if we want to simulate a digital image, we must add a constant bias to our sinusoids.


Figure 7

The results of the FTs when bias is added to the sinusoid are shown above. As we can see, no matter what the constant bias, its FT will always be a peak in the origin. So to find the frequency of the sinusoid we just have to ignore the central frequency.


The same is true when the bias is a sinusoid with very low frequencies. We already demonstrated above that the lower the frequencies, the closer to the origin the peaks will be. The image below is the FT of a sinusoid with frequency = 4 with a sinusoid bias of frequency = 0.25. The peaks of the original sinusoid are unchanged; however, there are now to extra peaks very close to the origin and almost looking like the single peak of the constant bias. Therefore to find the original frequencies we also just ignore the central and “almost” central frequencies.


Figure 8

In the 2D FT a rotation of the sinusoids results to a rotation in the FTs. This is shown below. The sinusoid is rotated from 0˚ to 45˚ to 90º to 135º.




Next we created a pattern of sinusoids in x and y using the following formula

sine = sin(2*%pi*4*X).*sin(2*%pi*4*Y). The resulting pattern and FT are shown below.



Figure 10

We then added several rotated sinusoids to this pattern and predict the FT. Knowing that the FT has the property of linearity, we can predict that adding the sinusoids from Figure 9 to the sinusoid in Figure 10 will result to just the superposition of their FTs. Taking the actual FTs, we indeeed had correct predictions.

Figure 11

Then just for fun, I tried adding all the sinusoids together.



Figure 12


In this activity, I understood all that I did so I give myself a grade of 10.

No comments:

Post a Comment