WT Lecture 8
WT Lecture 8
WT Lecture 8
=
) , ( ), , ( ) , (
) , ( ) , ( ) , (
j y i x s y x f j i a
j y i x s j i a y x f
o
i j
o o
||
||
) ( ) ( ) , ( y x y x s
=
2D-DWT
Just like in 1D we generated an approximation of the 2D function
f(x,y). Now, how do we compute the detail lost in approximating
this function?
Unlike 1D case there will be three functions representing the
details lost:
Details lost along the horizontal direction
Details lost along the vertical direction
Details lost along the diagonal direction
1D Two sets of coeff.; a(k,n) & d (k,n)
2D Four sets of coefficients: a(k,n), b(k, n), c(k, n) & d(k,n)
Four Faces of 2D-DWT
One level of 2D DWT reconstruction:
(
) ) ( ) ( ) , (
) ( ) ( ) , (
) ( ) ( ) , (
) ( ) ( ) , ( ) , (
1
n x n x p n d
n x n x p n c
n x n x p n b
n x n x p n a y x f
o
o
o
n p
o
+
+
+
=
|
|
| |
Approximation coefficients
Detail coefficients along
the horizontal direction
Detail coefficients along
the vertical direction
Detail coefficients along
the diagonal direction
Implementation of 2D-DWT
INPUT
IMAGE
R
O
W
S
COLUMNS
H
~
2 1
G
~
2 1
H
~
1 2
G
~
1 2
H
~
1 2
G
~
1 2
ROWS
ROWS
COLUMNS
COLUMNS
COLUMNS
LL
LH
HL
HH
) (
1
h
k
D
+
) (
1
v
k
D
+
) (
1
d
k
D
+
1 + k
A
INPUT
IMAGE
LL
LH
HL
HH
LL
LH
HL
HH
LHH
LLH
LHL
LLL
LH
HL
HH
LHH
LLH
LHL
Up and Down Up and Down
2 1
Downsample columns along the rows: For each row, keep the
even indexed columns, discard the odd indexed columns
1 2
Downsample columns along the rows: For each column, keep the
even indexed rows, discard the odd indexed rows
2 1
1 2
Upsample columns along the rows: For each row, insert zeros at
between every other sample (column)
Upsample rows along the columns: For each column, insert zeros
at between every other sample (row)
Implementing 2D-DWT
Decomposition
ROW i
C
O
L
U
M
N
j
Reconstruction
) (
1
h
k
D
+
) (
1
v
k
D
+
) (
1
d
k
D
+
1 + k
A
1 2
1 2
1 2
1 2
H
G
H
G
2 1
2 1
H
G
ORIGINAL
IMAGE
LL
LH
HL
HH
2-D DWT ON MATLAB
Load
Image
(must be
.mat file)
Choose
wavelet type
Hit
Analyze
Choose
display
options