An Overview of Wavelets Part I

Download Report

Transcript An Overview of Wavelets Part I

What is Wavelet? ( Wavelet Analysis)




Wavelets are functions that satisfy certain mathematical
requirements and are used to represent data or other functions
Idea is not new--- Joseph Fourier--- 1800's
Wavelet-- the scale we use to see data plays an important role
FT non local -- very poor job on sharp spikes
Wavelet db10
Sine wave
History of wavelets

1807 Joseph Fourier- theory of frequency analysis-- any 2pi functions f(x) is
the sum of its Fourier Series

1909 Alfred Haar-- PhD thesis-- defined Haar basis function---- it is compact
support( vanish outside finite interval)
1930 Paul Levy-Physicist investigated Brownian motion ( random signal)
and concluded Haar basis is better than FT
1930's Littlewood Paley, Stein ==> calculated the energy of the function
1960 Guido Weiss, Ronald Coifman-- studied simplest element of functions
space called atom
1980 Grossman (physicist) Moorlet( Engineer)-- broadly defined wavelet in
terms of quantum mechanics
1985 Stephen Mallat--defined wavelet for his Digital Signal Processing work
for his Ph.D.
Y Meyer constructed first non trivial wavelet
1988 Ingrid Daubechies-- used Mallat work constructed set of wavelets
The name emerged from the literature of geophysics, by a route through
France. The word onde led to ondelette. Translation wave led to wavelet







Fourier Series and Energy
f ( x )  a0 

 (a
k 1
k
cos kx  bk sin kx )
where the coefficients are calculated by
a0
2
1

2
ak 
1

f ( x ) dx
0
2
 
f ( x ) cos( kx ) dx
0
bk 
1
2
 
f ( x ) sin( kx ) dx
0
Energy of a function
1
energy 
2
2

0
2
f ( x) dx
f ( x)
Functions

Functions (Science and Engg) often use time as their
parameter
 g(t)-> represent time domain
 since typical function oscillate – think it as wave– so
G(f) where f= frequency of the wave, the function
represented in the frequency domain
 A function g(t) is periodic, there exits a nonzero
constant P s.t. g(t+P)=g(t) for all t, where P is called
period

periodic function has 4 important attributes
•
•
•
•
Amplitude– max value it has in any period
Period---2P
Frequency f=1/P(inverse)– cycles per second, Hz
Phase—Cos is a Sin function with a phase    / 2
Fourier, Haar
time  amplitude , frequency
 1965 Cooley and Tukey – Fast Fourier
Transform
1 

 Haar
1
0

x<


 Amplitude,


 ( x)  1

0


2

1

<x  1 
2

otherwise 


 ( x),
 (2 x), (2 x  1),
 (4 x), (4 x  1), (4 x  2), (4 x  3),
CWT
 continuous
wavelet transform (CWT) of a
function f(t) a mother wavelet (t )

mother wavelet may be real or complex with the
following properties
• 1.the total area under the curve=0,
• 2. the total area of | (t) | is finite
• 3. Admissible condition
2

 (t )dt  0


 | (t ) | dt  
2

• oscillate above and below the t-axis
• energy of the function is finite function is localize


Infinite number of functions satisfies above
conditions– some of them used for wavelet
transform
example
• Morlet wavelet
• Mexican hat wavelet
a wavelet (t ) has been chosen , the
CWT of a square integrable function f(t) is
defined as
1
 t b 
W (a, b)   f (t )
 
 dt
* denotes complex
|a|  a 
 once

*

conjugate
 a,b (t ) is a copy of  a,0 (t ) shifted b units along the time axis
For any a,
Thus b is a translation parameter
Setting b=0,
Here a is a scaling parameter
a>1 stretch the wavelet and 0<a<1 shrink it
 a,0 (t ) 
1
t
 
|a| a
Wavelets

F ( )   f (t )e jwt dt
Fourier Transform


CWT =

C( scale, position)=
f (t ) ( scale, position, t) dt

