wavelet and multiresolution based signal-image processing

119
Wavelet and multiresolution based signal-image processing By Fred Truchetet Le2i, UMR 5158 CNRS-Université de Bourgogne, France [email protected]

Upload: tess98

Post on 03-Dec-2014

2.590 views

Category:

Documents


6 download

DESCRIPTION

 

TRANSCRIPT

Page 1: Wavelet and multiresolution based signal-image processing

Wavelet and multiresolution based signal-image processing

By Fred TruchetetLe2i, UMR 5158 CNRS-Université de Bourgogne, France

[email protected]

Page 2: Wavelet and multiresolution based signal-image processing

Overview

Page 3: Wavelet and multiresolution based signal-image processing

Wavelet play field: signal and image processing

• Signal or image: quantitative information • Process: Analyze

TransformSynthesize

Page 4: Wavelet and multiresolution based signal-image processing

Wavelets, why?

Signal processing: analysis, transformation, characterization, synthesis

Example :

Analysis of a musical sequence

• For automatic creation of score (music sheet)

Synthesis of music from score

• For automatic reading and playing score

Page 5: Wavelet and multiresolution based signal-image processing

A musical sound: a function of time, a signal

0 0.5 1 1.5 2 2.5 3

x 105

-0.8

-0.6

-0.4

-0.2

0

0.2

0.4

0.6

0.8

Notes Accord

Separate notes and chord

Page 6: Wavelet and multiresolution based signal-image processing

Analysis and synthesis ?

In a score the music stream is segmented into « atoms » or notes defined by their

• Pitch: C, D, E, etc…• Duration (whole note, half note, quarter note,

etc…)• Position in time (measure bars)It provides an analysis of the musical signal

With the score the musician can play the music as it has been originally created

It is the synthesis stage

Page 7: Wavelet and multiresolution based signal-image processing

Distinguish the frequencies

-0.4

-0.2

0

0.2

Par

tie r

éelle

Signal temporel

05381076

Echelle lin.

Den

sité

spe

ctra

le d

'éne

rgie

|STFT|2, Lh=50, Nf=256, Ech. lin., Seuil=5%

Temps

Fré

quen

ce

100 200 300 400 5000

0.1

0.2

0.3

0.4

ACCORD

In a chord

Page 8: Wavelet and multiresolution based signal-image processing

Distinguish the times and the frequencies

-0.2

0

0.2

Par

tie r

éelle

Signal temporel

072143

Echelle lin.

Den

sité

spe

ctra

le d

'éne

rgie

|STFT|2, Lh=50, Nf=256, Ech. lin., Seuil=5%

Temps

Fré

quen

ce

100 200 300 400 5000

0.1

0.2

0.3

0.4

DOREMI

for series of notes

Page 9: Wavelet and multiresolution based signal-image processing

A sound: a wave

0 2000 4000 6000 8000 10000 12000 14000 16000 18000-0.5

-0.4

-0.3

-0.2

-0.1

0

0.1

0.2

0.3

0.4Représentation temporelle du son correspondant au mot GABOR

temps

GABOR

0 500 1000 15000

50

100

150

200

250

300

350

400Représentation fréquentielle du son GABOR

fréquence

GABOR

Page 10: Wavelet and multiresolution based signal-image processing

A sound: a function of time and frequency

-0.2

0

0.2

Par

tie r

éelle

Signal temporel

Echelle lin.

Den

sité

spe

ctra

le d

'éne

rgie

|STFT|2, Lh=50, Nf=256, Ech. Log., Seuil=5%

Temps

Fré

quen

ce

100 200 300 400 5000

0.1

0.2

0.3

0.4

GABOR

Page 11: Wavelet and multiresolution based signal-image processing

Wave and impulse

0 100 200 300 400 500 600 700 800 900 1000-2

-1.5

-1

-0.5

0

0.5

1

1.5

2

Onde sinusoïdale

0.8 0.85 0.9 0.95 1 1.05 1.1 1.15 1.2 1.25 1.3

x 104

-2

-1.5

-1

-0.5

0

0.5

1

1.5

2

Impulsion sinusoïdale

0.7 0.8 0.9 1 1.1 1.2 1.3

x 104

-2

-1.5

-1

-0.5

0

0.5

1

1.5

2

Impulsion sinusoïdale

Page 12: Wavelet and multiresolution based signal-image processing

A wavelet ?

• Oscillating mother function, well localized both in time and frequency :

(t)

Page 13: Wavelet and multiresolution based signal-image processing

Wavelet ?

• A family built by dilation

(t) (t/2) (t/4)

Page 14: Wavelet and multiresolution based signal-image processing

Wavelets ?

• and translation :

