Wavelets theory and applications An introduction GTDIR Grupo

  • Slides: 66
Download presentation
Wavelets: theory and applications An introduction GTDIR Grupo de Investigación: Tratamiento Digital de Imágenes

Wavelets: theory and applications An introduction GTDIR Grupo de Investigación: Tratamiento Digital de Imágenes Radiológicas Enrique Nava, University of Málaga (Spain) Brasov, July 2006

What are wavelets? Wavelet theory is very recent (1980’s) n There is a lot

What are wavelets? Wavelet theory is very recent (1980’s) n There is a lot of books about wavelets n Most of books and tutorials use strong mathematical background n I will try to present an ‘engineering’ version n

Overview n n Spectral analysis Continuous Wavelet Transform Discrete Wavelet Transform Applications A wavelet

Overview n n Spectral analysis Continuous Wavelet Transform Discrete Wavelet Transform Applications A wavelet tour of signal processing, S. Mallat, Academic Press 1998

Spectral analysis: frequency n n n Frequency (f) is the inverse of a period

Spectral analysis: frequency n n n Frequency (f) is the inverse of a period (T). A signal is periodic if T>0 and We need to know only information for 1 period Any signal (finite length) can be periodized. A signal is regular if the signal values and derivatives are equal at the left and right side of the interval (period)

Signals: examples

Signals: examples

Signals: examples

Signals: examples

Why frequency is needed? To be able to understand signals and extract information from

Why frequency is needed? To be able to understand signals and extract information from real world n Electrical or telecommunication engineers tends ‘to think in the frequency domain’ n

Fourier series 1822

Fourier series 1822

Fourier series difficulties Any periodic signal can be view as a sum of harmonically-related

Fourier series difficulties Any periodic signal can be view as a sum of harmonically-related sinusoids n Representation of signals with different periods is not efficient (speech, images) n

Fourier series drawbacks n n There are points where Fourier series does not converge

Fourier series drawbacks n n There are points where Fourier series does not converge Signals with different or not synchronized periods are not efficiently represented

Fourier Transform n n The signal has a frequency point of view (spectrum) Global

Fourier Transform n n The signal has a frequency point of view (spectrum) Global representation Lots of math properties Linear operators

Discrete Fourier Transform n n n Practical implementation Global representation Lots of math properties

Discrete Fourier Transform n n n Practical implementation Global representation Lots of math properties Linear operators Easy discrete implementation (1965) (FFT)

Fourier transform

Fourier transform

Random signals n Stationary signals: ¨ Statistics don’t change with time ¨ Frequency contents

Random signals n Stationary signals: ¨ Statistics don’t change with time ¨ Frequency contents don’t change with time ¨ Information doesn’t change with time n Non-stationary signals: ¨ Statistics change with time ¨ Frequencies change with time ¨ Information quantity increases

Stationary Magnitude 2 Hz + 10 Hz + 20 Hz Magnitude Non-stationary signals Non.

Stationary Magnitude 2 Hz + 10 Hz + 20 Hz Magnitude Non-stationary signals Non. Stationary Frequency (Hz) Magnitude 0. 0 -0. 4: 2 Hz + 0. 4 -0. 7: 10 Hz + 0. 7 -1. 0: 20 Hz Magnitude Time Frequency (Hz)

Chirp signal Frequency: 2 Hz to 20 Hz n Frequency (Hz) Magnitude Time Frequency:

Chirp signal Frequency: 2 Hz to 20 Hz n Frequency (Hz) Magnitude Time Frequency: 20 Hz to 2 Hz Magnitude Different in Time Domain Magnitude n Time Same in Frequency Domain Frequency (Hz)

Fourier transform drawbacks n n Global behaviour: we don’t know what frequencies happens at

Fourier transform drawbacks n n Global behaviour: we don’t know what frequencies happens at a particular time Time and frequency are not seen together We need time and frequency at the same time: time-frequency representation Biological or medical signals (ECG, EEG, EMG) are always non-stationary

Short-time Fourier Transform (STFT) n Dennis Gabor (1946): “windowing the signal” n Signals are

Short-time Fourier Transform (STFT) n Dennis Gabor (1946): “windowing the signal” n Signals are assumed to be stationally local n A 2 D transform

Short-time Fourier Transform (STFT) A function of time and frequency

Short-time Fourier Transform (STFT) A function of time and frequency

Short-time Fourier Transform (STFT)

Short-time Fourier Transform (STFT)

Short-time Fourier Transform (STFT)

Short-time Fourier Transform (STFT)

Short-time Fourier Transform (STFT) Narrow Window Wide Window

Short-time Fourier Transform (STFT) Narrow Window Wide Window

