Discrete Wavelet Transform on image compression

Download Report

Transcript Discrete Wavelet Transform on image compression

DISCRETE WAVELET TRANSFORM
ON IMAGE COMPRESSION
Presenter : r98942058 余芝融
EE lab.530
1
Overview






Introduction to image compression
Wavelet transform concepts
Subband Coding
Haar Wavelet
Embedded Zerotree Coder
References
EE lab.530
2
Introduction to image compression
 Why image compression?
 Ex: 3504X2336 (full color) image :
3504X2336 x24/8 = 24,556,032 Byte
= 23.418 Mbyte
 Objective
Reduce the redundancy of the image data
in order to be able to store or transmit data
in an efficient form.
EE lab.530
3
Introduction to image compression
 For human eyes, the image will still seems to
be the same even when the Compression
ratio is equal 10
 Human eyes are less sensitive to those high
frequency signals
 Our eyes will average fine details within the
small area and record only the overall
intensity of the area, which is regarded as a
lowpass filter.
EE lab.530
4
Quick Review
 Fourier Transform

F ( )   f (t )e j t dt

 Does not give access to the signal’s spectral
variations
 To circumvent the lack of locality in time
→STFT
EE lab.530
5
Quick Review
 The time-frequency plane for STFT is uniform
Constant resolution
at all frequencies
EE lab.530
6
Continuous Wavelet Transform
 FT &STFT use “wave” to analyze signal
 WT use “wavelet of finite energy” to analyze
signal
 Signal to be analyzed is multiplied to a
wavelet function, the transform is computed
for each segment.
 The width changes with each spectral
component
EE lab.530
7
Continuous Wavelet Transform
 Wavelet: finite interval function with zero
mean(suited to analysis transient signals)
 Utilize the combination of wavelets(basis func.)
to analyze arbitrary function
 Mother wavelet Ψ(t):by scaling and translating
the mother wavelet, we can obtain the rest of
the function for the transformation(child
wavelet, Ψa,b(t))
1
t b
 a ,b (t ) 
(
)
a
a
EE lab.530
8
Continuous Wavelet Transform
 Performing the inner product of the child
wavelet and f(t), we can attain the wavelet
coefficient

wa ,b   a ,b , f (t )    a ,b f (t )dt

 We can reconstruct f(t) with the wavelet
coefficient by
1
f (t ) 
C


dadb
  wa,b a,b (t ) a 2
EE lab.530
9
Continuous Wavelet Transform
 Adaptive signal analysis
-At higher frequency , the window is narrow,
value of a must be small
 The time-frequency plane for WT(Heisenberg)
multi-resolution
diff. freq.
analyze with diff.
resolution
EE lab.530
10
window
 Low freq.
 High freq.
a
large
small
EE lab.530
11
Gaussian Window for S-Transform
High Frequency
Time Shifted
Low Frequency
EE lab.530
SKC-2009
12
Discrete Wavelet Transform
 Advantage over CWT: reduce the computational
complexity(separate into H & L freq.)
 Inner product of f(t)and discrete parameters a & b
a  a0m , b  nb0a0m
m,n  Z
 If a0=2,b0=1, the set of the wavelet
 m,n (t )  a  (a t - nb0 )
m/2
0
m
0
m, n  Z
 m,n (t )  2  (2 t - n)
m/2
m
EE lab.530
13
Discrete Wavelet Transform
 The DWT coefficient
wm,n  f (t ), m,n (t )  a0m / 2  f (t ) (a0m (t )  nb0 )dt
 We can reconstruct f(t) with the wavelet
coefficient by
f (t )   wm,n m,n (t )
m
n
EE lab.530
14
Subband Coding
EE lab.530
15
WT compression
EE lab.530
16
2-point Haar Wavelet(oldest & simplest)
g[n] = 1/2 for n = −1, 0
h[0] = 1/2, h[−1] = −1/2,
g[n] = 0 otherwise
h[n] = 0 otherwise
g[n]
½
½
-3
-1
0
-2
½
h[n]
1
2
3 n
-3
-2
-1
0
1
2
3 n
-½
then
x1, L  n 
x  2n  x  2n  1
2
(Average of 2-point)
x1, H  n 
x  2n  x  2n  1
2
(difference of 2-point)
EE lab.530
17
Haar Transform
 2-steps
