Professional Documents
Culture Documents
Lecture 27 28 FrequencyDomain 1 5 2023
Lecture 27 28 FrequencyDomain 1 5 2023
• Fast computation
One Dimensional
representation
High frequencies
correspond to pixel
values that change
rapidly across the
image
High frequency
Low frequency
components correspond
to large scale features
in the image
Low frequency
One cycle
Two cycles
Any function that periodically repeats itself can be expressed as a sum of sines and
cosines of different frequencies each multiplied by a different coefficient – a Fourier
series
|C| =
R I
2 2 Magnitude
Ѳ = arctan(I/R) Phase
Based on Euler’s formula,
Transformed Inverse
Image Transformation
1 2
Rotate the image through 30 degrees.
3 4
Get the transformation matrix. Apply inverse
transformation and check the result.
Transformed matrix = 0.64 0.28
3.08 4.44
After inverse transform =
0.869 0.505 0.64 0.28
0.505 0.869 3.08 4.44
Output = 1 2
3 4
Unitary Transformation
Transformation that preserves the inner product: the
inner product of two vectors before the transformation
is equal to their inner product after the transformation.
Orthogonal matrix
Real-valued unitary matrix is also an orthogonal matrix
δ(t) = 0 if t ≠ 0
= Infinity at
t=0
Sifting property and Fourier Transform
Function Fourier
transform
Sampling and Fourier Transform
Continuous
function f(t)
Sampling
Input
Reconstructed
BITS Pilani, Hyderabad Campus
Frequency domain specific filters
Sampling a continuous
function
Sampling increment in the spatial and
frequency domain
x0y0
Inverse DFT
ux vy
M 1N 1 j 2 ( )
1
f ( x, y)
MN u 0 v 0
F (u , v )e M N
2D Rectangular function
V
u=-2, v=2 u=-1, v=2 u=0, v=2 u=1, v=2 u=2, v=2
u=-2, v=1 u=-1, v=1 u=0, v=1 u=1, v=1 u=2, v=1
U
u=-2, v=0 u=-1, v=0 u=0, v=0 u=1, v=0 u=2, v=0
u=-2, v=-1 u=-1, v=-1 u=0, v=-1 u=1, v=-1 u=2, v=-1
u=-2, v=-2 u=-1, v=-2 u=0, v=-2 u=1, v=-2 u=2, v=-2
Note, buv and b-u,-v have similar frequencies but inverted shifts
Visualizing the Fourier Transform Image using Matlab
Routines
• F(u,v) is a Fourier transform of f(x,y) and it has complex entries.
F = fft2(f);
• In order to display the Fourier Spectrum |F(u,v)|
– Reduce dynamic range of |F(u,v)| by displaying the log:
D = log(1+abs(F));
– Cyclically rotate the image so that F(0,0) is in the center:
Example:
D = fftshift(D);
|F(u)| = 100 4 2 1 0 0 1 2 4
Display in Range([0..10]):
log(1+|F(u)|) = 4.62 1.61 1.01 0.69 0 0 0.69 1.01 1.61
log(1+|F(u)|)/0.0462 = 10 4 2 1 0 0 1 2 4
fftshift(log(1+|F(u)|) = 0 1 2 4 10 4 2 1 0
DFT Basis images
Real Imaginary
Original DFT
DFT plot
Properties of DFT
Relationship between spatial and frequency
intervals.
1
u
Mx
1
v
Ny
Where u &v are the sampling
frequency interval
ux vy ux vy
kernel is j 2 ( ) j 2 ( ) j 2 ( )
separable: e N
e N
e N
Translation
f(x,y) F(u,v)
)
N
|F(u)|
|F(u-N/2)|
DFT Properties: Symmetry
but …
1 u v
f (ax by) F ,
ab a b
Average Value
N 1
F (0,0) f ( x, y)
x , y 0