This project implements image processing in the frequency domain using the Discrete Fourier Transform (DFT) with Python and Tkinter.
- Discrete Fourier Transform (DFT)
- Inverse DFT (image reconstruction)
- Amplitude spectrum visualization
- Circular filtering (low-pass / high-pass)
- Mean filter (frequency domain)
- Gaussian filter (frequency domain)
The image is transformed to the frequency domain using fft2, then centered with fftshift.
Filtering is applied by multiplying the frequency representation with a mask, and the final image is reconstructed using ifft2.
-
Frequency domain representation
-
Circular masks for filtering
-
Convolution theorem:
TF(image × filter) = TF(image) × TF(filter)
Keeps low frequencies and removes high frequencies, producing a smoother image.
Keeps high frequencies to enhance edges and fine details.
Filters are created as masks and applied in the frequency domain.
pip install numpy pillow matplotlib
python dft-image-processing.py