MODULE I Image Transforms 1
MODULE I Image Transforms 1
Date: 19/2/2024
Outline
00 Background
01 1D Fourier Transform
02 2D Fourier Transform
03 Properties of 2D Fourier
Transform
04 Hadamard Transform
05 Walsch Transform
Signals in Image
Signals in Image
Signals in Image
1 cycle
Sinusoids
2𝜋 duration
Sinusoids
Here value of
𝜔 𝑖𝑠 1, A is 1, 𝜑 𝑖𝑠 0
Sinusoids
Here value of
𝜔 𝑖𝑠 1, A is 1, 𝜑 𝑖𝑠 0
wave frequency
There is a DC component wave with
0 frequency and high amplitude for a
signal that has mean amplitude as
non- zero.
Image vs Sinusoid
Image vs Fourier Transform
High Frequency and Low Frequency
Imaginary axis
Csinθ
• In vector representation:
θ
real axis
r=Ccosθ
g=Csinθ
|C|= 𝒓2 + 𝒈2 =>C= |C|(cosθ+ isinθ)
Complex plane
Complex Numbers
• Using Euler’s formula
Imaginary axis
Ccosθ (r,g)
Csinθ
θ
real axis
Complex Numbers
• Using Euler’s formula
Imaginary axis
• In vector representation: Ccosθ (r,g)
Csinθ
→ C= |C|(cosθ+ isinθ)
θ
real axis
replace
→ C= |C| 𝒆iθ
• FT-1 =>
∞
𝑓(𝒙) = −∞ 𝐹(ω)𝒆𝑖𝝎𝒙 𝑑ω
∞
𝑓(𝒙) = −∞ 𝐹(𝒖)𝒆2𝑖𝜋𝒖𝒙 𝑑𝒖
1D Fourier Transform
@Michaelmas 2014
02
2D Fourier Transform
2D Fourier Transform
• FT =>
∞ ∞
F(u,v)= −∞ −∞ 𝑓(𝒙, 𝒚) 𝒆−𝑖𝟐𝜋(𝒖𝒙+𝒗𝒚) 𝑑𝒙 𝑑𝒚
• FT-1 =>
∞ ∞
𝑓(𝒙, 𝒚)= −∞ −∞ 𝑭(u,v) 𝒆𝑖𝟐𝜋(𝒖𝒙+𝒗𝒚) 𝑑𝒖 𝑑𝒗
2D Fourier Transform
f(x,y)= f(x,y) F(u,v)
@Michaelmas 2014
Spectrum
Components in 2D Transform
03
Properties of 2D Fourier
Transform
Properties of 2D Fourier Transform
• Linearity
• Scaling
• Separability
• Differentiation
• Convolution
• Shift Operation
• Conjugate Symmetry
∞ ∞
FT ⇒ F(u,v)= −∞ −∞ 𝑓(𝒙, 𝒚) 𝒆−𝑖𝟐𝜋(𝒖𝒙+𝒗𝒚) 𝑑𝒙 𝑑𝒚
Linearity
❑ It is an essential characteristic that simplifies the analysis and
processing of signals and images.
For two functions f1(x,y) and f2(x,y), and we have two constants a
and b,
5x 7x
+
S(u,v)=FT(s(x,y))
Linearity
f1(x,y) F1(u,v) 5xF1(u,v)
f2(x,y) F2(u,v) +
5xF1(u,v)+ 7xF2(u,v)
7xF2(u,v)
Linearity
R.H.S=>
FT(f1(x,y))=
FT(f2(x,y))=
F1(u,v)=
F2(u,v)=
=
Linearity
R.H.S=>
5.FT(f1(x,y))=> 5. =
7.FT(f2(x,y))=> 7. =
=> +
Linearity
L.H.S=>
Let s(x,y)=5. f1(x,y)+7. f2(x,y)
FT(s(x,y))= 5. + 7.
Linearity
L.H.S=>
Let s(x,y)=5. f1(x,y)+7. f2(x,y)
FT(s(x,y))= 5. + 7.
S(u,v)= +14.
= +
L.H.S=R.H.S
Scaling
❑ It refers to how changes in the spatial domain affect the
frequency domain, and vice versa.
1 𝑢 𝑣
FT(f1(a𝑥, b𝑦))= (F( , ))
𝑎 |𝑏| 𝑎 𝑏
⇒ if f(x,y)=f1(x)f2(y) then,
Let f(x,y) be
If f(xy) is separable
Here,
G(u)=
H(v)=
• F(u,v)=G(u).H(v)= .
Separability
Next let us take
then,
Original image
Separability
FT along Y-axis
Original image
Separability
F(u) F(v)
F(u,v)
Separability
Directly computing FT
of 2D image
ⅆ
• FT( 𝑓(𝑥, 𝑦))=i 𝑥 F(u,v)
ⅆ𝑥
ⅆ
• FT( 𝑓(𝑥, 𝑦))=i y F(u,v)
ⅆ𝑦
⇒ f x, y ∗ h x, y = F(u,v) H(u,v)
Convolution
Shift Operation
❑ It indicates how a shift in the function of spatial domain
corresponds to a phase shift in the frequency domain.
⇒ F(u,v)=F(-u,-v)
Example:
Should be equal
FT(f(x,y)=
Given, F(u,v) = +
Now, let us shift our spatial co-ordinates to the left by a value 10.
Therefore,
= e-i20𝜋𝑢 .[ + ]
04
HadamardTransform
Hadamard Transform
❑ The Hadamard transform is used for transforming signals with
sharp transitions or sparse characteristics.
A scaling factor might be applied on the result in cases where we need to ensure
the transformation is orthogonal( often 1/C for 1D and 1/C2 for 2D).
Hadamard Transform
❑ Hn matrix is orthogonal,
HT. H = H. HT=I
x=[x0,x1,x2,….xc-1]
→
❑ Inverse:
→ 𝑥cx1=Hcxc-1x y cx1
=Hcxcxycx1
Hadamard Transform
❑ 2D H-transform
1
→ [H x𝑋 xH T]
𝑐 2 cxc 𝑐𝑥𝑐 cxc
→ Hcxc is a symmetric matrix, hence its transpose will be
the same.
→ Here, ycxc =Hcxcx𝑋𝑐𝑥𝑐xHcxc
❑ Inverse transform:
→ 𝑋cxc=Hcxcx ycxc xHcxc
05
WalshTransform
Walsh Transform
❑ It is a special case of Hadamard kernel.
❑ Then we will reorder the rows in the matrix, in such a way that
the successive row has higher number of sign-change count.
H4=
Thank You