cs654: digital image analysis lecture 15: image transforms with real basis functions
TRANSCRIPT
CS654: Digital Image Analysis
Lecture 15: Image Transforms with Real Basis Functions
Recap of Lecture 14
• Discrete Fourier Transform
• Orthogonal sinusoidal waveform
• Computational complexity is high
• Involves complex multiplication
Outline of Lecture 15
• Basis function with real (Integer) values
• Hadamard Transform
• Haar Transform
• KL Transform
Hadamard Transform
• Real, orthogonal, symmetric
• Elements of the basis vectors are
• Hadamard transformation matrix
𝐻1=1√2 [1 1
1 −1 ]𝑁=2𝑛 ,𝑛=1 ,2,3 ,…
Core matrix
Generation of transformation matrix
• Using Kronecker product recursion
𝐻𝑛=𝐻𝑛− 1⨂𝐻1
𝐻2=𝐻1⨂𝐻1
Example
¿ 12 [1 11 −1]⨂ [1 1
1 −1]
¿ 12 [[1 11 −1] [1 1
1 −1][1 11 −1] −[1 1
1 −1] ]𝐻𝑛=
1√2 [𝐻𝑛− 1 𝐻𝑛− 1
𝐻𝑛− 1 −𝐻𝑛−1]
𝑛=log 2𝑁
Unitary Hadamard Transform
• General unitary transformation equation
• Using Hadamard transform
𝑣=𝐴𝑢
𝑢=𝐴∗𝑇 𝑣
Forward transformation
Inverse transformation
𝑣=𝐻𝑢
𝑢=𝐻∗𝑇𝑣=𝐻𝑣
Forward transformation
Inverse transformation
Dimension of ?
What happens in case of images?
Summation expression
𝑣 (𝑘 )= 1√ 𝑁 ∑
𝑚=0
𝑁−1
𝑢 (𝑚)(−1 )𝑏(𝑘 ,𝑚),0≤𝑘≤𝑁−1Forward transformation
𝑢 (𝑚 )= 1√𝑁 ∑
𝑘=0
𝑁 −1
𝑣 (𝑘)(−1 )𝑏(𝑘 ,𝑚),0≤𝑚≤𝑁−1Inverse transformation
Binary representation of
𝑘=𝑘020+𝑘12
1+…+𝑘𝑛−12𝑛−1
𝑚=𝑚020+𝑚12
1+…+𝑚𝑛−12𝑛−1
LSB, MSB ?
𝑏 (𝑘 ,𝑚 )=∑𝑖=0
𝑛− 1
𝑘𝑖𝑚𝑖
Properties of Hadamard Transformation
𝐻3=1√8 [
1 1 1 1 1 1 1 11 −1 1 −1 1 −1 1 −11 1 −1 −1 1 1 −1 −11 −1 −1 1 1 −1 −1 11 1 1 1 −1 −1 −1 −11 −1 1 −1 −1 1 −1 11 1 −1 −1 −1 −1 1 11 −1 −1 1 −1 1 1 −1
]Sequency
0
7
3
4
1
6
2
5
Natural Ordering vs. Sequency Ordering
Natural Order (h)
Binary Gray of s Sequency
Binary Sequency
(s)
0 000 000 0
1 001 111 7
2 010 011 3
3 011 100 4
4 100 001 1
5 101 110 6
6 110 010 2
7 111 101 5
000
100
010
110
001
101
011
111
Natural order of the Hadamard transform coefficients = bit reversed gray code representation of its sequency
Haar Transform
• Haar functions , is defined for and
• The order of the function is uniquely decomposed into two integers
𝑘=2𝑝+𝑞−1
Where,
for
for
Haar Function
• Representing by , the Haar functions are defined as:
h0 (𝑥 )=h0,0 (𝑥 )= 1√𝑁
,𝑥∈[0,1]
h𝑘 (𝑥 )=h𝑝 ,𝑞 (𝑥 )= 1√ 𝑁 { 2
𝑝2 ,𝑞−12𝑝
≤𝑥<𝑞− 1
22𝑝
−2𝑝2 ,𝑞− 1
22𝑝
≤𝑥< 𝑞2𝑝
0 , h𝑜𝑡 𝑒𝑟𝑤𝑖𝑠𝑒 𝑓𝑜𝑟 𝑥∈[0,1]
takes discrete values at
Haar Basis Function Computation
Determine the order of N
Determine
Determine
Determine
Determine the sequence
Calculate the Haar function
Example: Haar basis for
𝑛=log 22=1
𝑝=0 ;𝑞=0𝑜𝑟 1
𝒙=𝟎𝟐,𝟏𝟐
Haar Basis Function Computation
Case 1:
h0 (𝑥 )=h0,0 (𝑥 )= 1√2,𝑥∈[0,1]
Case 2:
For
For 𝑘
𝑛
𝑘
𝑛𝑘𝑛
Haar basis for N=2
KL Transform
• Exploits the statistical properties of an image
• Basis functions are orthogonal Eigen vectors of the covariance matrix
• Optimally de-correlates the input data
• Energy compaction
• Input dependent, and high computational complexity
Eigen analysis
Let, be a vector of random variables
Auto-correlation matrix 𝐸 [�⃗� �⃗�∗𝑇 ]
: Eigen values of
: Eigen vectors of
KL Transform of is defined as: �⃗�=𝚽∗𝑻 �⃗�
Inverse Transform is defined as: �⃗�=𝚽 �⃗�= ∑𝒌=𝟎
𝑵 −𝟏
𝒗 (𝒌 ) �⃗�𝒌
𝑅𝜙𝑘=𝜆𝑘𝜙𝑘 0≤𝑘≤𝑁−1
𝚽∗𝑻 𝑹𝚽=𝚲=𝑫𝒊𝒂𝒈 {𝝀𝒌}
Thank youNext Lecture: Convolution and Correlation