top of page

The Discrete Fourier Transform

The plots each function and their corresponding plots of the amplitudes of the functions after calculating their Fourier coefficients are as follows:


ree

ree

ree

Here are the corresponding fourier coefficients:

This plot is from calculating the amplitude of the Fourier coefficients using a built-in function in a python package.


ree

While this plot is from calculating the coefficients and creating the same plots without the built-in function. We can see that the two plots are almost similar which means that the implementation of calculating the Fourier coefficients was correct.


ree

Now when we plot this with different granularity or with different k value. The plots would look like this.


ree

The red dots area from the python calculation while the two others are for different values of dk at 0.01 and 1.

Part 2.

The created 128 x 128 pixel, 8-bit (256 gray-level) synthetic image of a white circle on a black background.


ree

Find its Fourier transform and display its absolute value or amplitude (abs() or numpy.abs()). The first plot created almost looks like a blank so we get an nth root of 0.1 to see the details much more clearly.


ree

Apply the function fftshift() (MSO) / scipy.fftpack.fftshift() to your Fourier transformed image and observe the result. After applying the function to the original image we see that it resulted to a single dot at the center.



ree

Apply fft2() again on your non-shifted function (or alternatively, you can apply fft2() to your original image two times). After applying fft2() we are now back with our original image.



ree

The Fourier transform of a function is complex. Show this by displaying the real and imaginary parts of your FFT image, replacing abs with real or imag. Below are the real and imaginary parts of your FFT image respectively, again the nth root of 0.1 is used to see the details more clearly.


ree


 
 
 

Comments


bottom of page