59
Introduction to Introduction to Wavelets -part 2 Wavelets -part 2 By Barak Hurwitz By Barak Hurwitz Wavelets seminar with Dr’ Hagit Hal-or

Introduction to Wavelets - part 2 By Barak Hurwitz Wavelets seminar with Dr ’ Hagit Hal-or

  • View
    249

  • Download
    1

Embed Size (px)

Citation preview

Page 1: Introduction to Wavelets - part 2 By Barak Hurwitz Wavelets seminar with Dr ’ Hagit Hal-or

Introduction toIntroduction to Wavelets -part 2Wavelets -part 2

By Barak HurwitzBy Barak Hurwitz

Wavelets seminar

with Dr’ Hagit Hal-or

Page 2: Introduction to Wavelets - part 2 By Barak Hurwitz Wavelets seminar with Dr ’ Hagit Hal-or

List of topicsList of topics

• ReminderReminder

• 1D signals1D signals– Wavelet Transform Wavelet Transform – CWT,DWTCWT,DWT– Wavelet Decomposition Wavelet Decomposition – Wavelet AnalysisWavelet Analysis

• 2D signals2D signals – Wavelet PyramidWavelet Pyramid– some Examples

Page 3: Introduction to Wavelets - part 2 By Barak Hurwitz Wavelets seminar with Dr ’ Hagit Hal-or

Reminder – from last Reminder – from last weekweek• Why transform?Why transform?

• Why wavelets?Why wavelets?

• Wavelets like basis components.Wavelets like basis components.

• Wavelets examples.Wavelets examples.

• Wavelets advantages.Wavelets advantages.

• Continuous Wavelet Transform.Continuous Wavelet Transform.

Page 4: Introduction to Wavelets - part 2 By Barak Hurwitz Wavelets seminar with Dr ’ Hagit Hal-or

Reminder -Why Reminder -Why transformtransform??

Page 5: Introduction to Wavelets - part 2 By Barak Hurwitz Wavelets seminar with Dr ’ Hagit Hal-or

Reminder –Reminder –Noise in Fourier Noise in Fourier spectrumspectrum

NoiseNoise

Page 6: Introduction to Wavelets - part 2 By Barak Hurwitz Wavelets seminar with Dr ’ Hagit Hal-or

Coefficient Coefficient ** sinusoid of appropriate sinusoid of appropriate frequencyfrequency

The original signalThe original signal

1D SIGNAL1D SIGNAL

Page 7: Introduction to Wavelets - part 2 By Barak Hurwitz Wavelets seminar with Dr ’ Hagit Hal-or

Short time localized waves 0 integral value. Possibility of time shifting. Flexibility.

Wavelet PropertiesWavelet Properties

Page 8: Introduction to Wavelets - part 2 By Barak Hurwitz Wavelets seminar with Dr ’ Hagit Hal-or

Wavelets familiesWavelets families

Page 9: Introduction to Wavelets - part 2 By Barak Hurwitz Wavelets seminar with Dr ’ Hagit Hal-or

Wavelet TransformWavelet Transform

Coefficient Coefficient ** appropriately appropriately scaled and scaled and shiftedshifted waveletwavelet

The original signalThe original signal

Page 10: Introduction to Wavelets - part 2 By Barak Hurwitz Wavelets seminar with Dr ’ Hagit Hal-or

CWTCWT

Step 4Step 4

Step 3Step 3

Step 2Step 2

Step 1Step 1

Step 5Step 5 Repeat steps 1-4 for all Repeat steps 1-4 for all scalesscales

Page 11: Introduction to Wavelets - part 2 By Barak Hurwitz Wavelets seminar with Dr ’ Hagit Hal-or

Example –Example –A simulated A simulated lunar landscapelunar landscape

Page 12: Introduction to Wavelets - part 2 By Barak Hurwitz Wavelets seminar with Dr ’ Hagit Hal-or

CWT of the “Lunar CWT of the “Lunar landscape”landscape”

1/46

mother

scale

time

Page 13: Introduction to Wavelets - part 2 By Barak Hurwitz Wavelets seminar with Dr ’ Hagit Hal-or

Scale and FrequencyScale and Frequency• Higher scale correspond to the Higher scale correspond to the

most “most “stretchedstretched” wavelet.” wavelet.

• The more stretched the waveletThe more stretched the wavelet – –

the the coarsercoarser the signal features the signal features being measured by the wavelet being measured by the wavelet coefficient.coefficient.

Low scale High scale

Page 14: Introduction to Wavelets - part 2 By Barak Hurwitz Wavelets seminar with Dr ’ Hagit Hal-or

Scale and Frequency Scale and Frequency (Cont’d)(Cont’d)

• Low scale Low scale aa : Compressed : Compressed wavelet :wavelet :Fine detailsFine details (rapidly (rapidly changing) : changing) : High frequencyHigh frequency

• High scale High scale aa : Stretched wavelet: : Stretched wavelet: Coarse detailsCoarse details (Slowly changing): (Slowly changing): Low frequencyLow frequency

Page 15: Introduction to Wavelets - part 2 By Barak Hurwitz Wavelets seminar with Dr ’ Hagit Hal-or

