0% found this document useful (0 votes)
4 views

Digital 4

Uploaded by

Mohamed Tarkas
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views

Digital 4

Uploaded by

Mohamed Tarkas
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 15

References

z Michel Misiti &Yves Misiti Wavelet toolbox V3 by Mathworks.


z Yun Q. Shi & Huifang Sun IMAGE and VIDEO COMPRESSION
for MULTIMEDIA ENGINEERING 2000 by CRC Press.
z C. Valens A Really Friendly Guide to Wavelets 1999.
z Robi Polkar THE WAVELET TUTORIAL SECOND EDITION.
z Lina Karam Digital Image Processing and Compression Spring
2004
Application on Image Compression z www.wikipedia.com
z Burrus, C. S. and R. A. Gopinath, H. Guo INTRODUCTION TO
WAVELETS AND WAVELET TRANSFORMS, A PRIMER Prentice
Hall, 1998.
z Alfred Mertins SIGNAL ANALYSIS Wavelets, Filter Banks, Time-
Frequency Translation and Applications 1999 by Jhon Wily & sons

Overview Fourier Transform


‰ stationary signals Fourier transform tells whether a certain frequency
component exists or not ,but it does not tell us when in time
Signals whose frequency content do not change in time these frequency components exist.
‰ Non-stationary signals ∞ − 2 j π ft ∞ 2 jπft
X ( f ) = ∫ x (t ).e dt x (t ) = ∫ X ( f ).e df
Signals whose frequency constantly changes in time −∞ −∞

3 4

1
The STFT represents a sort of compromise between
Short Time Fourier Transform the time-
time- and frequency-
frequency-based views of a signal.
‰ In STFT, the signal is divided into small enough
segments, where these segments (portions) of the *It provides some information about
signal can be assumed to be stationary. both:
‰ Give the time-frequency representation (TFR) of the
signal when and at what frequencies a
STFT
(ω )
X
( t , f ) = ∫ [ x ( t ).ω * ( t − t ′ )]. e
− 2 j π ft
dt signal event occurs,
occurs, with limited
t precision, determined by the size
of the window which is localized in
time and frequency domains .

5 6

How to
How to compute
compute STFT?
STFT?
How to
How to compute
compute STFT?
STFT?
*Multiplying the window function g(t) which is
nonzero for only a short period of time, with signal
s(t) and compute the Fourier transform of the
product s(t)g*(t-t), as the window is slid along the
time axis, resulting in a two-dimensional
representation
* Because the window function g(t) has a
short time duration, the Fourier transform of
s(t)g*(t-t) reflects the signal's local frequency
properties. By moving g(t) and repeating the same
process, we could obtain a rough idea how the
signal's frequency contents evolve over time.

7 8

2
WINDOW WIDTH
trade-
trade-off of the selection of the time and frequency
Resolution issues and STFT drawback
resolution

* One of the downfalls of the STFT is * In order to better measure a signal at a


that it has a fixed resolution. particular time and frequency (t, w), it is
While the STFT compromise between natural to desire that time duration and
time and frequency information can be frequency bandwidth of g(t) be as
useful, the drawback is that narrow as possible. Unfortunately, the
selections are not independent, which
once you choose a particular size for are related via the Fourier transform.
the time window, that window is the * The width of the windowing function
same for all frequencies (fixed relates to the how the signal is
resolution ). represented — it determines whether
Many signals require a more flexible there is good frequency resolution
approach -- one where we can vary the (frequency components close together
window size to determine more can be separated) or good time
accurately either time or frequency. resolution (the time at which
frequencies change).
9 10

Comparing short window and wide The window function we use is simply a Gaussian
window function in the form: w(t)=exp(-a*(t^2)/2);

Very short window,

Wide window

11 12

3
Example
Wavelet Transform & Its
applications

13

Examples of mother wavelet function


