Skip to content

Performs the Discrete Fourier Transform on an image to generate plots of the Magnitude and Phase spectrum of the original image. Also performs the Inverse Fast Fourier Transform and generates a plot showing the original image and the image restored from IFFT.

Notifications You must be signed in to change notification settings

jeneese/image-dft-ifft

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 

Repository files navigation

Discrete Fourier Transform and Inverse Discrete Fourier Transform of an Image

This Python script performs the Discrete Fourier Transform on an image by applying a Fast Fourier Transform on each row of an image followed by each column to generate plots of the Magnitude and Phase spectrum of the original image. Then, the script performs the Inverse Fast Fourier Transform by taking the complex conjugate of the image, performing the DFT, and taking the real component of the complex conjugate to generate plots of the original image and the image restored by IFFT.

Installation

Use the package manager pip to install Opencv, Numpy and Matplotlib

pip install opencv-python
pip install numpy
pip install matplotlib

Usage

After running the program in Python, one prompt will appear.

Type the path with file extension of the image file you'd like to test:

Enter an absolute or relative path for your image.

The program will then begin to evaluate the image and generate a magnitude and phase spectrum plot. After the first plot is closed, a second plot will be displayed of the original image and the image generated using IFFT.

About

Performs the Discrete Fourier Transform on an image to generate plots of the Magnitude and Phase spectrum of the original image. Also performs the Inverse Fast Fourier Transform and generates a plot showing the original image and the image restored from IFFT.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages