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

Preview:

Citation preview

Introduction toIntroduction to Wavelets -part 2Wavelets -part 2

By Barak HurwitzBy 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

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.

Reminder -Why Reminder -Why transformtransform??

Reminder –Reminder –Noise in Fourier Noise in Fourier spectrumspectrum

NoiseNoise

Coefficient Coefficient ** sinusoid of appropriate sinusoid of appropriate frequencyfrequency

The original signalThe original signal

1D SIGNAL1D SIGNAL

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

Wavelet PropertiesWavelet Properties

Wavelets familiesWavelets families

Wavelet TransformWavelet Transform

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

The original signalThe original signal

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

Example –Example –A simulated A simulated lunar landscapelunar landscape

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

1/46

mother

scale

time

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

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

Shift Smoothly over the Shift Smoothly over the analyzed functionanalyzed function

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)

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

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*

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

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

Example*:Example*:

* Wavelet used: db2

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

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??

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

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::

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

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

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

Image PyramidsImage Pyramids

Wavelet DecompositionWavelet Decomposition

Wavelet Decomposition- Wavelet Decomposition- Another ExampleAnother Example

LH

HL HH

LENNA

high pass

high pass high pass

Coding ExampleCoding Example

Original @ 8bpp

DCT@0.5 bpp

DWT

@0.5bpp

Zoom on DetailsZoom on Details

DWT DCT

Another ExampleAnother Example0.15bpp 0.18bpp 0.2bpp

DCT

DWT

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