3
Scaling wave means
(or Shrinking) it
2.5
2
1
1.5
0.5
1
2
3
4
5
2.5
6
-0.5
-1
5
7.5
10
12.5
15
simply Stretching
17.5
Shifting
f (t) f(t-k)
Wavelets Continue
Wavelets are basis functions wjk (t ) in continuous time
 A basis is a set of linearly independent function that can be
used to produce a function f(t)
b w (t )
 f(t) = combination of basis function =  jk jk
j ,k
 wjk (t ) is constructed from a single mother wave w(t) -normally it is a small wave-- it start at 0 and ends at t=N
wj 0  w(2 j t )
 Shrunken ( scaled)
 shifted
wj 0 (t )  w(t  k )
 A typical wavelet wjk (t ) compressed j times and shifted k times
is
j

wjk (t )  w(2 t  k )


Property:- Remarkable property is orthogonality i.e. their innerproducts are zero
This leads to a simple formula for bjk

Haar Transform

Digitized sound, image are discrete.  we need discrete
wavelet



 c (t  k )   c  d (2 t  k )
where ck and dj,k are coefficients to be calculated
example:- consider the array of 8 values
(1,2,3,4,5,6,7,8)
4 average values 4 difference ( detail coefficients)
calculate average, and difference for 4 averages
continue this way
Method is called PYRAMID DECOMPOSITION
f (t ) 
j
k 






k
k 
k
j 0
j ,k
 Haar
transform depends on coeff ½, ½ and
½, - ½

if we replace 2 by √2 then it is called coarse detail and fine
detail
Transforms

Transform of a signal is a new representation of that
signal
 Example:- signal x0,x1,x2,x3 define y0,y1,y2,y3
 Questions


1. What is the purpose of y's
2. Can we get back x's

Answer for 2: The Transform is invertible-- perfect
reconstruction
 Divide Transform in to 3 groups



1. Lossless( Orthogonal)-- Transformed Signal has the same
length
2. Invertible (bi-orthogonal)-- length and angle may change-no information lost
3. Lossy ( Not invertible)--
Answer to Q1: Purpose








IT SEES LARGE vs SMALL
X0=1.2, X1= 1.0, x2=-1.0, x3=-1.2
Y=[2.2 0 -2.2 0]
Key idea for wavelets is the concept of " SCALE"
We can take sum and difference again==> recursion
=> Multiresolution
Main idea of Wavelet analysis– analyze a function at
different scales– mother wavelet use to construct
wavelet in different scale and translate each relative to
the function being analyzed
Z=[ 0 0 4.4 0 ]
Reconstruct =====>compression 4:1
 Real
electricity consumption
 peak in the center, followed by two drops,
shallow drop, and then a considerably weaker
peak
 d1 d2 shows the noise
 d3– presents high value in the beginning and at
the end of the main peak, thus allowing us to
locate the corresponding peak
 d4 shows 3 successive peak– this fits the
shape of the curve remarkably
 a1,a2 strong resemblance
 a3 reasonable---- a4 lost lots of information

JPEG (Joint Photographic Experts Group)

1. Color images ( RGB) change into luminance, chrominance, color
space
2. color images are down sampled by creating low resolution pixels –
not luminance part– horizontally and vertically, ( 2:1 or 2:1, 1:1)– 1/3
+(2/3)*(1/4)= ½ size of original size
3. group 8x8 pixels called data sets– if not multiple of 8– bottom row
and right col are duplicated
4. apply DCT for each data set– 64 coefficients
5. each of 64 frequency components in a data unit is divided by a
separate number called quantization coefficients (QC) and then
rounded into integer
6. QC encode using RLE, Huffman encoding, Arithmetic Encoding (
QM coder)
7. Add Headers, parameters, and output the result
• interchangeable format= compressed data + all tables need for
decoder
• abbreviated format= compressed data+ not tables ( few tables)
• abbreviated format =just tables + no compressed data
DECODER DO THE REVERSE OF THE ABOVE STEPS