{ Let x(t) is the signal to be analyzed.
The mother wavelet is chosen to serve
as a prototype for all windows in the
process. All the windows that are used
are the dilated (or compressed) and
Meyer Morlet Mexican hat
shifted versions of the mother
wavelet. There are a number of
functions that are used for this
purpose. The Marlet wavelet and the
Mexican hat function are two
Examples of this wavelet.
Haar daubechies Biorthogonal

15 16

4
{ Once the mother wavelet is chosen the { Assume, the procedure will be started
computation starts with s=1 and the from scale s=1 and will continue for the
continuous wavelet transform is computed increasing values of s , i.e., the analysis
for all values of s , smaller and larger than will start from high frequencies and
``1''. However, depending on the signal, a
proceed towards low frequencies. This
complete transform is usually not
necessary. first value of s will correspond to the
most compressed wavelet. As the value
of s is increased, the wavelet will dilate.

17 18

Continuous Wavelet Transform Two well-


well-known examples of y(t
y(t) and
their Fourier transforms.
‰Wavelet transform decomposes a signal into a
1- The Morlet (modulated Gaussian) wavelet
set of basis functions which are called
wavelets

⎛ t− τ⎞ 2- The Haar wavelet:


ψ τ ,s (t ) = 1
ψ⎜ ⎟
s ⎝ s ⎠
‰ Where τ and s , the translation and scale respectively.
‰ The term translation is related to the location of the window.
‰ The term scale is related to inverse of the frequency.
‰ ψ (t ) is the transforming function, and it is called the mother
wavelet.

19 20

5
COMPUTATION OF THE CWT

{ The wavelet is placed at the beginning of the


signal at the point which corresponds to time=0. { The wavelet at scale s=1 is then shifted
The wavelet function at scale ``1'' is multiplied by towards the right by tau amount to the
the signal and then integrated over all times. The location t=tau , and the above equation is
result of the integration is then multiplied by the computed to get the transform value at
constant number 1/sqrt{s} . This multiplication is t=tau , s=1 in the time-frequency plane.
for energy normalization purposes so that the
transformed signal will have the same energy at { This procedure is repeated until the
every scale. The final result is the value of the wavelet reaches the end of the signal.
transformation, i.e., the value of the continuous One row of points on the time-scale plane
wavelet transform at time zero and scale s=1 . In
other words, it is the value that corresponds to for the scale s=1 is now completed.
the point tau =0 , s=1 in the time-scale plane.

21 22

Computation of The CWT


{ The above procedure is repeated for
every value of s. Every computation for
a given value of s fills the
corresponding single row of the time-
scale plane. When the process is
completed for all desired values of s,
the CWT of the signal has been
calculated.

23 24

6
Example
{ Now, let's take a look at an example,
and see how the wavelet transform
CWT
really looks like.
{ Consider the non-stationary signal in
the next Figure. This is similar to the
example given for the STFT, except at f

different frequencies. The signal is


composed of four frequency components
at 30 Hz, 20 Hz, 10 Hz and 5 Hz.
t
Time and Frequency Resolution
25 26

Comparison of Transformations Wavelet Transform

{ CWT is not practical for Digital Analysis

z Redundancy of the CWT


z An infinite number of wavelets is required
z Fast algorithms are needed

27 28

7
One-
One-Stage Filtering: Approximations
and Details What Wavelet do

• In wavelet analysis, we often speak of


approximations and details. The approximations
are the high-scale, low-frequency components of
the signal. The details are the low-scale, high-
frequency components.

29 30

Wavelet Transform The Discrete Wavelet

{ Continuous Wavelet Transform 1 ⎛ t −τ ⎞ ⎛ t − k . s j .τ




0 ⎟
ψ τ ,s = ψ⎜ ⎟ ψ
j, k
(t ) =
1
ψ ⎜
j
0

s ⎝ s ⎠ ⎜ ⎟
j s
s ⎝ 0 ⎠
0

The wavelet coefficients are computed


S=1
at the dyadic points
S=2
(tau, s ) = (S jk tau, S j )
It turns out that this is more efficient
and enough to recover the original
31
function from the wavelet coefficients. 32

8
Downsampling
Wavelet Transform
The WT produces two sequences called cA and cD.
{ Discrete Wavelet Transform

how many values of the shifting we need?

33 34

Example Implementing the wavelet


A pure sinusoid with high-frequency noise added to it. transform as an iterated filter bank,

*Splitting the signal spectrum with an iterated filter bank


*Different Scales lead to different band pass windows
s = sin(20.*linspace(0,pi,1000)) + 0.5.*rand(1,1000);
[cA,cD] = dwt(s,'db2');
35 36

9
The Discrete Wavelet Transform (1-D) Example of 1-D Signal
1
1250
0.8
1200
0.6

0.4
1150

0.2
1100
0

1050
DWT -0.2

-0.4
1000
-0.6

950 -0.8

-1

yhigh [k ] = ∑ x[n ].g [2k − n ] ylow [k ] = ∑ x[n ].h[2k − n ]


900 0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8 2
0 50 100 150 200 250 300 350 400 450 500

n n
‰ One important property of DWT, The high-pass and low-pass Low pass 2 CA 0.8

0.6

filters are not independent of each other, and they are related by X 0.4

0.2

g [n] = (−1) .h[L − 1 − n]


0

n Quadrature Mirror -0.2

High pass 2 CD -0.4

Filters (QMF). -0.6

-0.8

-1
0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8 2
37 38

Example of 1-D Signal Example of 1-D Signal


1750 1750
1250 1250

1700 1700
1200 1200
1650 1650

1150 1600 1150 1600

1100 1550 1100 1550

1050
DWT 1500
1050
DWT 1500

1450 1450

1000 1000
1400 1400

950 1350 950 1350

1300 1300
900 0 50 100 150 200 250 300 900 0 50 100 150 200 250 300
0 50 100 150 200 250 300 350 400 450 500 0 50 100 150 200 250 300 350 400 450 500

1 20

0.8 15

0.6
10

Approximation coefficient
0.4

0.2
Detail coefficient 5

0 0

-0.2
-5

-0.4
-10
-0.6
-15
-0.8

-1 -20
0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8 2 0 50 100 150 200 250 300
39 40

10
Multi-
Multi-step Decomposition and Reconstruction
Example of 1-D Signal
1750
1250
1700
1200
1650

1150 1600

1100 1550

1050
DWT 1500

1450

1000
1400

950 1350

1300
900 0 50 100 150 200 250 300
0 50 100 150 200 250 300 350 400 450 500

20
1250
15

1200
10

1150
5

1100
IDWT 0

1050
-5

1000 -10

950 -15

900 -20
0 50 100 150 200 250 300 350 400 450 500 0 50 100 150 200 250 300
41 42

The Discrete Wavelet Transform (2-D) 2-D Wavelet Decomposition

Level 1: 2D wavelet transform ⎛ a1 h1 ⎞


f a ⎜⎜ 1 1 ⎟⎟
43 ⎝v d ⎠ 44

11
2-D Wavelet Decomposition Wavelet Applications
‰ Detecting Discontinuities

¾The site of the change


¾The type of change
¾The amplitude of the change

Level 2: 2D wavelet transform ⎛ a2 h2 ⎞


a 1 a ⎜⎜ 2 2


⎝ v d ⎠ 45 46

Wavelet Applications Wavelet Applications


‰ Detecting Long-Term Evolution ‰ Identifying Pure Frequencies

Medium
Slow sine
sine

Rapid
sine

47 48

12
Wavelet Applications Wavelet Applications
‰ Denoising Signal ‰ Denoising Image Modi-
NeighShrin
Threshold k
Signal Inverse De-noised Wavelet
Wavelet detail wavelet
or wavelet Signal or De-noising
transform coefficients
Image transform image Box

SIGNAL WITH GAUSSIAN NOISE APPLY Coefficient


Detail THRESHOLD

IDWT
DWT

49
Original
Noisy Soft Threshold
Hard Threshold 50

Wavelet Applications Haar Wavelets


‰ Compression
¾ The Simplest way:
The values under the a certain
threshold are forced to zero.

¾ There are many algorithms


developed based on Wavelet
Transform such as :
™ EZW ; Shapiro (1993) 0 1
0 1

™ SHPIT ; Said and Pearlman (1996); Scaling


Function Wavelet

1 1 1 1
h(n) = [ , ] g(n) =[ ,− ]
2 2 2 2
51 52

13
53 54

Color format

56

14
57

15

You might also like