Image frequency analysis, edge detection, and compression
A photo is a signal too, just spread across two directions. Break it into striped wave patterns and you get the tool behind JPEG files and MRI scans.
The Fourier transform extends naturally to 2D signals like images. Every image can be decomposed into 2D sinusoidal patterns at different frequencies and orientations.
This is the foundation of JPEG compression, MRI imaging, edge detection, and countless other image processing techniques.
The 2D FFT is computed by applying 1D FFTs first to all rows, then to all columns (or vice versa):
Low Frequencies (Center): Represent smooth regions, gradual color changes, and the overall brightness of the image.
High Frequencies (Edges): Represent sharp edges, fine details, and rapid changes in pixel values.
The 2D magnitude spectrum shows:
Example: An image with strong horizontal lines will show bright spots along the vertical axis in its spectrum, because horizontal lines create vertical spatial frequencies.
JPEG Compression: Uses DCT (a variant of Fourier) to represent images efficiently by discarding high frequencies humans don't notice.
Edge Detection: High-pass filtering in frequency domain enhances edges by keeping only high-frequency components.
MRI Imaging: MRI machines directly measure the Fourier transform of tissue. The inverse FFT reconstructs the image.
Watermarking: Hidden watermarks can be embedded in the frequency domain, invisible but detectable.
Image filters (blur, sharpen, emboss) work by convolving with a kernel. Using the FFT, we can apply any filter size efficiently:
This is how Photoshop applies large-radius Gaussian blur instantly!
Spot a mistake or have an idea?