Shift Smoothly over the Shift Smoothly over the analyzed functionanalyzed function

Page 16: Introduction to Wavelets - part 2 By Barak Hurwitz Wavelets seminar with Dr ’ Hagit Hal-or

The DWTThe DWT

• Calculating the wavelets coefficients at Calculating the wavelets coefficients at every possible scaleevery possible scale is too much work is too much work

• It also generates a very large It also generates a very large amount of amount of datadata

Solution: choose only a subset of scales and positions, based on power of two (dyadic choice)

Page 17: Introduction to Wavelets - part 2 By Barak Hurwitz Wavelets seminar with Dr ’ Hagit Hal-or

Approximations and Approximations and DetailsDetails::

• Approximations:Approximations: High-scale, low- High-scale, low-frequency components of the signalfrequency components of the signal

• Details:Details: low-scale, high-frequency low-scale, high-frequency componentscomponents

Input Signal

LPF

HPF

Page 18: Introduction to Wavelets - part 2 By Barak Hurwitz Wavelets seminar with Dr ’ Hagit Hal-or

DecimationDecimation

• The former process produces The former process produces twice the twice the datadata

• To correct this, we To correct this, we Down sampleDown sample ((or: or: Decimate)Decimate) the filter output by two. the filter output by two.

A complete one stage block :

Input Signal

LPF

HPF

A*

D*

Page 19: Introduction to Wavelets - part 2 By Barak Hurwitz Wavelets seminar with Dr ’ Hagit Hal-or

Multi-level Multi-level DecompositionDecomposition• Iterating the decomposition process, Iterating the decomposition process,

breaks the input signal into many breaks the input signal into many lower-resolution components: lower-resolution components: Wavelet Wavelet decomposition treedecomposition tree::

high pass filter

Low pass filter

Page 20: Introduction to Wavelets - part 2 By Barak Hurwitz Wavelets seminar with Dr ’ Hagit Hal-or

Wavelet reconstructionWavelet reconstruction

• Reconstruction (or Reconstruction (or synthesissynthesis) is the ) is the process in which we assemble all process in which we assemble all components back components back

Up sampling (or interpolation) is done by zero inserting between every two coefficients

Page 21: Introduction to Wavelets - part 2 By Barak Hurwitz Wavelets seminar with Dr ’ Hagit Hal-or

Example*:Example*:

* Wavelet used: db2

Page 23: Introduction to Wavelets - part 2 By Barak Hurwitz Wavelets seminar with Dr ’ Hagit Hal-or

Short Time Fourier Short Time Fourier AnalysisAnalysis• STFTSTFT - Based on the FT and using - Based on the FT and using windowing windowing ::

Page 24: Introduction to Wavelets - part 2 By Barak Hurwitz Wavelets seminar with Dr ’ Hagit Hal-or

STFTSTFT

• between between time-basedtime-based and and frequency-basedfrequency-based..

• limited precisionlimited precision..

• Precision <= Precision <= size of the windowsize of the window..

• Time window - Time window - same for all frequenciessame for all frequencies..

What’s wrong with GaborWhat’s wrong with Gabor??

Page 25: Introduction to Wavelets - part 2 By Barak Hurwitz Wavelets seminar with Dr ’ Hagit Hal-or

Wavelet AnalysisWavelet Analysis• Windowing technique with Windowing technique with variablevariable size size

window:window:

• Long time intervals - Low frequency Long time intervals - Low frequency

• Shorter intervals - High frequency Shorter intervals - High frequency

Page 26: Introduction to Wavelets - part 2 By Barak Hurwitz Wavelets seminar with Dr ’ Hagit Hal-or

The main advantage:The main advantage:Local AnalysisLocal Analysis

• To analyze a To analyze a localized arealocalized area of a of a larger signal.larger signal.

• For exampleFor example::

Page 27: Introduction to Wavelets - part 2 By Barak Hurwitz Wavelets seminar with Dr ’ Hagit Hal-or

Local Analysis (Cont’d)Local Analysis (Cont’d)

• Fourier analysis Vs. Fourier analysis Vs. Wavelet analysis: Wavelet analysis:

exact location in time of the discontinuity.

NOTHING!

scale

time

High frequency

low frequency

Discontinuity effect

Page 28: Introduction to Wavelets - part 2 By Barak Hurwitz Wavelets seminar with Dr ’ Hagit Hal-or

2D SIGNAL2D SIGNAL

aby

abx

abbayx

yxyx ,1, ,,

• bb – shift – shift coefficientcoefficient

• a a – scale – scale coefficientcoefficient

• 2D 2D functionfunction

a

bx xba

a

1,

Wavelet functionWavelet function

1D function1D function

Page 29: Introduction to Wavelets - part 2 By Barak Hurwitz Wavelets seminar with Dr ’ Hagit Hal-or

Time and Space Time and Space definitiondefinition

• TimeTime – for one dimension waves – for one dimension waves we start point shifting from we start point shifting from sourcesource to to endend in time scale . in time scale .

• SpaceSpace – for image point shifting is – for image point shifting is two dimensional .two dimensional .

1D1D

