Homework #7: Fourier Transform (2D)

Christopher Smemoe , Computer Science 450


Table of Contents

1. Simple sines and cosines

2. Addition

3. Rotation

4. Multiplication

5. Magnitude and Phase

The source code for the 2d fourier transform for this project is located here. For adding two images is here. For multiplying two images is here. For creating a sinusoidal image is here.

 


1. Simple sines and cosines

Make a two-dimensional image that is a sinusoid in one direction and constant in the other: f[x,y]=sin(2 pi f x / N)

Apply the Fourier Transform to this image and display the Magnitude part of the result. Explain.

The original 2D image with a sinusoid in the x-direction

The magnitude of the Fourier transform. This image occurs since there are two separate frequency values that show up at a minimum and maximum end of the frequency spectrum. One high-end frequency value shows up as a single bright pixel.

Return to the Table of Contents

 

2. Addition

Create another two-dimensional image, again with a sinusoid in one direction and constant in the other, only swap the two directions: f[x,y]=sin(2 pi f y / N). Choose different values for the frequencies in x and y.

For each of the images, display the image and magnitude part of its Fourier Transform.

Original 2D image with sinusoid in the y-direction

Magnitude of Fourier transform of the image.

Add the two images together.

Display the magnitude part of the Fourier Transform of the sum and explain.

Sum of the above two images.

Fourier transform of the sum of the two images.

Return to the Table of Contents

 

3. Rotation

Using the image from B that is the sum of a sinusoid in one direction and a sinusoid in the other, rotate the image and display the result.

Display the magnitude part of the Fourier Transform of the rotated image and explain.

Fourier transform of the sum of the two images. This remains the same as above because the Fourier transform remains the same when the image is rotated.

Return to the Table of Contents

 

4. Multiplication

Do the same thing as in part B, except multiply the two images instead of adding them.

Multiplication of the two sinusoidal images.

Fourier transform of the multiplication of the two sinusoidal images. This result occurs because the magnitude of the signal changes in the y-direction.

Explain why you get this result.

See above.

Return to the Table of Contents

 

5. Magnitude and Phase

Using the "ball.pgm" and "gull.pgm" images,

Compute the Fourier Transform of each image.

Extract the magnitude and phase parts of each.

Original image

Magnitude

Phase

Pair the magnitude of one image with the phase of the other and vice versa.

Invert both (magnitude, phase) pairs and display the results.

Inverse of magnitude

Inverse of phase

The images you see now have the magnitude from one image and the phase from the other. Which of the two inputs does each most look like?

The top image looks more like the gull image, while the bottom image looks more like the ball.

Return to the Table of Contents

 


smemoe@byu.edu
Date last modified: 11/4/1999