Digital images are now part of our daily life. People can hardly live without it. Therefore, digital image processing becomes more and more important these days. How to increase the resolution of images or reduce noises of images are always hot topics. Fourier Transformation can help us out. We can utilize Fourier Transformation to transform our image information - gray scaled pixels into frequencies and do further process.
Today, I’ll talk about how to utilize Fast Fourier Transformation in digital image processing, and how to implement it in Python. The process flow is as following (from left to right):
- Implement Fast Fourier Transformation to transform gray scaled image into frequency
- Visualize and Centralize zero-frequency component
- Apply low/high pass filter to filter frequencies
- Implement inverse Fast Fourier Transformation to generate image data
Let’s dive into each section to figure out the theory behind theses steps.
Fast Fourier Transformation
Digital images, unlike light wave and sound wave in real life, are discrete because pixels are not continuous. That means we should implement Discrete Fourier Transformation (DFT) instead of Fourier Transformation. However, DFT process is often too slow to be practical. That is the reason why I chose Fast Fourier Transformation (FFT) to do the digital image processing.
Step 1: Compute the 2-dimensional Fast Fourier Transform.
The result from FFT process is a complex number array which is very difficult to visualize directly. Therefore, we have to transform it into 2-dimension space. Here are two ways that we can visualize this FFT result: 1. Spectrum 2. Phase angle.