eee508 transforms part2 - lina karam's...
TRANSCRIPT
![Page 1: eee508 Transforms Part2 - Lina Karam's Homepagelina.faculty.asu.edu/.../eee508_Transforms_Part2.pdfc b a EEE 508 1 0 2N 1-1 2D DCT ¾Now, take DFT of y(n 1, n 2) → note that this](https://reader033.vdocuments.us/reader033/viewer/2022060211/5f04df107e708231d41020cf/html5/thumbnails/1.jpg)
Transforms a s o s
• Transforms that are commonly used are separabley pExamples: Two-dimensional DFT, DCT, DST, HadamardWe can then use 1-D transforms in computing the 2D separable transforms:separable transforms:
Take 1-D transform of the rows => Xrows(K1,K2)Take 1-D transform of columns of Xrows(K1,K2) => X(K1,K2)
EEE 508 1
![Page 2: eee508 Transforms Part2 - Lina Karam's Homepagelina.faculty.asu.edu/.../eee508_Transforms_Part2.pdfc b a EEE 508 1 0 2N 1-1 2D DCT ¾Now, take DFT of y(n 1, n 2) → note that this](https://reader033.vdocuments.us/reader033/viewer/2022060211/5f04df107e708231d41020cf/html5/thumbnails/2.jpg)
The 2D Discrete Fourier Transform (2D DFT)e sc ete ou e a s o ( )
• The DFT consists of samples of the DTFT at( )21,ωωXp ( )21,
( )
( )2
1,,0;211
1
11 1
−==
K
NKNK
K L
π
πω
⇒ periodicity in space (or time) domain (and in frequency domain)
( )1,,0;222
2
22 2
−== NKNK
K Lπω
⇒ sequence x(n1,n2) extended periodically with horizontal period of N1and vertical period of N2
x(n1,n2+ N2) = x(n1,n2)x(n1 + N1,n2) = x(n1,n2)
But, we restrict ourselves to the main period to recover the original signal
EEE 508 1
![Page 3: eee508 Transforms Part2 - Lina Karam's Homepagelina.faculty.asu.edu/.../eee508_Transforms_Part2.pdfc b a EEE 508 1 0 2N 1-1 2D DCT ¾Now, take DFT of y(n 1, n 2) → note that this](https://reader033.vdocuments.us/reader033/viewer/2022060211/5f04df107e708231d41020cf/html5/thumbnails/3.jpg)
2D DFT
. ( ) ( )21DFT
21 ,, KKXnnx ⎯⎯→←
( ) ( ) 10;,,1
0
1
0
22
2121
1
1
2
2
22
21
1
1
−≤≤= ∑∑−
=
−
=
−−
ii
N
n
N
n
nNKjn
NKj
NKeennxKKXππ
( ) ( ) 10;,1,1
0
1
0
22
2121
21
1
1
2
2
22
21
1
1
−≤≤= ∑ ∑−
=
−
=ii
N
K
N
K
nNKjn
NKj
NneeKKXNN
nnxππ
EEE 508 1
![Page 4: eee508 Transforms Part2 - Lina Karam's Homepagelina.faculty.asu.edu/.../eee508_Transforms_Part2.pdfc b a EEE 508 1 0 2N 1-1 2D DCT ¾Now, take DFT of y(n 1, n 2) → note that this](https://reader033.vdocuments.us/reader033/viewer/2022060211/5f04df107e708231d41020cf/html5/thumbnails/4.jpg)
2D DFT
• Unitary DFT (Symmetric Form): y ( y )
( ) ( ) 10;,1,1
0
1
0
22
2121
21
1
1
2
2
22
21
1
1
−≤≤= ∑∑−
=
−
=
−−
ii
N
n
N
n
nNKjn
NKj
NKeennxNN
KKXππ
( ) ( ) 10;,1,1
0
1
0
22
2121
21
1
1
2
2
22
21
1
1
−≤≤= ∑ ∑−
=
−
=ii
N
K
N
K
nNKjn
NKj
NneeKKXNN
nnxππ
( )
( ) ( )
22
2121
22
21
1
1
21
1, eeNN
KKn
NKjn
NKj
nn =Φ−−
ππ
( ) ( )21 21KK nn ΦΦ= ⇒ separable
( ) 2,1;12
==Φ−
ieN
Ki
i
i
i
nNKj
in
π
where
EEE 508 1
( )Ni
i
![Page 5: eee508 Transforms Part2 - Lina Karam's Homepagelina.faculty.asu.edu/.../eee508_Transforms_Part2.pdfc b a EEE 508 1 0 2N 1-1 2D DCT ¾Now, take DFT of y(n 1, n 2) → note that this](https://reader033.vdocuments.us/reader033/viewer/2022060211/5f04df107e708231d41020cf/html5/thumbnails/5.jpg)
2D DFT
Note: ( ) 10;2,2, 1121
21
−≤≤⎟⎟⎞
⎜⎜⎛
=NKKKXKKX ππ( )
10;,,
222121 −≤≤⎟⎟
⎠⎜⎜⎝ NKNN
XKKX c
samples of period between [0 2π) of DTFT
DTFT periodic of period 2π
2D DFT of an image:
[0,2π) of DTFT
N1×N22π (N2) ×1052π (N2)
π2D DFT
πmagnitude
EEE 508 1
0 2π (N1)π
![Page 6: eee508 Transforms Part2 - Lina Karam's Homepagelina.faculty.asu.edu/.../eee508_Transforms_Part2.pdfc b a EEE 508 1 0 2N 1-1 2D DCT ¾Now, take DFT of y(n 1, n 2) → note that this](https://reader033.vdocuments.us/reader033/viewer/2022060211/5f04df107e708231d41020cf/html5/thumbnails/6.jpg)
2D DFT
Note: ( ) 10;2,2, 1121
21
−≤≤⎟⎟⎞
⎜⎜⎛
=NKKKXKKX ππ( )
10;,,
222121 −≤≤⎟⎟
⎠⎜⎜⎝ NKNN
XKKX c
samples of period between [0 2π) of DTFT
DTFT periodic of period 2π
2D DFT of an image:
[0,2π) of DTFT
N1×N22π (N2) ×1052π (N2)
π2D DFT
πmagnitude
2π2π
EEE 508 1
0 2π (N1)π
![Page 7: eee508 Transforms Part2 - Lina Karam's Homepagelina.faculty.asu.edu/.../eee508_Transforms_Part2.pdfc b a EEE 508 1 0 2N 1-1 2D DCT ¾Now, take DFT of y(n 1, n 2) → note that this](https://reader033.vdocuments.us/reader033/viewer/2022060211/5f04df107e708231d41020cf/html5/thumbnails/7.jpg)
2D DFT
For convenience, use the shorthand notation
aN
jaN
Nj
N eWeWππ 22
−−=⇒=
2D DFT Separable ⇒ can use only 1D DFTs
( ) ( )KXnx ↔
( ) ( ) 1,,0;1 1
0−== ∑
−
=
NKWnxN
KXN
n
KnN K
( ) ( ) 1,,0;1 1
0−== ∑
−
=
− NnWKXN
nxN
K
KnN K
EEE 508 1
![Page 8: eee508 Transforms Part2 - Lina Karam's Homepagelina.faculty.asu.edu/.../eee508_Transforms_Part2.pdfc b a EEE 508 1 0 2N 1-1 2D DCT ¾Now, take DFT of y(n 1, n 2) → note that this](https://reader033.vdocuments.us/reader033/viewer/2022060211/5f04df107e708231d41020cf/html5/thumbnails/8.jpg)
2D DFT
• Matrix Representation:
where Fi are Ni×Ni unitary matrices and i=1,221
ˆ XFFX T=
1 ⎪⎫⎪⎧
Ki
But: F symmetric ⇒
2,1;1,0;1=−≤≤
⎪⎭
⎪⎬⎫
⎪⎩
⎪⎨⎧
= iNnKWN iii
nKN
ii
ii
iF
TFF =
ni
But: Fi symmetric ⇒Fi unitary ⇒
⇒
ii FF =**1i
Tii FFF ==−
⎨⎧ =
*21
ˆ XFFX T
Note:
⎩⎨
= *2
*1 XFFX
1,0;12121 −≤≤
⎭⎬⎫
⎩⎨⎧===⇒== NnKW
NNNN Kn
NFFF
EEE 508 1
⎭⎩ N
![Page 9: eee508 Transforms Part2 - Lina Karam's Homepagelina.faculty.asu.edu/.../eee508_Transforms_Part2.pdfc b a EEE 508 1 0 2N 1-1 2D DCT ¾Now, take DFT of y(n 1, n 2) → note that this](https://reader033.vdocuments.us/reader033/viewer/2022060211/5f04df107e708231d41020cf/html5/thumbnails/9.jpg)
2D DFT
• With the DFT, linear shifts and linear convolutions are replaced by circular shifts and circular convolutions
• Circularity is denoted using modulo operator Notation: (n)N = n modulo N( )N
If r = (n)N then 0 ≤ r ≤ N-1Note: (-n)N = (N-n)N
Circular shift:
Circular convolution
( ) ( )( ) ( )2122211 ,, 22
2
11
11KKXWWmnmnx Km
NKm
NNN ↔−−
same as linear convolution but shifting corresponds to circular shift and flipping corresponds to circular reverse (-n)N = N-n
( ) ( ) ( ) ( )2121212121 ,,,, KKHKKXnnhnnx NN ↔×
EEE 508 1
![Page 10: eee508 Transforms Part2 - Lina Karam's Homepagelina.faculty.asu.edu/.../eee508_Transforms_Part2.pdfc b a EEE 508 1 0 2N 1-1 2D DCT ¾Now, take DFT of y(n 1, n 2) → note that this](https://reader033.vdocuments.us/reader033/viewer/2022060211/5f04df107e708231d41020cf/html5/thumbnails/10.jpg)
2D DFT
• Conjugate symmetry for real images
( ) ( ) ( )( ) ( ) ( )( )
( )21 21
*21
21*
2121
,,
,,real,
NN KKXKKX
nnxnnxnnx
−−=⇔
=⇔
( ) ( ) ( )( )21 2211
*21 ,, NN KNKNXKKX −−=⇔
pick the >0 index lying in period 0,…,Ni-1
⎞⎛⎞⎛
22
211
1 2,
2KNKKNK −→−→Replace
2,1;102
,22
,2 2
21
1*2
21
1
=−≤≤
⎟⎠⎞
⎜⎝⎛ ++=⎟
⎠⎞
⎜⎝⎛ −−⇔
iNK
KNKNXKNKNX
ii
EEE 508 1
,;ii
![Page 11: eee508 Transforms Part2 - Lina Karam's Homepagelina.faculty.asu.edu/.../eee508_Transforms_Part2.pdfc b a EEE 508 1 0 2N 1-1 2D DCT ¾Now, take DFT of y(n 1, n 2) → note that this](https://reader033.vdocuments.us/reader033/viewer/2022060211/5f04df107e708231d41020cf/html5/thumbnails/11.jpg)
2D DFT⇒ Conjugate symmetry about ⎟⎟
⎠
⎞⎜⎜⎝
⎛22,
21 NN
N2-1
⇒ ( )2,1 KKXhalf of the coefficients are redundant and need not be stored
⎟⎠⎞
⎜⎝⎛
2,
221 NN
The DFT is a fast transformDFT separable ⇒ Transformation can be performed using (N1+N2) 1D DFTs for an N1×N2 image
N1-10
DFTs for an N1×N2 imageEach 1D DFT of size N requires complex multiplications and adds (CMADs) using an FFT implementation⇒ DFT can be performed in
NN2log
2
( ) tilIf 2 NNONNN ⇒
( )2122121221
DFT columnsmatrix
121
2
DFT rowsmatrix
222
1 loglog2
log2
log2
21
NNNNONNNNNNNNNN
NN
⇒=+44 3442144 344 21
operations
EEE 508 1
( )operationslog If 22
21 NNONNN ⇒==
![Page 12: eee508 Transforms Part2 - Lina Karam's Homepagelina.faculty.asu.edu/.../eee508_Transforms_Part2.pdfc b a EEE 508 1 0 2N 1-1 2D DCT ¾Now, take DFT of y(n 1, n 2) → note that this](https://reader033.vdocuments.us/reader033/viewer/2022060211/5f04df107e708231d41020cf/html5/thumbnails/12.jpg)
The 2D Discrete Cosine Transform (2D DCT)e sc ete Cos e a s o ( C )
• Advantages:Real transform (for real images)Real transform (for real images) Coefficients nearly uncorrelated Excellent Energy Compaction
• There are different types of DCTs but here we are interested in• There are different types of DCTs, but here we are interested in a unitary transform type, where the transformation matrices are such that: C1=C2 ⇒ Type IV
( ) ( ) ⎞⎛⎞⎛1 1N N
( ) ( ) ( ) ( ) ( ) ( )∑∑−
=
−
=⎟⎟⎠
⎞⎜⎜⎝
⎛ +⎟⎟⎠
⎞⎜⎜⎝
⎛ +=
1
0
1
02
2
21
1
122112121DCT
1
1
2
22
12cos2
12cos,,N
n
N
nK
NnK
NnKCKCnnxKKX ππ
01 ⎫⎧ K( ) 2,1;10;
0;2
0;=−≤≤
⎪⎪⎭
⎪⎪⎬
⎫
⎪⎪⎩
⎪⎪⎨
⎧
≠
=
= iNKK
N
KN
KC ii
i
ii
iiwhere
EEE 508 1
⎪⎭⎪⎩ Ni
![Page 13: eee508 Transforms Part2 - Lina Karam's Homepagelina.faculty.asu.edu/.../eee508_Transforms_Part2.pdfc b a EEE 508 1 0 2N 1-1 2D DCT ¾Now, take DFT of y(n 1, n 2) → note that this](https://reader033.vdocuments.us/reader033/viewer/2022060211/5f04df107e708231d41020cf/html5/thumbnails/13.jpg)
2D DCTC
( ) ( ) ( ) ( ) ( ) ( )∑ ∑−
=
−
=⎟⎟⎠
⎞⎜⎜⎝
⎛ +⎟⎟⎠
⎞⎜⎜⎝
⎛ +=
1
0
1
02
2
21
1
1221121DCT21
1
1
2
22
12cos2
12cos,,N
K
N
KK
NnK
NnKCKCKKXnnx ππ
Inverse and Forward DCT are the same DCT separable ⇒ can use 1D transforms
• 2D DCT of an imagegN1×N2
×102π (N2)
2D DCT
magnitude
Note: A real transform only goes half way around the Unit Circle 0 π (N1)
EEE 508 1
y g y
![Page 14: eee508 Transforms Part2 - Lina Karam's Homepagelina.faculty.asu.edu/.../eee508_Transforms_Part2.pdfc b a EEE 508 1 0 2N 1-1 2D DCT ¾Now, take DFT of y(n 1, n 2) → note that this](https://reader033.vdocuments.us/reader033/viewer/2022060211/5f04df107e708231d41020cf/html5/thumbnails/14.jpg)
2D DCTC
( ) ( ) ( ) ( ) ( ) ( )∑ ∑−
=
−
=⎟⎟⎠
⎞⎜⎜⎝
⎛ +⎟⎟⎠
⎞⎜⎜⎝
⎛ +=
1
0
1
02
2
21
1
1221121DCT21
1
1
2
22
12cos2
12cos,,N
K
N
KK
NnK
NnKCKCKKXnnx ππ
Inverse and Forward DCT are the same ⇒ DCT separable ⇒ can use 1D transforms
• 2D DCT of an imagegN1×N2
×102π (N2)
2D DCT
magnitude
Note: A real transform only goes half way around the Unit Circle 0 π (N1)
ππ
EEE 508 1
y g y
![Page 15: eee508 Transforms Part2 - Lina Karam's Homepagelina.faculty.asu.edu/.../eee508_Transforms_Part2.pdfc b a EEE 508 1 0 2N 1-1 2D DCT ¾Now, take DFT of y(n 1, n 2) → note that this](https://reader033.vdocuments.us/reader033/viewer/2022060211/5f04df107e708231d41020cf/html5/thumbnails/15.jpg)
2D DCTC
• Disadvantage:The DCT does not have nice convolution and modulation properties.
• DCT can be related to DFT and computed via FFTs ⇒ DCT related to DFT of symmetric extension of a sequence
⇒ ( ) image. afor neededoperationslog 2121221 NNNNNNO ×
⇒ Fast transform.
( ) gpg 2121221
EEE 508 1
![Page 16: eee508 Transforms Part2 - Lina Karam's Homepagelina.faculty.asu.edu/.../eee508_Transforms_Part2.pdfc b a EEE 508 1 0 2N 1-1 2D DCT ¾Now, take DFT of y(n 1, n 2) → note that this](https://reader033.vdocuments.us/reader033/viewer/2022060211/5f04df107e708231d41020cf/html5/thumbnails/16.jpg)
2D DCTC
• Matrix Representation
1001 ⎫⎧ NK
( ){ }KnCii ,=C
( ) ( ) 2,1;
1011
;2
12cos2
10;0;1
, =
⎪⎪⎭
⎪⎪⎬
⎫
⎪⎪⎩
⎪⎪⎨
⎧
≤≤−≤≤
⎟⎟⎠
⎞⎜⎜⎝
⎛ +
−≤≤=
= i
NnNK
KNn
N
NnKN
KnCi
ii
i πwhere
Ci unitary and real ⇒ Ci orthogonal
102 ⎪⎭⎪⎩ −≤≤⎟⎠
⎜⎝ NnNN iii
Ci real and orthogonal ⇒ C-1 = CT and C = C*
TT
T
**
21
ˆˆ
ˆ
CXCCXCX
XCCX =
EEE 508 1
2121 CXCCXCX ==
![Page 17: eee508 Transforms Part2 - Lina Karam's Homepagelina.faculty.asu.edu/.../eee508_Transforms_Part2.pdfc b a EEE 508 1 0 2N 1-1 2D DCT ¾Now, take DFT of y(n 1, n 2) → note that this](https://reader033.vdocuments.us/reader033/viewer/2022060211/5f04df107e708231d41020cf/html5/thumbnails/17.jpg)
2D DCTC
Note:if N1 = N2 = N ⇒ C1 = C2 = C orthogonal
T XCCX̂ =
• Interpretation of DCT
TCXCX ˆ=
pDFT ⇒ periodic extension of sequencesDCT ⇒ symmetric and periodic extension of sequences (main period symmetric) y )
EEE 508 1
![Page 18: eee508 Transforms Part2 - Lina Karam's Homepagelina.faculty.asu.edu/.../eee508_Transforms_Part2.pdfc b a EEE 508 1 0 2N 1-1 2D DCT ¾Now, take DFT of y(n 1, n 2) → note that this](https://reader033.vdocuments.us/reader033/viewer/2022060211/5f04df107e708231d41020cf/html5/thumbnails/18.jpg)
2D DCTC
• Consider an image
g h I
d e f
N2-1
n2x(n1, n2)
Symmetrically extend image about N1-1 and N2-1 axes
a b cN1-1
n10
n2
2N2-12
y(n1, n2) = x(n1, n2) + x(2N1-1-n1, 2N2-1-n2) + x(2N1-1-n1, n2) + x(n1, 2N2-1-n2)
a b c
d e f
g h i
c b a
f e d
i h gg h i
d e f
a b cn1
i h g
f e d
c b a
EEE 508 1
2N1-1n10
![Page 19: eee508 Transforms Part2 - Lina Karam's Homepagelina.faculty.asu.edu/.../eee508_Transforms_Part2.pdfc b a EEE 508 1 0 2N 1-1 2D DCT ¾Now, take DFT of y(n 1, n 2) → note that this](https://reader033.vdocuments.us/reader033/viewer/2022060211/5f04df107e708231d41020cf/html5/thumbnails/19.jpg)
2D DCTC
Now, take DFT of y(n1, n2) → note that this is a 2N1×2N2 point DFT⇒ DCT can be expressed in terms of DFT⇒ Can use FFT to make a fast DCT implementation with
operations for an N1×N2 image( )21221 log NNNNO• Compare DFT to DCT
N1×N2π (N2)×102N1×N22π (N2)2π (N2)
×105
π
00 2 ( )
EEE 508 1
0 π (N1)0 2π (N1)π
![Page 20: eee508 Transforms Part2 - Lina Karam's Homepagelina.faculty.asu.edu/.../eee508_Transforms_Part2.pdfc b a EEE 508 1 0 2N 1-1 2D DCT ¾Now, take DFT of y(n 1, n 2) → note that this](https://reader033.vdocuments.us/reader033/viewer/2022060211/5f04df107e708231d41020cf/html5/thumbnails/20.jpg)
2D DST (Discrete Sine Transform)S ( sc ete S e a s o )
• Definition:
( ) ( ) ( )( ) ( )( )∑∑−
=
−
=⎟⎟⎠
⎞⎜⎜⎝
⎛++
+⎟⎟⎠
⎞⎜⎜⎝
⎛++
+++=
1
0
1
022
211
121
2121DST
1
1
2
2
111
sin111
sin,1
21
2,ˆN
n
N
nKn
NKn
Nnnx
NNKKX ππ
• Properties similar to DCT (separable, real, fast transform) but also symmetric ⇒ faster transform
⎞⎛( ) ( )( )
( ) T
i
ii
iin
n
iN
KnN
Ki
SS =⇒Φ=
=⎟⎟⎠
⎞⎜⎜⎝
⎛+
+++
=Φ 2,1;1
11sin1
1 π
• Very good energy compaction but less than DCT
( )iK ni
SS =⇒Φ=
EEE 508 1
![Page 21: eee508 Transforms Part2 - Lina Karam's Homepagelina.faculty.asu.edu/.../eee508_Transforms_Part2.pdfc b a EEE 508 1 0 2N 1-1 2D DCT ¾Now, take DFT of y(n 1, n 2) → note that this](https://reader033.vdocuments.us/reader033/viewer/2022060211/5f04df107e708231d41020cf/html5/thumbnails/21.jpg)
2D DSTS
• Inverse and forward transforms are the same
( ) ( ) ( )( ) ( )( )∑∑−
=
−
=⎟⎟⎠
⎞⎜⎜⎝
⎛++
+⎟⎟⎠
⎞⎜⎜⎝
⎛++
+++=
1
0
1
022
211
121DST
2121
1
1
2
2
111
sin111
sin,ˆ1
21
2,N
K
N
KKn
NKn
NKKX
NNnnx ππ
• Matrix representation
2121ˆ XSSXSSX == T S symmetric
21ˆ SXSX = since unitary S1 and S2 real and symmetric
subindex corresponds to n1, K1
subindex corresponds to n2, K2
( ){ } ( ) ( ) 2,1;1,0;111sin
12, =−≤≤⎟⎟
⎠
⎞⎜⎜⎝
⎛+
++
+== iNKnK
Nn
NKnS i
iiii
πSwhere
directions directions
EEE 508 1
![Page 22: eee508 Transforms Part2 - Lina Karam's Homepagelina.faculty.asu.edu/.../eee508_Transforms_Part2.pdfc b a EEE 508 1 0 2N 1-1 2D DCT ¾Now, take DFT of y(n 1, n 2) → note that this](https://reader033.vdocuments.us/reader033/viewer/2022060211/5f04df107e708231d41020cf/html5/thumbnails/22.jpg)
2D Discrete Hadamard Transformsc ete ada a d a s o
Based on a matrix description (Typically defined in terms of a matrix)Very efficient: matrix elements (and thus elements of basis vectors) take only the binary values ±1 ⇒ well-suited for DSP ⇒can be implemented without multiplierscan be implemented without multipliers Symmetric transform
• Definition:F N N i ( ) ith N 2n ( f 2)For an N×N image x(n1,n2) with N = 2n (power of 2)
H is also real and orthogonal ⇒ H -1 = H *T = H T
NnnnnTn 2log;ˆ === XHHXHHX
Hn is also real and orthogonal ⇒ Hn-1 = Hn
T = HnT
where Hn are N×N matrices where N = 2n and usually n=1,2,3 ⇒ work on image blocks of size 2×2 4×4 8×8 respectively
nn HXHX ˆ=
EEE 508 1
image blocks of size 2×2, 4×4, 8×8, respectively
![Page 23: eee508 Transforms Part2 - Lina Karam's Homepagelina.faculty.asu.edu/.../eee508_Transforms_Part2.pdfc b a EEE 508 1 0 2N 1-1 2D DCT ¾Now, take DFT of y(n 1, n 2) → note that this](https://reader033.vdocuments.us/reader033/viewer/2022060211/5f04df107e708231d41020cf/html5/thumbnails/23.jpg)
2D Discrete Hadamard Transformsc ete ada a d a s o
Hn generated using the Kronecker product and the core matrix
⎥⎦
⎤⎢⎣
⎡−
=11
112
11H
by the following recursion
⎥⎦
⎤⎢⎣
⎡−
=⊗=⊗= −−−−
11
111111 2
1 nnnnn HH
HHHHHHH
Example:
⎦⎣ −− 112 nn HH
⎥⎤
⎢⎡ 1111
⎥⎥⎥⎥
⎦⎢⎢⎢⎢
⎣ −−−−−−
=⎥⎦
⎤⎢⎣
⎡−
=
111111111111
21
21
11
112 HH
HHH
EEE 508 1
⎦⎣ 1111
![Page 24: eee508 Transforms Part2 - Lina Karam's Homepagelina.faculty.asu.edu/.../eee508_Transforms_Part2.pdfc b a EEE 508 1 0 2N 1-1 2D DCT ¾Now, take DFT of y(n 1, n 2) → note that this](https://reader033.vdocuments.us/reader033/viewer/2022060211/5f04df107e708231d41020cf/html5/thumbnails/24.jpg)
2D Discrete Hadamard Transformsc ete ada a d a s o
• Frequency interpretationLets look at the 4×4 H2 matrix:
⎥⎤
⎢⎡
11111111
1
low frequency basis vector
hi h f b i t
Sequency = # of sign changes
0
3
⎥⎥⎥⎥
⎦⎢⎢⎢⎢
⎣ −−−−−−
=
111111111111
21
2Hhigh frequency basis vector
mid frequency basis vector
mid frequency basis vector
3
1
2
Recall that for sinusoidal signals, frequency can be defined in terms of zero crossing or sign changes The basis vectors of a Hadamard matrix can be obtained by sampling a class of functions called the Walsh functions which can take only the binary values ±1 and which form a complete orthonormal basis in L2 ⇒ Hadamard transform also called Walsh-Hadamard transform
EEE 508 1
![Page 25: eee508 Transforms Part2 - Lina Karam's Homepagelina.faculty.asu.edu/.../eee508_Transforms_Part2.pdfc b a EEE 508 1 0 2N 1-1 2D DCT ¾Now, take DFT of y(n 1, n 2) → note that this](https://reader033.vdocuments.us/reader033/viewer/2022060211/5f04df107e708231d41020cf/html5/thumbnails/25.jpg)
2D Discrete Hadamard Transformsc ete ada a d a s o
Sequency = number of zero crossings of a Walsh function = transitions (sign changes) in a basis vector of Hn
Generally, we order the basis vectors (row or columns since H=HT) in terms of increasing sequency ⇒ This is called Walsh-ordered H d d T f (if b i t d d)Hadamard Transform (if basis vectors ordered)
⎥⎥⎤
⎢⎢⎡
−− 11111111
1
⎥⎥⎥
⎦⎢⎢⎢
⎣ −−−−
=
111111111111
21
2H
EEE 508 1
![Page 26: eee508 Transforms Part2 - Lina Karam's Homepagelina.faculty.asu.edu/.../eee508_Transforms_Part2.pdfc b a EEE 508 1 0 2N 1-1 2D DCT ¾Now, take DFT of y(n 1, n 2) → note that this](https://reader033.vdocuments.us/reader033/viewer/2022060211/5f04df107e708231d41020cf/html5/thumbnails/26.jpg)
2D Discrete Hadamard Transformsc ete ada a d a s o
• Transform interpretation
Original XH
transformedH⇒
π
N i l ti d d l ti ti b t f t
π0
• No nice convolution and modulation properties, but very fast transform.
• Hadamard expressed in terms of Kronecker products and also t i b i l t d i ( )as sparse matrices ⇒ can be implemented in
additions and subtractions. ( )NNO 2log
EEE 508 1