(t) (t-20) (t-40)

)(a

bt

Page 15: Wavelet and multiresolution based signal-image processing

Waves or wavelets ?

• Wave

• frequency• Infinite duration• No temporal localization

• Wavelet

• scale

• Duration (window size)

• Temporal localization

then

Wavelet = Note ?

Page 16: Wavelet and multiresolution based signal-image processing

Why the wavelets?

Page 17: Wavelet and multiresolution based signal-image processing

The wavelets, why?(again but with mathematical arguments)

• In the real world, a signal is not stationary.• The information is in the statistical, frequential, temporal, spatial

varying features

• Examples: vocal signal, music, images…

• Joseph Fourier, in 1822, proposed a global analysis:– Integrals are from - to + – Spatial or temporal localization is lost

• Fourier Transform:

Tfourierf

fte j tdt #

Page 18: Wavelet and multiresolution based signal-image processing

The wavelets, why?

A straightforward idea: cut the integration domain into sliding windows

Window Fourier transform or Short Time Fourier Transform (STFT):

• We denote the “window function” as:

• When t and vary It constitutes a family which can be considered as a kind of « basis »

dsetsgsftfT sjslwin

)()(),(

t, s gs te j s #

Page 19: Wavelet and multiresolution based signal-image processing

The wavelets, why?

• This transform can be seen as the projection over the sliding window functions :

• With the inner product:

,,),( tslwin ftfT

f,g

functions) real(for )()(, dxxgxfgf

Page 20: Wavelet and multiresolution based signal-image processing

The wavelets, why?

• Many window functions are used: Hanning, Hamming, and Gauss :

• For the Gauss window, the transform is called “Gabor transform”. The basis function is called “gaboret». These functions are normalized with

• Gabor Transform:

gx 14 e

x2

2 #

f 2

fxf xdx #

Tgaborft, 14

fse

s t2

2 e j sds #

Page 21: Wavelet and multiresolution based signal-image processing

The wavelets, why?

Example of “gaboret” for two frequencies (real part)

The window size does not depend on the frequency

Page 22: Wavelet and multiresolution based signal-image processing

The wavelets, why?

• The resolution in the frequency-time plane can be estimated by the variance of the window function:

With x=t or x=f for time and frequency* resolution respectively

• For a “gaboret”:

• As

• Then whatever the frequency:

21

x2

x2| x |2dx #

2

2

4

1

)(x

ex

2

1t

2xe e f222

1

f

21 tShow that

d

222 )(ˆ2

1

*

Page 23: Wavelet and multiresolution based signal-image processing

The wavelets, why?

f

t

t e m p s

f r é q u e n c e

Time-frequency plane tiling provided by the Gabor Transform

Not optimal

As some periods are necessary for frequency measurement a low temporal resolution comes naturally for low frequencies, for high frequencies a finer temporal resolution is possible.

Question: how to find an automatic trade-off between time and frequency resolution for all the frequencies?

Page 24: Wavelet and multiresolution based signal-image processing

The wavelets, why?

Answer: the Wavelet Transform

a is the scale factor and b the translation parameter and is the wavelet function (basis window function).

The scale factor a is as 1/ the greater a the larger the wavelet. If a is small, the frequency is high and the window is small allowing a high

temporal resolution for the analysis.is called the mother of a family of functions built by dilation and

translation following:

dta

bttf

abafT wav )()(

1),(

a,bt 1a t b

a #

Page 25: Wavelet and multiresolution based signal-image processing

A wavelet, what is it?

• A mother function oscillating, localized:

(t)

Page 26: Wavelet and multiresolution based signal-image processing

A wavelet, what is it?

• A family built by dilation

(t) (t/2) (t/4)

Page 27: Wavelet and multiresolution based signal-image processing

A wavelet, what is it?

• and translation:

(t) (t-20) (t-40)

)(a

bt

Page 28: Wavelet and multiresolution based signal-image processing

The wavelets, why?

a,bt 1a t b

a #

The norm does not depend on a:

a,b 2

1a t b

a 2dt

1a

| x |2adx

2

#

bawav fbafT ,,),(

The wavelet transform (WT) can be denoted as:

t2 t2| a,0t |2dt

t2 1a t

a 2dt

a2x2 1a | x |2adx

If the temporal resolution of the mother wavelet is taken as unit, then

Page 29: Wavelet and multiresolution based signal-image processing

The wavelets, why?

1t

Then

And for the frequency resolution, taking in the same way the frequency variance of the mother wavelet as unit

t a

a1

And finally

Show that

0 ~ 1/a then Q=constant10

Q

Page 30: Wavelet and multiresolution based signal-image processing

The wavelets, why?

Time-frequency plane tiling

a

a

temps

fréquence:1/a

The wavelet transform produces a constant Q analysis

Uncertainty principle: f. t = constant

Page 31: Wavelet and multiresolution based signal-image processing

Continuous wavelet transform

Page 32: Wavelet and multiresolution based signal-image processing

Wavelet Transform

Analysis Searching for the weight of each wavelet (atom of signal) in

a function f(t)

)(1

)(, a

bt

atba

baba fC ,, ,

ba,

f

dtttf ba )()( ,*

Page 33: Wavelet and multiresolution based signal-image processing

Continuous wavelet transform: CWT

• Continuous wavelet transform:

• In the Fourier space:

• Inverse transform:

Page 34: Wavelet and multiresolution based signal-image processing

A wavelet has to be admissible

• Admissibility condition:

• For ordinary localized functions:

• Or, more generally:

Page 35: Wavelet and multiresolution based signal-image processing

Wavelet Transform

SynthesisAdd the wavelets weighted by their respective weights

2,, )()(

a

dadbtCctf baba

baC ,

)(, tba

)(tf 2,, )(a

dadbtCc baba

Page 36: Wavelet and multiresolution based signal-image processing

Wavelets for CWT

• Some examples of admissible wavelets– Haar (this example is presented further)– Mexican hat

– Morletti

t

eet 0

2

24

1

)(

224

12

)1(3

2)(

t

ett

Show that the Morlet wavelet is only close to admissible

Page 37: Wavelet and multiresolution based signal-image processing

Wavelets for CWT

omega

psi

-10 -5 0 5 10

1

2

omega

psi

Wavelets in the Fourier domain

Morlet for a=1 and a=2 Mexican hat

As a is increasing, the frequency size shrinks while the temporal window enlarges. The original trade-off is maintained whatever the scale factor.

Page 38: Wavelet and multiresolution based signal-image processing

Wavelet Transform as time-frequency analysis

Page 39: Wavelet and multiresolution based signal-image processing

Sampling for discrete wavelet transform

a

a

temps

fréquence:1/a

The time-scale plane can be sampled to avoid or limit the redundancy of the CWT.

To respect the Q-constant analysis principle, the sampling must be such that:

Zbaanbbaa ooioo

io , with and

i is the discrete scale factor and n the discrete translation parameter, both are integer.

Page 40: Wavelet and multiresolution based signal-image processing

Discrete wavelet transform: DWT

• Discrete analysis with continuous wavelet• Isomorphism between L2(R) and l2(R) (continuous

functions ↔ discrete sequences)

• a=a0i with i integer b=nb0a0

i with n integer

• Dyadic analysis: a0=2 b0=1

• Discrete tiling of the scale-time space

dtnttxxnixT iiniod )2(2)(,),( *2/

,

Page 41: Wavelet and multiresolution based signal-image processing

Which Wavelet Transform?

• Continuous, CWT, for signal analysis, without synthesis: redundant

• Discrete, DWT, (dyadic or not, Mallat or lifting scheme), for signal or image analysis if synthesis is required– Non redundant:

• Orthogonal basis• Non orthogonal basis (biorthogonal)

– Redundant: non decimated DWT, Frame

– Wavelet packets (redundant or not)

Page 42: Wavelet and multiresolution based signal-image processing

Who invented wavelets?

From Joseph Fourier to Jean Morlet and after ...

almost a French story

The ancestor

• Joseph FOURIER born in Auxerre (Burgundy, France) in 1768, amateur mathematician, provost of Isère published in 1822 a theory of heat…

Every « physical » function can be written as a sum of sine-waves:

Fourier Transform

Page 43: Wavelet and multiresolution based signal-image processing

Who invented wavelets?

The grandfather

Dennis GABOR electrical engineerand physicist, Hungarian born English,Nobel price of physics in 1971for inventing holography

Decomposition into constant duration « wave pulses »:

Short Time Fourier Transform (1946)

Page 44: Wavelet and multiresolution based signal-image processing

The fatherJean MORLET French engineer from Ecole Polytechnique, geologist for petrol company

Elf Aquitaine Decomposition into wavelets with duration

in inverse proportion to frequency (1982)

The children A.Grossmann (1983), Y.Meyer (1986),S.Mallat (1987), I.Daubechies (1988),

J.C.Fauveau (1990), W. Sweldens (1995)...

Who invented wavelets?

Page 45: Wavelet and multiresolution based signal-image processing

referencesI. Daubechies, «Ten Lectures on Wavelets», SIAM, Philadelphia, PA,

1992.II. S. Mallat, «A theory for multiresolution signal decomposition : the

wavelet representation», IEEE, PAMI, vol. 11, N° 7, pp. 674-693, july 1989.

III. S. Mallat, “Wavelet Tour of Signal Processing”, Academic Press, Chestnut Hill MA, 1999

IV. G. Strang, T. Nguyen, «Wavelets and filter banks», Wellesley-Cambridge Press, Wellesley MA, 1996.

V. F. Truchetet, “Ondelettes pour le signal numérique”, Hermès, Paris, 1998.

VI. F. Truchetet, O. Laligant, “Industrial applications of the wavelet and multiresolution based signal-image processing, a review”, proc. of QCAV 07, SPIE, vol. 6356, may 2007

VII. M. Vetterli, J. Kovacevic, « Wavelets and Subband Coding », Prentice Hall, Englewood Cliffs, NJ, 1995.

Page 46: Wavelet and multiresolution based signal-image processing

Which wavelet?

• Freedom to choose a wavelet– Blessing or Curse?

• How much efforts need to be made for finding a good wavelet?– Any wavelet will do?

• What properties of wavelets need to be considered? Symmetry, regularity, vanishing moments,

compacity

Page 47: Wavelet and multiresolution based signal-image processing

Symmetry

In some applications the analyzing function needs to be symmetric or antisymmetric:

Real world images

This is related to phase linearity

Symmetric: Haar, Mexican hat, Morlet

Non symmetric: Daubechies, 1D compact support orthogonal wavelets

Page 48: Wavelet and multiresolution based signal-image processing

Regularity

• The order of regularity of a wavelet is the number of its continuous derivatives.

• Regularity can be expanded into real numbers. (through Fourier Transform equivalent of derivative)

• Regularity indicates how smooth a wavelet is

.10 with is regularity then the

aroundlocally resembles)( If )(

rrm

tttt o

r

om

Page 49: Wavelet and multiresolution based signal-image processing

Vanishing Moment

• Moment: j’s moment of the function

• When the wavelet’s k+1 moments are zero

i.e.

the number of Vanishing Moments of the wavelet is k.

Weakly linked to the number of oscillations.

)(t

dtttm j

j )(

kjdttt j ,...,0for0)(

Page 50: Wavelet and multiresolution based signal-image processing

Vanishing moments

• When a wavelet has k vanishing moments, WT leads to suppression of signals that are polynomial of degree lower or equal to k…. (whatever the scale)

• … or detection of higher degree components: singularities

• If a wavelet is k times differentiable, it has at least k vanishing moments

Show that from )(ˆ)()( )( kkk jtt

Page 51: Wavelet and multiresolution based signal-image processing

Compacity (size of the support)

• The number of FIR filter coefficients.

• The number of vanishing moments is proportional to the size of support.

• Trade-off between computational power required and analysis accuracy

• Trade-off between time resolution and frequency resolution

• A compact orthogonal wavelet cannot be symmetric in 1D

Page 52: Wavelet and multiresolution based signal-image processing

Which wavelet: examples for DWT

Db1 (Haar) Db2 (D4) Db5 (D10) Db10 (D20)

R=NA R=0.5 R=1.59 R=2.90 VM=1 VM=2 VM=5 VM=10 SS=2 SS=4 SS=10 SS=20

Page 53: Wavelet and multiresolution based signal-image processing

Discrete wavelet transform

Multiresolution Analysis: orthogonal basis

Page 54: Wavelet and multiresolution based signal-image processing

Multi Resolution Analysis of L2(R)

• Approximation spaces– Working space: L2(R), for continuous functions, f(x), on R with finite norm (finite

energy)

– An analysis at resolution j of f is obtained by a linear operator :Vj is a subspace of L2(R), Aj is a projection operator (idempotent)

– A multiresolution analysis (MRA) is obtained with a set of embedded subspaces V j , such that going from one to the next one is performed by dilation:

– In the dyadic case for instance, the dilation factor is 2.

– The functions in subspace Vj+1 are coarser than in subspace Vj and

– If j goes to - infinity, the subspace must tend toward L2(R).

Aj Ajf Vj #

fx Vj f x2 Vj 1 #

Vj 1 Vj #

limj

Vj L2R #

)(,2

dxxfff

Page 55: Wavelet and multiresolution based signal-image processing

Multi Resolution Analysis of L2(R)

• Set of axioms for dyadic MRA (S. Mallat, Y. Meyer):

ZkVktxVtx

ZiVtxVtx

V

LV

VVVV

ii

Zii

Zii

ii

,)()(

,)2()(

0

)(

.........

00

1

2

101

R

The last property allows the invariance for translation by integer steps

Page 56: Wavelet and multiresolution based signal-image processing

Multi Resolution Analysis of L2(R)

• In these conditions there exists a function (x) called scaling function from which, by integer translation, a basis of V0 can be built.

• Then a basis can be obtained for each subspace by dilating (x)

• The basis is orthogonal if

,)(0Vx

Z nnxx jnj

j

with)2(2)( 2,

Z nnxxn with)()(,0

x x ndx n n Z #

j,n, j,k n k n,k, j Z #

Page 57: Wavelet and multiresolution based signal-image processing

Multi Resolution Analysis of L2(R)

Ajf n

f, j,n j,n #

The approximation at scale j of the function f is given by:

anj f, j,n #

The approximation coefficients constitutes a discrete signal.

If the basis is orthogonal, then

Ajf 2 n

anj 2

#

Page 58: Wavelet and multiresolution based signal-image processing

Multi Resolution Analysis of L2(R)

Vj 1 Vj Wj

L2R jZ Wj

For each subspace Vj its orthogonal complement Wj in Vj-1 can be defined. It is called the detail subspace at scale j

As Wj is orthogonal to Vj, it is also orthogonal to Wj+1 which is in Vj. Therefore, all the Wj are orthogonal

kj WWjkj then,

V0

V1 W1

V2 W2

V3 W3

Page 59: Wavelet and multiresolution based signal-image processing

Multi Resolution Analysis of L2(R)

,)(0Wx

In these conditions there exists a function (x) called wavelet function from which, by integer translation, a basis of W0 can be built.

Then a basis can be obtained for each subspace by dilating (x)

The basis is orthogonal if

j,nx 2j2 2 jx n avec n Z #

j,n, i,k j i n k j, i,n,k Z #

Z nnxxn with)()(,0

Aj 1f Ajf n

f, j,n j,n #

And the complement of the approximation at scale j can be computed by

Page 60: Wavelet and multiresolution based signal-image processing

Multi Resolution Analysis of L2(R)

Djf n

f, j,n j,n #

dnj f, j,n #

Aj 1f Ajf Djf #

The details of f at scale j are obtained by a projection on Wj as

These coefficients are the wavelet coefficients or the coefficients of the discrete wavelet transform DWT associated to this MRA. They constitute a discrete signal.

Page 61: Wavelet and multiresolution based signal-image processing

Multi Resolution Analysis of L2(R)

Set of axioms for dyadic MRA (S. Mallat, Y. Meyer):

ZiWV

WVV

ZkVktxVtx

ZiVtxVtx

V

LV

VVVV

ii

iii

ii

Zi

i

Zi

i

ii

,

,)()(

,)2()(

0

)(

.........

1

00

1

2

101

R

Page 62: Wavelet and multiresolution based signal-image processing

MRA and orthogonal wavelet basis

)2(2)( 2/, ntt iini

with n integer, constitutes an orthogonal basis of Vi, the scaling functions

are not admissible wavelets!

)2(2)( 2/, ntt iini

with n integer, constitutes an orthogonal basis of Wi

All Wi are orthogonal and the direct sum of all these subspaces is

equal to L2(R):

ni, for i and n integers constitutes an orthogonal basis of L2(R)

Scaling function family:

Wavelet family:

Page 63: Wavelet and multiresolution based signal-image processing

Multiresolution analysis

nin

nii xxA ,,,

nin

nii xxD ,,,

niin xa ,, ),(, , nixTxd odni

in

Detail signal and approximation signal are characterized by the discrete sequences of wavelet and scale coefficients:

Sampling is a consequence of MRA

Page 64: Wavelet and multiresolution based signal-image processing

Discrete Wavelet Transform: Mallat’s algorithm

• Recursive algorithm: MRA

AApproximation + DDetail

(wavelet coefficients)

)()()( txDtxAtxA ii1i

Question: initialization?

What are the first approximation coefficients?

Page 65: Wavelet and multiresolution based signal-image processing

Wavelet Transform

Coarse

Coarse

Coarse

Detail

Detail

Multiresolution analysis

Page 66: Wavelet and multiresolution based signal-image processing

Example of MRA: Haar basis

x 21.510.50-0.5

1

0.8

0.6

0.4

0.2

0

x 21.510.50-0.5

1

0.5

0

-0.5

-1

The scale function The wavelet function

Verify invariance, normality and describe the functions of Vj and Wj and give the Haar analysis

of f(x)=x.

Page 67: Wavelet and multiresolution based signal-image processing

MRA: example of Haar analysis

x

A0x

A1x D1x

A2x D2x

constant has one that such )()1(2,2

2 kkj jjfkLfV ZR

Page 68: Wavelet and multiresolution based signal-image processing

Transformée projetée 68

MRA: general caseMRA: general case

V 3

V 2

W 3

W 2

V 1 W 2

V 0

2 2

1

1Scale function wavelet

Page 69: Wavelet and multiresolution based signal-image processing

Transformée projetée 69

MRA: general caseMRA: general case

Example of approximations and details of f

PV0 f

PV1 f PW1

f

PV2 f PW2

f

PV3 f PW3

f

f

Page 70: Wavelet and multiresolution based signal-image processing

Mallat’s algorithm: analysis

By definition, (x) is a function of V0 and as , (x) can be decomposed on the basis of V-1 and a discrete sequence

with can be found such that

V0 V 1

][nhn Z x

n

hn 1,nx #

With and

or

1,nx 212 2x n nnh ,10,0 ,][

x n

hn21/2 2x n #

Show that nkjk

nj kh 2,1, ][

Page 71: Wavelet and multiresolution based signal-image processing

Mallat’s algorithm: analysis

The approximation coefficients aj : can be computed following a recursive algorithm:

anj f, j,n

anj

k

hkf, j 1,k 2n #

anj

l

hl 2nf, j 1,l # hn h n # an

j l

h2n lf, j 1,l #

then

If h is considered as the impulse response of a discrete filter, we have a convolution followed by a downsampling by two:

2

anj

l

h2n lal

j 1 #

h~

Page 72: Wavelet and multiresolution based signal-image processing

Mallat’s algorithm: analysis

n

gn 1,n #

x n

gn 2 2x n #

gn , 1,n #

In the same way, W0 is in V-1 and a discrete sequence g[n] can be found by projecting the wavelet function on the basis of V-1:

or

dnj

l

g2n la lj 1 # Show that

If g is considered as the impulse response of a discrete filter, we have a convolution followed by a down sampling by two:

2g~

Page 73: Wavelet and multiresolution based signal-image processing

Mallat’s algorithm

• Analysis: recursive algorithm• Linear and invariant digital filtering.• Two filters h[n] (low pass) and g[n] (high pass) 

nnh ,10,0 ,][ nng ,10,0 ,][

anj-1 an

j

dnj

h

g

2

2

Page 74: Wavelet and multiresolution based signal-image processing

Mallat’s algorithm: synthesis

Aj 1f n

anj j,n

n

dnj j,n #

anj f, j,n dn

j f, j,n

fAfAA jjj 111 )( Aj 1f n

anj1

Aj 1f, j 1,n j 1,n #

anj 1

k

akj j,k , j 1,n

k

dkj j,k , j 1,n #

The analysis at scale j-1 gives two components, one in Vj and the other in Wj

with

As Aj is a projection operator (idempotent):

then

and therefore

Page 75: Wavelet and multiresolution based signal-image processing

Mallat’s algorithm: synthesis

j,k l

hl j 1,l 2k #

j,k , j 1,n l

hl

n l 2k

j 1,l 2k , j 1,n #

j,k , j 1,n hn 2k #

j,k , j 1,n gn 2k #

anj 1

k

akj hn 2k

k

dkj gn 2k #

We have seen that

As the basis of Vj-1 is orthogonal

then

and

Therefore from anj 1

k

akj j,k , j 1,n

k

dkj j,k , j 1,n #

a synthesis equation can be written:

Page 76: Wavelet and multiresolution based signal-image processing

Mallat’s algorithm: synthesis

anj 1

k

akj hn 2k

k

dkj gn 2k #

This equation can be seen as the sum of two convolution products (digital linear filtering) if two up sampled versions of aj and dj are introduced:

akj , , , , ,

alj , 0, , 0, , 0, , 0, , 0, , 0

#

anj 1

l

aljhn l

l

d ljgn l #

anj-1

anj

dnj

h

g

2

2

+

Page 77: Wavelet and multiresolution based signal-image processing

Dyadic Discrete Wavelet Transform

Fast Transform: Mallat’s algorithmRecursive algorithm driving through scales; from scale j to scale j-1

anj 1 ~

han

j 2

~gdn

j 2

ANALYSE

anj 1an

j

dnj

SYNTHESE

2

2

h

g

Page 78: Wavelet and multiresolution based signal-image processing

Example of DWT: Haar basis

Find the filters h and g for the Haar analysis

Verify the algorithm of Mallat for f(x)=x and one scale

2

1,

2

1][nh

2

1,

2

1][ng

aon . . . , 0 , 1,2,3,4,5,6,7, . . .

Page 79: Wavelet and multiresolution based signal-image processing

Mallat’s algorithm:building recursively the basis functions

, o,n n #

Z kjnj and 00, ,

0

and

)(

0

0

n

n

d

na

The mother scale function belongs to V0 and the basis is orthogonal:

and

Then for the mother scale function :

Then an approximation at scale j of can be obtained by cranking the machine up to scale j with a Dirac as approximation coefficient at scale 0 as only input

an-j

h2 h2(n)

j cellules identiques

Page 80: Wavelet and multiresolution based signal-image processing

Mallat’s algorithm:building recursively the basis functions: the

cascade algorithm

Verify this result for the Haar basis

Z kjnjnj and 0),(, ,

)(

and

0

0

0

nd

a

n

n

A similar result can be obtained for the wavelets:

therefore

The only detail coefficient sequence is a Dirac at scale 0

Page 81: Wavelet and multiresolution based signal-image processing

Synthesis of a projection on Vj or Wj

More generally, an approximation or a detail function at scale j can be obtained by following

the synthesis algorithm

Page 82: Wavelet and multiresolution based signal-image processing

Transformée projetée 82

Projection on Projection on VV00

a0

a1 d1

a2 d2

a3 d3

Coefficients of the analysis Example of coefficients projections on V0

for some approximations and details

A0 a2

. 0

a2 0 . 0

A0 d3

. 0

0 d3

A0 d2

. 0

0 d2

Page 83: Wavelet and multiresolution based signal-image processing

Example of synthesis of a detail signal

Analysis Synthesis

Approximation

Détail

Page 84: Wavelet and multiresolution based signal-image processing

Transformée projetée 84

Projected transform: exampleProjected transform: example

Wavelet coefficients

d1

d2

d3

Detail approximation

A0 d1

A0 d2

A0 d3

Page 85: Wavelet and multiresolution based signal-image processing

Example of approximations of the scale function for the basis Daubechies with N=2

x 543210

0.8

0.6

0.4

0.2

0 x 1086420

0.6

0.5

0.4

0.3

0.2

0.1

0

-0.1

x 20151050

0.4

0.3

0.2

0.1

0

-0.1

x 403020100

0.3

0.2

0.1

0

Page 86: Wavelet and multiresolution based signal-image processing

Orthogonal MRA

Properties and building

Page 87: Wavelet and multiresolution based signal-image processing

DWT:Properties of the basis functions and of the

associated filters

1. Orthogonality of the scale function and of the associated filter

2. Orthogonality of the wavelet function and of the associated filter

3. Scale functions and filters associated h in the Fourier domain

4. Wavelet functions and filters g associated in the Fourier domain

Page 88: Wavelet and multiresolution based signal-image processing

Orthogonality of the functions and of the associated filters

Znnntt )()(),(

t n

hn 2 2t n #

k

hkh2n k n #

For the scale function:

Therefore ?

For n=0 12 kh

k

Page 89: Wavelet and multiresolution based signal-image processing

For the wavelets

Z nntt ,0(),(

Znnntt )()(),(

Zjiknjiknnikj ,,,)()(, ,,

Between Wj and Vj

Between wavelets within the same scale

Generally

as x n

gn 2 2x n #

Therefore nkngkgk

2 02 knhkgk

12 kg

k

0 khkgk

and

Page 90: Wavelet and multiresolution based signal-image processing

Scale functions and associated filters h in the Fourier domain

h[n] is considered as the impulse response of a discrete linear filter:

h

n

hne in #

n

nznhzH ][)(Transfer function:

Frequency response:

x n

hn 2 2x n #

12

2

n

hne in 2 #

and

therefore

12

h

2

2 #

j 1

12

h

2 j # or

(2-periodic)

Page 91: Wavelet and multiresolution based signal-image processing

Scale functions and associated filters h in the Fourier domain

Orthogonality in the Fourier domain

n

| 2 n |2 1 #

Show that using autocorrelation in the Fourier domain and the Poisson

formula

xdx 0 0 0 #

Analyzing a function with a non zero mean value shows that we must have:

Page 92: Wavelet and multiresolution based signal-image processing

n

t nTfourier 2

T n

n 2T #

r

t t dt t, t #

r | |2 #

re r k

k #

re 12r 2

n

n2 #

re n

r 2 n #

n

| 2 n |2 1 #

Poisson equation

autocorrelation

In Fourier

sampling

In Fourier

or

As Fourier transform of Dirac is 1

)()()()( nndtnttnn

and

Page 93: Wavelet and multiresolution based signal-image processing

Scale functions and associated filters h in Fourier domain

2)()()()( 11 zHzHzHzH

h

2h

2 2 #

n

| 2 2 n |2 n

12

| n |2 h n

2 1 #

12 n

h 2n

2| 2n |2

12 n

h 2n 1

2| 2n 1 |2 1

#

h

2 n

12

| 2 n |2 h

2 n

12

| 2n |2 1 #

as is 2-periodic

Separating odd and even terms:

or

)(ˆ h

Page 94: Wavelet and multiresolution based signal-image processing

Scale functions and associated filters h in the Fourier domain

h

2 2

2

#

h0

nhn 2

h 0

#

as

For =0 in this equation and in the previous one, it comes

Therefore, h is a low pass filter giving a low resolution version of the signal

0

xdx 1 # and

2n 0 n 0 #

Page 95: Wavelet and multiresolution based signal-image processing

Wavelet functions and associated filters g in the Fourier domain

n

nzngzG ][)(

n

2 n2 1 #

g[n] is considered as the impulse response of a discrete linear filter:

Transfer function:

Frequency response:

)2(2][)( nxngxn

and

therefore 1

2g

2

2 #

Intra scale wavelet orthogonality

n

jnengg ][)(ˆ

Page 96: Wavelet and multiresolution based signal-image processing

Wavelet functions and associated filters g in the Fourier domain

|g |2 |g |2 2 #

n

2n 2n 0 # Wavelet-scaling function orthogonality

0

xdx 0 # For =0

g0 n

gn 0

|g | 2 #

and

Therefore

Page 97: Wavelet and multiresolution based signal-image processing

Wavelet functions and associated filters g in the Fourier domain

From n

2n 2n 0 #

Show that g h g

h 0 #

or 0)()()()( 11 zHzGzHzG

|g |2h

2 |g |2

h

2 #

|g |2 h

2 2 #

Therefore

Page 98: Wavelet and multiresolution based signal-image processing

Wavelet functions and associated filters g in the Fourier domain

g0 n

gn 0

|g | 2 #

0

xdx 0 # is an admissible wavelet

function

g is a high pass filter keeping the high frequency

components, i.e. the details

How to deduce g from h?

Page 99: Wavelet and multiresolution based signal-image processing

Relationship between h and g in orthogonal bases

g h g

h 0 # From

g g h

h #

g

h # with

1)(ˆclearly and

1)(ˆ0)(ˆ)(ˆ

periodic2 is )(ˆ

The simplest solution with linear phase : jke 12)(ˆ

g e i h # For example

Page 100: Wavelet and multiresolution based signal-image processing

Relationship between h and g in orthogonal bases

)()( 112 zGzzH k

g e i h # From

Show that gn 1nh1 n #

Or more generally

Such a pair of filters is called QMF: Quadrature Mirror Filters

Page 101: Wavelet and multiresolution based signal-image processing

Building an MRA

1. Begin with the scaling function or the approximation subspaces

2. Determine h filters

3. Deduce g filters

4. Finally deduce the wavelet functions

e i 2 1

2

h

2

2

1 and 2 can be switched round

Page 102: Wavelet and multiresolution based signal-image processing

Résumé des principales propriétés des fonctions et des filtres associés

à une analyse multirésolution orthogonale

t, t n n n Z t, t n 0 n Z

t, t n n n Z

12

h 2

2 12

g 2 2

n| 2 n |2 1

n 2 n

2 1

| 0 | 1 0 0

n 2n 2n 0 g

h g

h 0

k

hkh2n k n k|hk|2 k

|gk|2 1

h

2h

2 2 |g |2 |g |2 2

h

2 |g |2 2

h0

nhn 2

h 0

g0 n

gn 0

|g | 2

g

h

est 2 périodique

0

1

Page 103: Wavelet and multiresolution based signal-image processing

Low frequencies

High frequencies

x(n)

0% 25% 50%12.5%

g(n) 2 a

h(n) 2

h(n) 2

g(n) 2 b

h(n) 2 d

g(n) 2 c

Mallat’s algorithm

Page 104: Wavelet and multiresolution based signal-image processing

Examples of wavelets for orthogonal MRA

Haar, Littlewood-Paley, Spline, Daubechies

Page 105: Wavelet and multiresolution based signal-image processing

Examples of orthogonal MRA: Haar

constant has one that such )()1(2,2

2 kkj jjfkLfV ZR

not if0

101)(

tt

)12()2()( ttt 2 1 e i

2

2 #

h 121 e i #

Hz 121 z 1 #

Gz 121 z 1 #

Mother scaling function:

Approximation subspaces:

Projection on a finer subspace

From x n

hn 2 2x n # It comes

or

and with the QMF property

Page 106: Wavelet and multiresolution based signal-image processing

Examples of orthogonal MRA: Haar

121 e i

2 2 #

t 2t 2t 1 #

not if0

11

01

)( 21

21

t

t

t

e i 2

sin /2 /2

et 4i e i

2 sin2 4 #

From

We have

Therefore

Scaling and wavelet functions in the Fourier domain:

12g

2

2 #

Page 107: Wavelet and multiresolution based signal-image processing

Examples of orthogonal MRA: Haar

x 1.41.210.80.60.40.2

1

0.8

0.6

0.4

0.2

0x 100806040200

1

0.8

0.6

0.4

0.2

0

x 1.41.210.80.60.40.20-0.2

1

0.5

0

-0.5

-1 x 100806040200

1

0.8

0.6

0.4

0.2

0

Very compact in space, very bad localized in frequency

Symmetric, no regularity, 1 vanishing moment

Page 108: Wavelet and multiresolution based signal-image processing

Examples of orthogonal MRA:Littlewood-Paley

It comes from the same idea:

the approximation subspaces in Fourier domain are piecewise constant.

Kind of dual basis to the Haar’s

| | 1 si 0 si

#

the orthogonality property in Fourier is clearly verified: n

| 2n |2 1

If

To have symmetry: a zero-phase condition is set, show that:

t sin t t #

Page 109: Wavelet and multiresolution based signal-image processing

Examples of orthogonal MRA:Littlewood-Paley

t 1050-5-10

1

0.8

0.6

0.4

0.2

0

-0.2x 6420-2-4-6

1.4

1.2

1

0.8

0.6

0.4

0.2

0

| | 1 si 0 si

# t sin t t #

Page 110: Wavelet and multiresolution based signal-image processing

Examples of orthogonal MRA:Littlewood-Paley

h 2

2

#

not if0

if2)(ˆ

h

2/

2/sin

2

1][

n

nnh

g e i h

The associated filters

from It comes

Therefore

and with the QMF relationship

2/2

2/2/0

2/2

)(ˆ

ife

if

ife

gi

i

21

21

sin

2

)1(][

n

n

ngn

These filters are IIR

Page 111: Wavelet and multiresolution based signal-image processing

Examples of orthogonal MRA:Littlewood-Paley

x 1050-5-10

1.4

1.2

1

0.8

0.6

0.4

0.2

0

The wavelet

12g

2

2

not if0

2 if)(ˆ

ie

From

t cos t sin2 t t 1

2 #

t 1050-5-10

1

0.8

0.6

0.4

0.2

0-0.2

-0.4

-0.6

-0.8

Page 112: Wavelet and multiresolution based signal-image processing

Example of MRA:Spline bases (Battle-Lemarié)

•Improve the Haar basis for a better piecewise approximation using polynomial functions

•Keep the symmetry (linear phase)

•Use the B-spline basis properties in connection with

•The B-spline functions are a basis for piecewise polynomial functions but not an orthogonal basis in

•An orthogonalization process is required

j

12

h2 j #

L2R

Page 113: Wavelet and multiresolution based signal-image processing

Example of MRA:Spline bases (Battle-Lemarié)

The approximation subspace Vj is defined as the set of piecewise polynomial functions on 2j width segments.

kn

nfZkRLfV

jkk

j

jj

2 in sderivative continuous 1 with

degree of polynomiala is , that such )()1(2,2

2

not if0

2/12/1if1)(

ttI

1

21

21

21)(

1

)(

)()()()( : even is if

)()()()( : odd is if

n

nn

n

tItItItn

tItItItn

The B-spline basis of order n is built by autoconvolution of a box function:

Therefore

Page 114: Wavelet and multiresolution based signal-image processing

Example of MRA:Spline bases (Battle-Lemarié)

x 43210

1

0.8

0.6

0.4

0.2

0

Examples of B-spline with n=1 and n=2

Compact support but not orthogonal

x 1.510.50-0.5-1-1.5

1.4

1.2

1

0.8

0.6

0.4

0.2

0

Page 115: Wavelet and multiresolution based signal-image processing

Example of MRA:Spline bases (Battle-Lemarié)

2)1(

)1(

)(

)1(

)(

2

2sin

)(ˆeven is n if

2

2sin

)(ˆodd is n if

ni

n

n

n

n

e

Therefore

The orthogonalization process is based on the following property of orthogonal bases:

k

f 2k

2 1 #

f

k

f 2k

2 #

It can be shown that if f(t) is a basis, an orthogonal basis is

obtained by:

Page 116: Wavelet and multiresolution based signal-image processing

Example of MRA:Spline bases (Battle-Lemarié)

n

k

n 2k

2 #

k

n 2k

2b2n 1

#

b2n 1k 2n 1x |x k

#

n

b2n 1

#

The orthogonal scaling function basis is given by

It can be shown that the normalization factor can be computed with discrete B-splines:

with

Therefore finally

Page 117: Wavelet and multiresolution based signal-image processing

Example of MRA:Spline bases (Battle-Lemarié)

x 420-2-4

1.4

1.2

1

0.8

0.6

0.4

0.2

0

x 420-2-4

1.4

1.2

1

0.8

0.6

0.4

0.2

0-0.2

sin

22

2 123

13 cos

#

sin

22

3 11120

1330 cos 1

60 cos 2e i3

2 #

Infinitely supported but orthogonal

n=1

n=2

20100-10-20

1.4

1.2

1

0.8

0.6

0.4

0.2

0

In Fourier

Page 118: Wavelet and multiresolution based signal-image processing

Example of MRA:Spline bases (Battle-Lemarié)

|k| hk (n=1) 0 0.81765 1 0.3973 2 0.06910 3 0.05195 4 0.01697 5 0.00999 6 0.00388 7 0.00202 8 0.00092

Filters

S. quad. :h 2

81 3e i 3e 2i e i3 33 26cos cos 2

33 26cos 2 cos 4 #

Spline linéaire :h 2 1

2 1

2cos 2 cos

2 cos 2 #

k hk (n=2) 2 0.68037 3 0.13796 4 0.12484 5 0.02075 6 0.04198 7 0.00424 8 0.01511 9 0.00112 10 0.00571

|k | hk (cubique)

0 0. 76612

1 0. 43392

2 0.05020

3 0. 11004

4 0.03208

5 0.04207

6 0.01718

7 0.01798

8 0.00869

k hk (cubique)

9 0.00820

10 0.00435

11 0.00388

12 0.00219

13 0.00188

14 0.00110

15 0.00093

16 0.00056

17 0.00046

Cubic spline basis: Battle-Lemarié

Page 119: Wavelet and multiresolution based signal-image processing

Example of MRA:Spline bases (Battle-Lemarié)

x 43210-1-2

1

0.5

0

-0.5

-1

-1.5

-2

x 420-2-4

1

0.5

0

-0.5

-1

Wavelets

n=1 n=220100-10-20

1.4

1.2

1

0.8

0.6

0.4

0.2

0

In Fourier

Compute an approximation of the Battle-Lemarié wavelet with the matlab wavelet

toolbox