Wavelet Transform A Presentation By Subash Chandra Nayak 01EC3010 IIT Kharagpur INDIA.
-
Upload
hailey-thompson -
Category
Documents
-
view
220 -
download
2
Transcript of Wavelet Transform A Presentation By Subash Chandra Nayak 01EC3010 IIT Kharagpur INDIA.
Wavelet Transform A Presentation
By Subash Chandra Nayak01EC3010
IIT Kharagpur INDIA
Introduction to the world of transform
• What are transforms :-
• A mathematical operation that takes a function or sequence and maps into another one
• General Form :-
• Examples :-
Laplace, Fourier, DTFT, DFT, FFT, z-transform
dwxwKwFxf ),()()(
j
iijFKjf
Fourier Transform
dfefXtx
dtetxfX
ftj
ftj
2
2
)()(
)()(
Mathematical Form :-
Notes :- Fourier transform identifies all spectral components present in the signal, however it does not provide any information regarding the temporal (time) localization of the components
Fourier Transform :: Limitations
• Signals are of two types
# Stationary
# Non – Stationary
• Non stationary signals are those who have got time varying spectral components ... FT gives only provides the existence of the spectral components of the signal ... But does not provide any information on the time occurrence of spectral components
• Explanation
The basis function e-jwt stretches to infinity , Hence only analyzes the signal globally
In order to obtain time-localization of spectral components , the signal need to be analyzed locally
Time – Frequency Representation
• Instantaneous frequency :-Instantaneous frequency :-
• Group delay :-Group delay :-
• Disadvantages of above expressionsDisadvantages of above expressions
These equations though have a huge theoretical significance but are not easy to implement easily
)(2
1)( tx
df
dtf x
)(2
1)( fX
df
dftx
Short-time Fourier Transform
• Also known as a STFT
• given as
• w(t) :- windowing function generally a Gaussian pulse is used, other choices are rectangular , elliptic etc..
• Maps 1D function to 2D time-frequency domain
• Advantages :-
# Gives us time-frequency description of the signal
# Overcomes the difficulties of Fourier transform by use of windowing functions
dtetwtxwSTFT jwt
t
wx
)]()([),(
STFT :: Disadvantages• Heisenberg Principle :-Heisenberg Principle :- One can not get infinite time and
frequency resolution beyond Heisenberg’s Limit
• Trade offs :-Trade offs :-• Wider window
Good frequency resolution , Poor time resolution
• Narrower window
Good time resolution , Poor frequency resolution
4
1. ft
Wavelet Transform
• Overcomes the shortcoming of STFT by using variable length windows :: i.e. Narrower window for high frequency thereby giving better time resolution and Wider window at low frequency thereby giving better frequency resolution
• Heisenberg’s Principle still holds
• Mathematical form:-
where x(t) = given signal tau = translation parameter s = scaling parameter = 1/f phi(t) = Mother wavelet , All kernels are obtained by scaling
and/or translating mother wavelet
dts
ttx
sssCWT
t
x )(*)(||
1),(),(
Continuous Wavelet transform
• The kernel functions used in wavelet transform are all obtained from one prototype function known as mother wavelet , by scaling and/or translating it
• Here
a = scale parameter
b = translation parameter
• Continuous Wavelet transform
)(1
)(, a
bt
atba
)()(0,1 tt
dtttxa
baW ba )()(1
),( ,
CWT (Contd..)
• In order to become a wavelet a function must satisfy the above two conditions
dtt
dtt
2|)(|
0)(
Inverse wavelet transform
0)(
||
|)(|
)(),(11
)( ,2
dtt
provided
dww
wC
where
dadbtbaWaC
tx ba
Examples of wavelets
Constant Q-filtering
• CWT can be rewritten as
• A special property of the above filter defined by the mother wavelet is that they are Constant-Q filters
• Q factor = Center frequency/Bandwidth• Hence the filter defined by wavelet increases their Bandwidth
as scale increases ( i.e. center frequency increases )• This boils down to filter bank implementation of discrete
wavelet transform
)(*)(),( *0, bbxbaW a
Filter Banks :: General Structure
• Condition for Perfect Reconstruction
delayl
zHzFzHzF
zzHzFzHzF l
0)()()()(
2)()()()(
1100
1100
Filter bank (Contd..)
• Product filter
Now let’s define product filter as :-
P0(z) = F0(z)H0(z)
And Normalized Product filter as
P(z) = zL P0(z) where L = delay in total process
So the PR condition boils down to this realationship
P(z) – P(-z) = 2
Harr Filter Bank
Note that f0(n) and f1(n) are non-causal ... Hence here Unit delay is required to implement it hence here
L = 1
Product filter
P(w) is said to be halfband filter because of its symmetry Also
P(w) + P(w + pi) = 2
Product filter II
• P(w) should be as flat as possible around 0 and pi . The more is the flatness of P(w) around 0 and pi the better the Product filter is . Hence P(w) is always tried to be designed as a MAXFLAT Filter
• Order of filter :: p
p = (L+1)/2 ; L = number of delay elements• Methods of determination of P(z)
# Duabechies method
# Meyer methods• Both of the above methods give us P(z) for a given order “p” .
The higher is the order the better is the filter but at the same time it will require more hardware complexity
Spectral factorization
• The spectral factorization is the problem of finding h0(z) once P(z) is known
• Linear Phase Factorization
H0(z) and F0(z) are of different degree. Gives filter with linear phase
• Orthogonal Factorization
H0(z) and F0(z) are of same degree. Gives filter with non-linear phase. Daubechies family of filters belongs to this category. For orthogonal filter
)()(
)()(
)()1()(
11
00
01
nNhnf
nNhnf
nNhnh n
For orthogonal
filter
Discrete wavelet Transform
• Discrete domain counterpart of CWT
• Implemented using Filter banks satisfying PR condition
• Represents the given signal by discrete coefficients {dk,n}
• DWT is given by
)2(2)( 2, ntt knk
k
1||)(|| , tnk
dtttxxd
tdtx
nknknk
nkk n
nk
)()(,
)()(
*,,,
,,
Scaling Function
• These are functions used to approximate the signal up to a particular level of detail
• For Harr System
Harr Scaling Function10
1)(
t
t
)2(2)( 2, ntt knk
k
Refinement equation and wavelet Equation
• Refinement equation is an equation relating to scaling function and filter coefficients
• Wavelet equation is an equation relating to wavelet function and filter coefficients
• By solving the above two we can obtain the scaling and wavelet function for a given filter bank structure
Refinement Equation
Wavelet Equation
N
k
ktkht0
0 )2(][2)(
N
k
ktkht0
0 )2(][2)(
DWT Implementation
g`[n]
h`[n]
2
2 g`[n]
h`[n]
2
2
2
2
g[n]
h[n]
+
2
2
g[n]
h[n]
+
a(k,n)
d(k+1,n)
a(k+1,n)
a(k+2,n)
d(k+2,n)
a(k+1,n)
a(k,n)
Decomposition Reconstruction
We have only shown the above implementation for the Haar Wavelet, however, as we willsee later, this implementation – subband coding – is applicable in general.
DWT Sub-band Decomposition
x[n] Length: 512B: 0 ~
g[n] h[n]
g[n] h[n]
g[n] h[n]
2
d1: Level 1 DWTCoeff.
Length: 256B: 0 ~ /2 Hz
Length: 256B: /2 ~ Hz
Length: 128B: 0 ~ /4 HzLength: 128
B: /4 ~ /2 Hz
d2: Level 2 DWTCoeff.
d3: Level 3 DWTCoeff.
…….
Length: 64B: 0 ~ /8 HzLength: 64
B: /8 ~ /4 Hz
2
2 2
22
|H(jw)|
w/2-/2
|G(jw)|
w- /2-/2
Sub-band coding
Some Important properties of wavelets
• Compact Support :-• Finite duration wavelets are called compactly supported in time
domain but are not band-limited in frequency. Can be implemented using FIR filters
• Examples
Harr, Daubechies, Symlets , Coiflets • Narrow band wavelets are called compactly supported in
frequency domain. Can be implemented using IIR filters• Examples
Meyer’s wavelet
Some Important properties of wavelets
• Symmetry
• Symmetric / Antisymetric wavelets have got liner-phase
• Orthogonal wavelets are asymmetric and have a non-linear phase
• Biorthogonal wavelets are asymmetric but have got linear phase can be implemented using FIR filters
• Vanishing Moment
• pth vanishing moment is defined as
• The more the number of moments of a wavelets are zero the more is its compressive power
dtttM pp )(
Some Important properties of wavelets
• Smoothness• is roughly the number of times a function can be differentiated
at any given point• Closely related to vanishing Moments• Smoothness provides better numerical stability• It also provides better reconstruction propertiy
2D DWT
• Generalization of concept to 2D• 2D functions images f(x,y) I[m,n] intensity function
• Why would we want to take 2D-DWT of an image anyway?– Compression– Denoising– Feature extraction
• Mathematical form
),(),,(),(
),(),(),(
jyixsyxfjia
jyixsjiayxf
o
i joo
)()(),( yxyxs )()(),( yxyxs
Implementation of 2D-DWT
INPUTIMAGE…
…
……
RO
WS
COLUMNSH~ 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
)(1hkD
)(1vkD
)(1dkD
1kA
INPUTIMAGE
LL LH
HL HH
LLLH
HL HH
LHH
LLH
LHL
LLLLH
HL HH
LHH
LLH
LHL
Up and Down … Up and Down
2 1Downsample columns along the rows: For each row, keep the even indexed columns, discard the odd indexed columns
1 2Downsample 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)
Reconstruction
)(1hkD
)(1vkD
)(1dkD
1kA 1 2
1 2
1 2
1 2
H
G
H
G
2 1
2 1
H
G
ORIGINALIMAGE
LL
LH
HL
HH
DWT in Work
DWT at work
DWT at work
Applications of wavelets
• There are a lots of uses of wavelets .... The most prominent application of wavelets are
• Computer and Human Vision
• FBI Finger Print compression
• Image compression
• Denoising Noisy data
• Detecting self-similar behavior in noisy data
• Musical Notes synthesis
• Animations
Things that I didn’t Cover
• Different algorithms for getting Product filter, max-flat filter realization, spectral factorization , solutions for refinement and wavelet equations and many more
• Noble Identity, modulation matrix, Polyphase matrix forms• MRA , Mallat’s pyramidal algorithm• Lifting• Basic Vector algebra needed for wavelet analysis ( It’s too
mathematical to present )• Orthogonality, biorthogonality, frames• Vector algebra approach for wavelets• Wavelet for denoising and many more .................