Upload
juniper-hardy
View
232
Download
1
Tags:
Embed Size (px)
Citation preview
Haar Wavelets
A first look
Ref: Walker (ch1)
Jyun-Ming Chen, Spring 2001
Introduction
• Simplest; hand calculation suffice
• A prototype for studying more sophisticated wavelets
• Related to Haar transform, a mathematical operation
Haar Transform
• Assume discrete signal (analog function occurring at discrete instants)
• Assume equally spaced samples (number of samples 2n)
• Decompose the signal into two sub-signals of half its length– Running average (trend)
– Running difference (fluctuation)
2c 2d
• Running difference
• Denoted by:
– Meaning of superscript explained later
Haar transform, 1-level
• Running average
• Multiplication by is needed to ensure energy conservation (see later)
2
mc
Example
2c
2d
Inverse Transform
2c 2d
c c c c
Small Fluctuation Feature
• Magnitudes of the fluctuation subsignal (d) are often significantly smaller than those of the original signal
• Logical: samples are from continuous analog signal with very short time increment
• Has application to signal compression
2c 2d
Energy Concerns
• Energy of signals
• The 1-level Haar transform conserves energy2c 2d
2c
2d
Proof of Energy Conservation
c
c
c c
Haar Transform, multi-level2c
1c
2c
1d
1c 2d1d
1d 2d0d0c
1d2d0d
0c2c 1cf
• Compare with 1-level
• Can be seen more clearly by cumulative energy profile
Compaction of Energy
1c
0c
Cumulative Energy Profile
• Definition
Algebraic Operations
• Addition & subtraction• Constant multiple• Scalar product
Haar Wavelets
• 1-level Haar wavelets– “wavelet”: plus/minus
wavy nature
– Translated copy of mother wavelet
– support of wavelet =2 • The interval where func
tion is nonzero
2
2
2
2
2
Property 1. If a signal f is (approximately) constant over the support of a Haar wavelet, then the fluctuation value is (approximately) zero.
2
2
2
2c
Haar Scaling Functions
• 1-level scaling functions
• Graph: translated copy of father scaling function
• Support = 2
Haar Wavelets (cont)
• 2-level Haar scaling functions
• support = 4
• 2-level Haar wavelets• support = 4
1
1
1
1 1 11
1
1
1
1 1 11c
Multiresolution Analysis (MRA)
Natural basis:
Therefore:
3
3
3
3 3 3
MRAc c c c c c
)(d)(cf 22 xx cc c c c c
c c c
)(c2 x
2 2 2)(c2 x
2 2 2
)(d2 x
)(d2 x
2 2 2 2 2 2
2 2 2 2 2 2)(d2 x)(c2 x
),,,(c 2/212
Nccc ),,,(d 2/21
2Nddd
Note: the coefficient vectors
MRA
01
01
0 )( VVfc If do it all the way through,representing the average of all data
)(d)(c)(c
)(d)(cf112
22
xxx
xx
nn- Nxxx 2 where)(d)(d)(cf 100
)(c1 x 1 1 1 1 1 1
1 1 1 1 1 1)(d1 x
Example
1d 2c 2d1c
)(c1 x
)(d1 x
)(c2 x
)(d2 x
2c2c 2d
2 2 2 2
2 2 2 2
)(c2 x
)(d2 x
Example (cont)
24
23
22
21
12
11
01
01 02222622214
)5,5,6,8,12,10,6,4(
WWWWWWWV
f
)2
1,
2
1,
2
1,
2
1,0,0,0,0(
)0,0,0,0,2
1,
2
1,
2
1,
2
1(
)22
1,
22
1,
22
1,
22
1,
22
1,
22
1,
22
1,
22
1(
)22
1,
22
1,
22
1,
22
1,
22
1,
22
1,
22
1,
22
1(
12
11
01
01
W
W
W
V
)2
1,
2
1,0,0,0,0,0,0(
)0,0,2
1,
2
1,0,0,0,0(
)0,0,0,0,2
1,
2
1,0,0(
)0,0,0,0,0,0,2
1,
2
1(
24
23
22
21
W
W
W
W
1d 2c 2d0c 0d
Decomposition coefficients obtained by inner product with basis function
Haar MRA
0c1c2c3c4c
5c6c7c8c
)(xf
More on Scaling Functions (Haar)
• They are in fact related
• Pj is called the synthesis filter (more later)
2
2
2
1
1
1
case 8for )22
1,
22
1,
22
1,
22
1,
22
1,
22
1,
22
1,
22
1(V0
8/ NN
jjj PVV 1
Ex: Haar Scaling Functions
1
1
1
1
1
1
1
1
2
1
1
1
1
1
1
1
1
1
21
21
21
21
21
21
21
21
SynthesisFilter P3
Ex: Haar Scaling Functions
1
1
1
1
2
1
21
21
21
21
21
21
21
21
21
21
21
21
21
21
21
21
SynthesisFilter P2
1
1
2
1
21
21
21
21
21
21
21
21
221
221
221
221
221
221
221
221
SynthesisFilter P1
More on Wavelets (Haar)• They are in fact relate
d
• Qj is called the synthesis filter (more later)
1
1
1
2
2
2
case 8for )22
1,
22
1,
22
1,
22
1,
22
1,
22
1,
22
1,
22
1(W0
8/
NN
jjj QVW 1
Ex: Haar Wavelets
1
1
1
1
1
1
1
1
2
1
1
1
1
1
1
1
1
1
21
21
21
21
21
21
21
21
SynthesisFilter Q3
1
1
2
1
21
21
21
21
21
21
21
21
221
221
221
221
221
221
221
221
Ex: Haar Wavelets
SynthesisFilter Q2
1
1
1
1
2
1
21
21
21
21
21
21
21
21
21
21
21
21
21
21
21
21
SynthesisFilter Q1
Analysis Filters
• There is another set of matrices that are related to the computation of analysis/decomposition coefficient
• In the Haar case, they are the transpose of each other
• Later we’ll show that this is a property unique to orthogonal wavelets
Analysis/Decomposition (Haar)
5
5
6
8
12
10
6
4
11
11
11
11
2
1
25
27
211
25
25
27
211
25
11
11
2
1
12
16
12
1611
2
1214
5
5
6
8
12
10
6
4
11
11
11
11
2
1
0
2
2
2
25
27
211
25
11
11
2
1
2
6
12
1611
2
122
AnalysisFilter Aj
AnalysisFilter Bj
A3
A2
A1B3
B2
B1
Synthesis Filters
• On the other hand, synthesis filters have to do with reconstructing the signal from MRA results
Synthesis/Reconstruction (Haar)
SynthesisFilter Pj
SynthesisFilter Qj
0
2
2
2
1
1
1
1
1
1
1
1
2
1
55
27
211
25
1
1
1
1
1
1
1
1
2
1
5
5
6
8
12
10
6
4 Q3P3
2
6
1
1
1
1
2
1
12
16
1
1
1
1
2
1
55
27
211
25
Q2P2
221
1
2
1214
1
1
2
1
12
16
Q1P1
Conclusion/Exercise
Haar (N=8) j=3 j=2 j=1 j=0In general
N=2n
support 1 2 4 8 2n-j
translation 1 2 4 8 2n-j