2D2D

Page 30: Introduction to Wavelets - part 2 By Barak Hurwitz Wavelets seminar with Dr ’ Hagit Hal-or

Image PyramidsImage Pyramids

Page 31: Introduction to Wavelets - part 2 By Barak Hurwitz Wavelets seminar with Dr ’ Hagit Hal-or
Page 32: Introduction to Wavelets - part 2 By Barak Hurwitz Wavelets seminar with Dr ’ Hagit Hal-or
Page 33: Introduction to Wavelets - part 2 By Barak Hurwitz Wavelets seminar with Dr ’ Hagit Hal-or

Wavelet DecompositionWavelet Decomposition

Page 34: Introduction to Wavelets - part 2 By Barak Hurwitz Wavelets seminar with Dr ’ Hagit Hal-or

Wavelet Decomposition- Wavelet Decomposition- Another ExampleAnother Example

LH

HL HH

LENNA

Page 35: Introduction to Wavelets - part 2 By Barak Hurwitz Wavelets seminar with Dr ’ Hagit Hal-or

high pass

high pass high pass

Page 36: Introduction to Wavelets - part 2 By Barak Hurwitz Wavelets seminar with Dr ’ Hagit Hal-or

Coding ExampleCoding Example

Original @ 8bpp

[email protected] bpp

DWT

@0.5bpp

Page 37: Introduction to Wavelets - part 2 By Barak Hurwitz Wavelets seminar with Dr ’ Hagit Hal-or

Zoom on DetailsZoom on Details

DWT DCT

Page 38: Introduction to Wavelets - part 2 By Barak Hurwitz Wavelets seminar with Dr ’ Hagit Hal-or

Another ExampleAnother Example0.15bpp 0.18bpp 0.2bpp

DCT

DWT

Page 39: Introduction to Wavelets - part 2 By Barak Hurwitz Wavelets seminar with Dr ’ Hagit Hal-or

Where do we use Where do we use Wavelets?Wavelets?• Everywhere around us are signals Everywhere around us are signals

that can be analyzedthat can be analyzed• For example:For example:

– seismic tremorsseismic tremors– human speechhuman speech– engine vibrations engine vibrations – medical imagesmedical images– financial datafinancial data– MusicMusic

Wavelet analysis is a Wavelet analysis is a new and promising set new and promising set of tools for analyzing of tools for analyzing

these signalsthese signals

Page 40: Introduction to Wavelets - part 2 By Barak Hurwitz Wavelets seminar with Dr ’ Hagit Hal-or
Page 41: Introduction to Wavelets - part 2 By Barak Hurwitz Wavelets seminar with Dr ’ Hagit Hal-or
Page 42: Introduction to Wavelets - part 2 By Barak Hurwitz Wavelets seminar with Dr ’ Hagit Hal-or
Page 43: Introduction to Wavelets - part 2 By Barak Hurwitz Wavelets seminar with Dr ’ Hagit Hal-or
Page 44: Introduction to Wavelets - part 2 By Barak Hurwitz Wavelets seminar with Dr ’ Hagit Hal-or
Page 45: Introduction to Wavelets - part 2 By Barak Hurwitz Wavelets seminar with Dr ’ Hagit Hal-or
Page 46: Introduction to Wavelets - part 2 By Barak Hurwitz Wavelets seminar with Dr ’ Hagit Hal-or
Page 47: Introduction to Wavelets - part 2 By Barak Hurwitz Wavelets seminar with Dr ’ Hagit Hal-or
Page 48: Introduction to Wavelets - part 2 By Barak Hurwitz Wavelets seminar with Dr ’ Hagit Hal-or
Page 49: Introduction to Wavelets - part 2 By Barak Hurwitz Wavelets seminar with Dr ’ Hagit Hal-or
Page 50: Introduction to Wavelets - part 2 By Barak Hurwitz Wavelets seminar with Dr ’ Hagit Hal-or
Page 51: Introduction to Wavelets - part 2 By Barak Hurwitz Wavelets seminar with Dr ’ Hagit Hal-or
Page 52: Introduction to Wavelets - part 2 By Barak Hurwitz Wavelets seminar with Dr ’ Hagit Hal-or
Page 53: Introduction to Wavelets - part 2 By Barak Hurwitz Wavelets seminar with Dr ’ Hagit Hal-or
Page 54: Introduction to Wavelets - part 2 By Barak Hurwitz Wavelets seminar with Dr ’ Hagit Hal-or
Page 55: Introduction to Wavelets - part 2 By Barak Hurwitz Wavelets seminar with Dr ’ Hagit Hal-or
Page 56: Introduction to Wavelets - part 2 By Barak Hurwitz Wavelets seminar with Dr ’ Hagit Hal-or
Page 57: Introduction to Wavelets - part 2 By Barak Hurwitz Wavelets seminar with Dr ’ Hagit Hal-or
Page 58: Introduction to Wavelets - part 2 By Barak Hurwitz Wavelets seminar with Dr ’ Hagit Hal-or
Page 59: Introduction to Wavelets - part 2 By Barak Hurwitz Wavelets seminar with Dr ’ Hagit Hal-or