JPEG 2000

divide into 3 colors
each color is partitioned into rectangular, non-overlapping
regions called tiles– that are compressed individually
A tile is compressed into 4 main steps








or JPEG Y2k
1. compute wavelet transform – sub band of wavelets– integer, fp,---L+1
levels, L is the parameter determined by the encoder
2. wavelet coeff are quantized, -- depends on bit rate
3. use arithmetic encoder for wavelet coefficients
4. construct bit stream– do certain region, no order
Bit streams are organized into layers, each layer contains
higher resolution image information
thus decoding layer by layer is a natural way to achieve
progressive image transformation and decompression
A
V
H
D
Lowpass Filter = Moving Average










y(n)= x(n)/2 + x(n-1)/2 here h(0)=1/2 and h(1)=1/2
Fits standard form for k=0,1
x= unit impulse
x=( ...0 0 0 0 1 0 0 0...) then y=( ...0 0 1/2 1/2 0 0..)
average filter= 1/2 (identity) + 1/2 (delay)
Every linear operator acting on a single vector x can
be rep by y=Hx
main diagonal come from identity--subdiagonal come
from delay
we have finite ( two ) coefficients--> FIR finite impulse
response
low pass==> scaling function
It smooth out bumps in the signal(high freq component
Highpass Filter Moving Difference









y(n)= 1/2[x(n)-x(n-1)]
h(0)=1/2
h(1)=-1/2
y=H1x
Filter Bank === Lowpass and Highpass
they separate the signal into frequency bank
Problem:-- Signal length doubled,
both are same size as signal ==> gives double size
of the original signal
Solution:-- Down Sampling
Down Sampling








We can keep half of Ho and H1 and still recover x
Save only even-numbered components ( delete odd
numbered elements) -- denoted by (↓2)-- decimation
(↓2)y = (... y(-4) y(-2)y(0)y(2).......)
Filtering + Down sampling ==> Analysis Bank ( brings
half size signal)
Inverse of this process==> Synthesis bank
i,e, Up sampling + Filtering
Add even numbered components zeros ( It will bring
full size) denoted by (↑2)
y = (↓2 y)= (↑2)(↓2 y)
Scaling function and Wavelets
corresponding to low pass--> there is scaling function  (t )
 corresponding to high pass--> there is wavelet function  (t )
N
 dilation equation--> scaling function
 (t )  2  c(k ) (2t  k )
k 0
 In terms of original low pass filters
N
 we have  (t )  2 h(k ) (2t  k )
k 0
 for h(0) and h(1) = 1/2 we have  (t )   (2t )   (2t  1)
 the graph  (t ) compressed by 2 gives  (2t ) and shifted by
1/2 gives  (2t  1)


By similar way the wavelet equation  (t )   (2t )   (2t  1)
Wavelet Packet

Walsh-Hadamard transform-- complete binary tree -->
wavelet packet
 "Hadamard matrix"==> all entries are 1 and -1 and all
rows are orthogonal-- divide two time by sqrt(2)==>
orthogonal & symmetric
sums z0=0

Compare with wavelet-- computations
sums y0 and y2
difference z2=4.4
x
sums z1=0.4
difference y1 and y3
difference z3=0

Filters and Filter Banks
Filter is a linear time-invariant operator
 It acts on input vector x --- Out put vector y is the convolution of
x with a fixed vector h
 h--> contains filter coefficients-- our filters are digital not analog- h(n) are discrete time t= nT,
 T is sampling period assume it is 1 here
 x(n) and y(n) comes all the time t= 0, +_ 1....
 y(n) = Σh(k) x(n-k) = convolution h* x in the time domain

Filter Bank= Set of all filters

Convolution by hand--- arrange it as ordinary multiplication -- but don't carry
digits from one column to another

x= 3 2 4 h= 1 5 2
x * h = 3 17 20 24 8
