A script for analyzing discrete Fourier transforms of images.
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.


Build Status


image-dft is a script (written in Python 3) which computes and displays the inverse DFTs of the magnitude and phase components of the DFT of an input image. It implements the algorithm described here.


All code from this project is licensed under the GPLv3. See the LICENSE file for more information.

Required modules

The following modules are used:

  • matplotlib
  • numpy
  • scipy

You can install them with the following command:

pip3 install matplotlib numpy scipy

On Ubuntu/Debian, you may need to install the python3-tk package as well with the following command:

sudo apt install python3-tk

Usage instructions

The script can be executed as in the following example:

./image-dft -i image.jpg

To enhance the contrast of the generated images (with histogram equalization), add -e to the command above. Here is an example of the displayed output (with histogram equalization enabled):

example output

For more details on the parameters which image-dft can take, run ./image-dft -h.

Contributors & contact information

Diego Assencio / diego@assencio.com