Before anything else let us familiarize the Fourier Transforms of some 2D patterns (left) namely a square, an annulus or donut, a square annulus, two slits, and two dots along the x-axis that are symmetric about the center which are shown below together with their corresponding FTs (right) shown in Figure 1.
Now we investigate the anamorphic property of the Fourier Transform through the investigation of the superposition and rotation of sinusoids and their FTS in relation to the FT of different 2D patterns.
We create a 100x100 sinusoid with frequency f = (1, 4, 16) and get the modulus of its Fourier Transform. The images in Figure 2 show the produced 2D sinusoids (upper row) and their corresponding FTs (lower row) with increasing frequency values from left to right. The Fourier Transform of a 2D sinusoid results to an image with a peak at the frequency (+f or -f) of the said sinusoid thus we see two points along the axis of the sinusoid and symmetric from the center which is f = 0. As the frequency increases, the distances between the two points increases as expected. Code is taken from the AP186 Activity 6 sheet.
We create a 100x100 sinusoid with frequency f = (1, 4, 16) and get the modulus of its Fourier Transform. The images in Figure 2 show the produced 2D sinusoids (upper row) and their corresponding FTs (lower row) with increasing frequency values from left to right. The Fourier Transform of a 2D sinusoid results to an image with a peak at the frequency (+f or -f) of the said sinusoid thus we see two points along the axis of the sinusoid and symmetric from the center which is f = 0. As the frequency increases, the distances between the two points increases as expected. Code is taken from the AP186 Activity 6 sheet.
nx = 100; ny = 100;
x = linspace(-1,1,nx);
y = linspace(-1,1,ny);
[X,Y] = ndgrid(x,y);
f = 1; //frequency
z = sin(2*%pi*f*X);
imshow(z, []);
x = linspace(-1,1,nx);
y = linspace(-1,1,ny);
[X,Y] = ndgrid(x,y);
f = 1; //frequency
z = sin(2*%pi*f*X);
imshow(z, []);
Figure 3 shows how the Fourier Transform of the resulting sinusoids would look like if a constant bias (upper row) or another sinusoid of low frequency (lower row) is added to the original sinusoids shown in Figure 2. The frequency order is the same as in Figure 2.
Figure 3. Fourier Transform of a sinusoid with a constant bias (upper row) or with an added low frequency sinusoid (lower row.)
Adding a constant bias to the original sinusoids resulted to the addition of a peak (which is the bias) at f = 0 to the respective Fourier Transforms of the sinusoids. If another sinusoid is added to a sinusoid the FT will show the frequencies of the two sinusoids like if a sinusoid with f=4 is added with a sinusoid with f=1 then their FT will show a peak at f=4 and f=1.
Rotating the sinusoids will also rotate their FTs as shown in Figure 4 for theta = 30, 45, and 60. Then we combine these rotated sinusoids to make patterns.
Now if we combine a sinusoid running in the x direction with another running in the y direction by addition or multiplication we get patterns as shown by Figure 5 below. Their FTs are just the superposition of their individual FTs. The code that generated these combinations are the following:
z_sum = sin(2*%pi*4*X) + sin(2*%pi*4*Y);
z_prod = sin(2*%pi*4*X) * sin(2*%pi*4*Y);
z_prod2 = sin(2*%pi*4*X). * sin(2*%pi*4*Y);
z_prod = sin(2*%pi*4*X) * sin(2*%pi*4*Y);
z_prod2 = sin(2*%pi*4*X). * sin(2*%pi*4*Y);
If we add series of arbitrary rotated sinusoids to the patterns in Figure 5 we get patterns that looks like twisted checkered patterns as shown in Figure 6 below. The FTs of the patterns below is the same as the predicted results except for the matrix multiplication (middle row) where its FT is the same as the original pattern. It can be observed that the pattern itself has little deviation from the original pattern. As for the addition and the element by element multiplication, their FTs is the same as predicted which will be again, a superposition of the FTs of the original pattern and the added rotated patterns. If the added rotated sinusoids have rotations that scan from 0 t0 90 degrees in small increments then we expect a circle to form in the FT of that image which is partially shown by the FTs for the addition and the element by element multiplication.
Very nice. Gives good insight into FTs
ReplyDeletethanks. this can be found in digital image processing books.
ReplyDeletehey thanks! i liked it!
ReplyDeletecool! thanks :)
Delete