STFT drawbacks Fixed window with time/frequency n Resolution: n ¨ Narrow window gives good

STFT drawbacks Fixed window with time/frequency n Resolution: n ¨ Narrow window gives good time resolution but poor frequency resolution ¨ Wide windows gives good frequency resolution but poor time resolution

Heisenberg Uncertainty Principle n In signal processing: ¨ You cannot know at the same

Heisenberg Uncertainty Principle n In signal processing: ¨ You cannot know at the same time the time and frequency of a signal ¨ Signal processing approach is to search for what spectral components exist at a given time interval

Heisenberg Uncertainty Principle n Heisenberg Box

Heisenberg Uncertainty Principle n Heisenberg Box

Wavelet transform An improved version of the STFT, but similar n Decompose a signal

Wavelet transform An improved version of the STFT, but similar n Decompose a signal in a set of signals n Capable of multiresolution analysis: n ¨ Different resolution at different frequencies

Continuous Wavelet Transform n Definition: Translation (The location of the window) Scale Mother Wavelet

Continuous Wavelet Transform n Definition: Translation (The location of the window) Scale Mother Wavelet

Continuous Wavelet Transform n Wavelet = small wave (“ondelette”) ¨ Windowed n (finite length)

Continuous Wavelet Transform n Wavelet = small wave (“ondelette”) ¨ Windowed n (finite length) signal Mother wavelet ¨ Prototype to build other wavelets with dilatation/compression and shifting operators n Scale ¨ S>1: dilated signal ¨ S<1: compressed signal n Translation ¨ Shifting of the signal

CWT practical computation Energy normalization 1. 2. 3. 4. Select s=1 and t=0. Compute

CWT practical computation Energy normalization 1. 2. 3. 4. Select s=1 and t=0. Compute the integral and normalize by 1/ Shift the wavelet by t=Dt and repeat until wavelet reaches the end of signal Increase s and repeat steps 1 to 3

Time-frequency resolution Better time resolution; Poor frequency resolution Frequency Better frequency resolution; Poor time

Time-frequency resolution Better time resolution; Poor frequency resolution Frequency Better frequency resolution; Poor time resolution Time • Each box represents a equal portion • Resolution in STFT is selected once for entire analysis

Comparison of transformations From http: //www. cerm. unifi. it/EUcourse 2001/Gunther_lecturenotes. pdf, p. 10

Comparison of transformations From http: //www. cerm. unifi. it/EUcourse 2001/Gunther_lecturenotes. pdf, p. 10

Mathematical view n CWT is the inner product of the signal and the basis

Mathematical view n CWT is the inner product of the signal and the basis function

Wavelet basis functions 2 nd derivative of a Gaussian is the Marr or Mexican

Wavelet basis functions 2 nd derivative of a Gaussian is the Marr or Mexican hat wavelet

Wavelet basis functions Time domain Frequency domain

Wavelet basis functions Time domain Frequency domain

Wavelet basis properties

Wavelet basis properties

Discrete Wavelet Transform n Continuous Wavelet Transform n Discrete Wavelet Transform

Discrete Wavelet Transform n Continuous Wavelet Transform n Discrete Wavelet Transform

Discrete CWT Sampling of time-scale (frequency) 2 D space n Scale s is discretized

Discrete CWT Sampling of time-scale (frequency) 2 D space n Scale s is discretized in a logarithmic way n ¨ Scheme n most used is dyadic: s=1, 2, 4, 8, 16, 32 Time is also discretized in a logarithmic way ¨ Sampling n rate N is decreased so s N=k Implemented like a filter bank

Discrete Wavelet Transform Approximation Details

Discrete Wavelet Transform Approximation Details

Discrete Wavelet Transform

Discrete Wavelet Transform

Discrete Wavelet Transform Multi-level wavelet decomposition tree Reassembling original signal

Discrete Wavelet Transform Multi-level wavelet decomposition tree Reassembling original signal

Discrete Wavelet Transform n n Easy and fast to implement Gives enough information for

Discrete Wavelet Transform n n Easy and fast to implement Gives enough information for analysis and synthesis Decompose the signal into coarse approximation and details A It’s not a true discrete transform S S D 1 1 D 2 A 3 D 3

Examples f. L Signal: 0. 0 -0. 4: 20 Hz 0. 4 -0. 7:

Examples f. L Signal: 0. 0 -0. 4: 20 Hz 0. 4 -0. 7: 10 Hz 0. 7 -1. 0: 2 Hz f. H Wavelet: db 4 Level: 6

Examples f. L Signal: 0. 0 -0. 4: 2 Hz 0. 4 -0. 7:

Examples f. L Signal: 0. 0 -0. 4: 2 Hz 0. 4 -0. 7: 10 Hz 0. 7 -1. 0: 20 Hz f. H Wavelet: db 4 Level: 6

Signal synthesis A signal can be decomposed into different scale components (analysis) n The

Signal synthesis A signal can be decomposed into different scale components (analysis) n The components (wavelet coefficients) can be combined to obtain the original signal (synthesis) n If wavelet analysis is performed with filtering and downsampling, synthesis consists of filtering and upsampling n

Synthesis technique n Upsampling (insert zeros between samples)

Synthesis technique n Upsampling (insert zeros between samples)

Sub-band algorithm n Each step divides by 2 time resolution and doubles frequency resolution

Sub-band algorithm n Each step divides by 2 time resolution and doubles frequency resolution (by filtering)

Wavelet packets Generalization of wavelet decomposition n Very useful for signal analysis n Wavelet

Wavelet packets Generalization of wavelet decomposition n Very useful for signal analysis n Wavelet analysis: n+1 (at level n) different ways to reconstuct S

Wavelet packets n We have a complete tree Wavelet packets: a lot of new

Wavelet packets n We have a complete tree Wavelet packets: a lot of new possibilities to reconstruct S: i. e. S=A 1+AD 2+ADD 3+DDD 3

Wavelet packets A new problem arise: how to select the best decomposition of a

Wavelet packets A new problem arise: how to select the best decomposition of a signal x(t)? n Posible solution: n ¨ Compute information at each node of the tree (entropy-based criterium)

Wavelet family types n Five diferent types: ¨ Orthogonal wavelets with FIR filters n

Wavelet family types n Five diferent types: ¨ Orthogonal wavelets with FIR filters n Haar, Daubechies, Symlets, Coiflets ¨ Biorthogonal wavelets with FIR filters n Biorsplines ¨ Orthogonal wavelets without FIR filters scaling function n and with Meyer ¨ Wavelets without FIR filters and scaling function n Morlet, Mexican Hat ¨ Complex wavelets without FIR filters and scaling function n Shannon

Wavelet families: Daubechies n Compact support, orthonormal (DWT)

Wavelet families: Daubechies n Compact support, orthonormal (DWT)

Other families

Other families

Matlab wavemenu command

Matlab wavemenu command

Wavelet application n n Physics (acoustics, astronomy, geophysics) Telecommunication Engineering (signal processing, subband coding,

Wavelet application n n Physics (acoustics, astronomy, geophysics) Telecommunication Engineering (signal processing, subband coding, speech recognition, image processing, image analysis) Mecanical engineering (turbulence) Medical (digital radiology, computer aided diagnosis, human vision perception) Applied and Pure Mathematics (fractals)

De-noising signals Frequency is higher at the beginning Details reduce with scale

De-noising signals Frequency is higher at the beginning Details reduce with scale

De-noising images

De-noising images

Detecting discontinuities

Detecting discontinuities

Detecting discontinuities

Detecting discontinuities

Detecting self-similarity

Detecting self-similarity

Compressing images

Compressing images

2 -D Wavelet Transform

2 -D Wavelet Transform

Wavelet Packets

Wavelet Packets

2 -D Wavelets

2 -D Wavelets

Applications of wavelets n Pattern recognition ¨ Biotech: to distinguish the normal from the

Applications of wavelets n Pattern recognition ¨ Biotech: to distinguish the normal from the pathological membranes ¨ Biometrics: facial/corneal/fingerprint recognition n Feature extraction ¨ n Metallurgy: characterization of rough surfaces Trend detection: ¨ Finance: n exploring variation of stock prices Perfect reconstruction ¨ Communications: n wireless channel signals Video compression – JPEG 2000

Practical use of wavelet n Wavelet software ¨ Matlab n Wavelet Toolbox Free software

Practical use of wavelet n Wavelet software ¨ Matlab n Wavelet Toolbox Free software ¨ Uvi. Wave http: //www. tsc. uvigo. es/~wavelets/uvi_wave. html ¨ Wavelab http: //playfair. stanford. edu/~wavelab/ ¨ Rice Tools http: //jazz. rice. edu/RWT/

Useful Links to continue Matlab wavelet tool using guide n http: //www. wavelet. org

Useful Links to continue Matlab wavelet tool using guide n http: //www. wavelet. org n http: //www. multires. caltech. edu/teaching/ n http: //www-dsp. rice. edu/software/RWT/ n www. multires. caltech. edu/teaching/course s/ waveletcourse/sig 95. course. pdf n http: //www. amara. com/current/wavelet. htm l n