1.Separate Horizontally
2. Separate Vertically
EE lab.530
18
2-Dimension(analysis)
Approximatio
n
Horizontal
Edge
Vertical
Edge
Diagonal
EE lab.530
19
Haar Transform
Step 1:
A
B
C
D
A+B C+D
L
A-B
C-D
H
(0,0) (0,1) (0,2) (0,3)
(0,0) (0,1) (0,2) (0,3)
(1,0) (1,1) (1,2) (1,3)
(1,0) (1,1) (1,2) (1,3)
(2,0) (2,1) (2,2) (2,3)
(2,0) (2,1) (2,2) (2,3)
(3,0) (3,1) (3,2) (3,3)
(3,0) (3,1) (3,2) (3,3)
EE lab.530
20
Haar Transform
Step 2:
A
C
B
D
A+B
C+D
LL
A-B
L
H
HL
C-D
LH
HH
LL
HL
(0,0) (0,1) (0,2) (0,3)
(0,0) (0,1) (0,2) (0,3)
(1,0) (1,1) (1,2) (1,3)
(1,0) (1,1) (1,2) (1,3)
(2,0) (2,1) (2,2) (2,3)
(2,0) (2,1) (2,2) (2,3)
(3,0) (3,1) (3,2) (3,3)
(3,0) (3,1) (3,2) (3,3)
L
H
LH
EE lab.530
HH
21
LL1
HL1
LH1
HH1
LL2
LH2 HH2
LH1
First level
Most important
part of the image
HL2
HL1
HH1
Second level
LL3
HL3
LH3
HH3
LH2
HL2
HL1
HH2
LH1
HH1
Third level
EE lab.530
22
Example:
20
15
30
20
35
50
5
10
17
16
31
22
33
53
1
9
15
18
17
25
33
42
-3
-8
21
22
19
18
43
37
-1
1
1st horizontal separation
Original image O
68
103
6
19
326
-38
6
19
76
79
-4
-7
16
-32
2
-7
2
-3
4
1
2
-3
4
1
-10
5
-2
-9
-10
5
-2
-9
1st vertical separation
2nd level DWT result
EE lab.530
23
Original
Image
LL
HL
LH
HH
EE lab.530
24
LL2 HL2
HL
LH2 HH2
LH
LL3
HL3
HH
HL2
LH3 HH3
HL
LH2 HH2
LH
EE lab.530
HH
25
Embedded Zerotree Wavelet Coder
EE lab.530
26
Structure of EZW
 Root: a
 Descendants: a1, a2, a3
…
EE lab.530
27
3-level Quantizer(Dominant)
sp
sn
EE lab.530
28
EZW Scanning Order
LL3
LH3
HL3
HL2
HH3
HL1
LH2
HH2
LH1
HH1
scan order of the transmission band
EE lab.530
29
EZW Scanning Order
scan order of the transmission coefficient
EE lab.530
30
Scanning Order
sp: significant positive
sn: significant negative
zr: zerotree root
is: isolated zero
EE lab.530
31
Example:
 Get the maximum
coefficient=26
 Initial threshold :
T0  2
log2 2 6
 16
1. 26>16 →sp
2. 6<16 & 13,10,6, 4 all less than 16→zr
3. -7<16 & 4,-4, 2,-2 all less than 16→zr
4. 7<16 & 4,-3, 2, 0 all less than 16→zr
EE lab.530
32
 Each symbol needs 2-bit: 8 bits
 The significant coefficient is 26,
thus put it into the refinement
label : Ls= {26}
 To reconstruct the coefficient: 1.5T0=24
 Difference:26-24=2
 Threshold for the 2-level
quantizer: T0 / 4  4
 The new reconstructed value:
24+4=28
EE lab.530
33
2-level Quantizer(For Refinement)
EE lab.530
34
 New Threshold: T1=8
 iz zr zr sp sp iz iz→14-bit
EE lab.530
35
Important feature of EZW
 It’s possible to stop the compression
algorithm at any time and obtain an
approximate of the original image
 The compression is a series of decision, the
same algorithm can be run at the decoder to
reconstruct the coefficients, but according to
the incoming but stream.
EE lab.530
36
References
[1] C.Gargour,M.Gabrea,V.Ramachandran,J.M.Lina, ”A short introduction to
wavelets and their applications,” Circuits and Systems Magazine, IEEE, Vol. 9,
No. 2. (05 June 2009), pp. 57-68.
[2] R. C. Gonzales and R. E. Woods, Digital Image Processing. Reading, MA,
Addison-Wesley, 1992.
[3] NancyA. Breaux and Chee-Hung Henry Chu,” Wavelet methods for
compression, rendering, and descreening in digital halftoning,” SPIE
proceedings series, vol. 3078, pp. 656-667, 1997 .
[4] M. Barlaud et al., "Image Coding Using Wavelet Transform" IEEE Trans. on
Image Processing 1, No. 2, 205-220 (April, 1992).
[5] J. M. Shapiro, “Embedded image coding using zerotrees of wavelet
coefficients,” IEEE Trans. Acous., Speech, Signal Processing, vol. 41, no. 12,
pp. 3445-3462, Dec. 1993.
EE lab.530
37