Why do we need this
- seperate smooth regions from details
- detect discrete repeated patterns
- remove periodic noise
- accelerate large-kernel filtering
- ease of identifying and modifying images via frequecy for some images
Spatial frequency

- it identifies how fast intensity changes
- low frequency: slow intensity variation
- high frequency: rapid intensity variation
- Spatial frequency is commonly measured in cycles per unit distance or cycles per image
Frequencies in images

Low frequency: illumination, background, large shapes
High frequency: edges, texture, fine details, noise
Fourier transform
Basis Fourier Pattern
- any spatial image can be built using single bright pixel impulses
- that was called Spatial Impulse Basis,
- the same spatial image can also be built by a Fourier Pattern
- which is a full-screen 2D sinusoidal wave of stripes that spans across the entire image frame
- this is called Basis Fourier Pattern, ,which is just a different basis function
flowchart LR A[Types of Basis Functions] --> B(1. Spatial Impulse Basis) A[Types of Basis Functions] --> C(2. Basis Fourier Pattern)
- Basis Functions are the fundamental representation of a 2D spatial image
The above equation represents a Basis Fourier Pattern:
- controls horizontal variation
- controls vertical variation
- amplitude controls strength
- phase controls alignments
Forward and inverse transform
Fourier Transform:
Inverse Fourier Transform:
where:
- : spatial image
- : frequency representation
- : spatial frequencies
| Name / Pattern | Spatial Domain | Frequency Domain |
|---|---|---|
| Impulse | ||
| Gaussian | ||
| Rectangle | ||
| Cosine | ||
| Sine |
Magnitude and phase
Polar to rectangular
Real Part ():
Imaginary Part ():
Magnitude Spectrum ():
Phase Spectrum ():
Log magnitude
- we need to use log magnitude since the dynamic range is too large to display using basic magnitude
My Own Understanding of Frequency Domain from an Image in Spatial Domain
Basically we have an image in spatial domain. It has size .
Looking at the formula: , this is the fourier basis pattern which is used for the fourier transform of the image from spatial domain to frequency domain.
Now, we have 2 ways to use this formula.
- First is by subbing in a fixed spatial point . When we substitute a fixed spatial point, we will get which gives us every possible basis patterns at that particular point .
- Next, we can also sub in a fixed frequency point . This gives us 1 specific fourier basis pattern.
Note how we will get a total of number of basis patterns/complex 2-dimensional sinusoid. Its complex because:
It contains the cosine pattern as its real part and a sine pattern as its imaginary part. Each unique frequency coordinate gives a sinusoid with a specific frequency and orientation.