0% found this document useful (0 votes)
72 views79 pages

DWT 6

Uploaded by

Duaa Hussein
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
72 views79 pages

DWT 6

Uploaded by

Duaa Hussein
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 79

Image processing

4-2020-? Lecture 6
Fourier Transformation

x1 ( t )  cos( 2 5t )

x 2 ( t )  cos( 2  25  t )

x3 ( t )  cos( 2 50t )

1D-Signal

Coefficient * sinusoid of appropriate frequency The original signal


Fourier Transformation
x4 (t )  cos(2  5  t )
 cos( 2  25  t )
 cos( 2  50  t )

• Stationary Signal
– Signals with frequency content unchanged in time
– All frequency components exist at all times

• Non-stationary Signal
– Frequency changes in time
– One example: the “Chirp Signal”
Chirp Signals

requency: 2 Hz to 20 Hz Different in Time Domain Frequency: 20 Hz to 2 Hz


1 150 1 150

0.8 0.8

0.6 0.6
e
Magnitud

0.4

Magnitud
e
0.4
e
Magnitud

100 100

e
Magnitud
0.2 0.2

0 0

-0.2 -0.2
50 50
-0.4 -0.4

-0.6 -0.6

-0.8 -0.8

-1 0 -1 0
0 0.5 1 0 5 10 15 20 25 0 0.5 1 0 5 10 15 20 25
Time Frequency (Hz) Time Frequency (Hz)

Same in Frequency Domain

!!At
Atwhat
whattime
timethe
thefrequency
frequencycomponents
componentsoccur?
occur? FT
FTcan
cannot
nottell
tell
Stationary Vs. Non-Stationary Signals
• Stationary signals’ spectral characteristics do not change with time
x 4 ( t )  cos( 2  5  t ) X4(ω)

 cos( 2  25  t )

 cos( 2  50  t )

Per
f
exis ect kn
o
the t, but n wledg
se f e
req o infor of wh
uen m
cies ation at freq
are abo uen
loca u t wh cies
• Non-stationary signals have time varying spectra ted e
i n t i re
me
x5 ( t ) [ x1  x2  x3 ]
 Concatenation X5(ω)

5
Stationary & Non-Stationary Signals
• FT identifies all spectral components present in the signal,
however it does not provide any information regarding the
temporal (time) localization of these components. Why?
• Stationary signals consist of spectral components that do not
change in time
– all spectral components exist at all times
– no need to know any time information
– FT works well for stationary signals
• However, non-stationary signals consists of time varying
spectral components
– How do we find out which spectral component appears
when?
– FT only provides what spectral components exist, not
where in time they are located.
– Need some other ways to determine time localization of
spectral components.
Short Time Fourier Transform(STFT)
• Dennis Gabor (1946) Used STFT
– To analyze only a small section of the signal at a time
-- a technique called Windowing the Signal.
• The Segment of Signal is Assumed Stationary

STFTX    t , f     x t   *  t  t    e  j 2 ft dt
t
 t  : the window function
A function of time and frequency

Time
Frequency parameter Signal to
FT Kernel
parameter be analyzed
(basis function)

STFTx ( , )    x(t )  h(t   )  e  jt dt


t

:STFT of signal x(t) Windowing ’Windowing function centered at t=t


Computed for each function
’window centered at t=t
Short Time Fourier Transform(Stft)
1. Choose a window function of finite length
2. Place the window on top of the signal at t=0
3. Truncate the signal using this window
4. Compute the FT of the truncated signal, save.
5. Incrementally slide the window to the right
6. Go to step 3, until window reaches the end of the
signal
• For each time location where the window is centered,
we obtain a different FT
– Hence, each FT provides the spectral information
of a separate time-slice of the signal, providing
simultaneous time and frequency information
(Stft)
The Gabor transform is a special case of the STFT. The function to be
transformed is first multiplied by a Gaussian function, which can be regarded as a
window, and the resulting function is then transformed with a Fourier transform
to derive the time-frequency analysis. The window function means that the signal
near the time being analyzed will have higher weight. The mathematical definition
is given below:
signal x(t) 
~
X ( , )    x (t ) h (t   )  e  i t
dt
window h(t-) 

signal in window

Introduce basis functions which are compact in time and frequency domains.
Let us divide the input signal into time sub-intervals, and perform DFT for
every time sub-interval.


~ Gabor transfortm is a special
 x(t )e
 (t  ) 2 / 2 2 it
X ( , )  e dt case of STFT
 Window is a Gaussian function
(Drawbacks of Stft)
• Unchanged Window of Resolution
– Narrow window -> poor frequency resolution
– Wide window -> poor time resolution
• Heisenberg Uncertainty Principle
– Cannot know what frequency exists at what time intervals

Narrow window -> poor frequency resolution


Wide window -> poor time resolution
Selection of Stft Window

STFTx ( , )    x(t )  h(t   )  e  jt dt


t

Two extreme cases:


• W(t) infinitely long: W (t )  1  STFT turns into FT, providing
excellent frequency information (good frequency resolution), but no time
information
• W(t) infinitely short: W (t )   (t )

STFTx ( , )    x(t )   (t   )  e  jt dt  x( )  e  j


t
 STFT then gives the time signal back, with a phase factor. Excellent
time information (good time resolution), but no frequency information
Wide analysis window poor time resolution, good frequency resolution
Narrow analysis windowgood time resolution, poor frequency resolution
Once the window is chosen, the resolution is set for both time and frequency.
The Wavelet Transform

Wide windows do not


provide good localization
at high frequencies.

Use narrower windows


.at high frequencies
The Wavelet Transform
Narrow windows do
not provide good
localization at low
frequencies.

Use wider windows at


.low frequencies
Heisenberg Principle

1
t   
4 
t
Time resolution: How well two Frequency resolution: How well two
spikes in time can be separated spectral components can be separated
from each other in the transform from each other in the transform
domain domain

Both time and frequency resolutions cannot be arbitrarily high!!!


 We cannot precisely know at what time instance a frequency
component is located. We can only know what interval of frequencies
are present in which time intervals
The Wavelet Transform

• Overcomes the preset resolution problem of the STFT by


using a variable length window
• Analysis windows of different lengths are used for
different frequencies:
– Analysis of high frequencies Use narrower windows for
better time resolution
– Analysis of low frequencies  Use wider windows for
better frequency resolution
• This works well, if the signal to be analyzed mainly consists
of slowly varying characteristics with occasional short high
frequency bursts.
• Heisenberg principle still holds!!!
• The function used to window the signal is called the wavelet
Time-frequency plane for Wavelets
Use wider time window for lower frequencies!

1
  t 
4
 1
 Const  t ~
 

Heisenberg cell
Time Frequency Grid in CWT
Scale

a=1/4 4Δf
Δt/4

Δt/2
a=1/2 2Δf

Δt
a=1 Δf

a=2 2Δt
Δf/2
4Δt
Time
½ ≥ Δt * Δf
Resolution of Time & frequency
Better time • Each box represents a equal portion
;resolution
Poor frequency • Resolution in STFT is selected once
Frequency

resolution for entire analysis

Better frequencyTime
;resolution
Poor time
resolution

Comparison of
Transformations

From http://www.cerm.unifi.it/EUcourse2001/Gunther_lecturenotes.pdf, p.10


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

Coefficient * appropriately scaled and shifted wavelet


The original signal
Examples of Mother wavelet

Translation parameter, Scale parameter, A normalization Signal to be


measure of time measure of frequency constant analyzed

1  t  
 x t 
 
CWTx ( , s )  x ( , s )   dt
s t  s 
Continuous wavelet transform of the The mother wavelet. All kernels are obtained by
signal x(t) using the analysis wavelet translating (shifting) and/or scaling the mother
(.) wavelet
Scale = 1/frequency

•b – shift coefficient ( ) 1   t  b 
•a – scale coefficient CWTx ( a , b )  W ( a , b )   x (t )    dt
a   a 
1  t  
CWTx ( , s)  
x ( , s )   x  t   dt
s t  s 

• Wavelet
– Small wave
– Means the window function is of finite length
• Mother Wavelet
– A prototype for generating the other window functions
– All the used windows are its dilated or compressed and shifted versions.
• Scale
– S>1: dilate the signal
– S<1: compress the signal
• Low Frequency -> High Scale -> Non-detailed Global View of Signal -> Span Entire
Signal
• High Frequency -> Low Scale -> Detailed View Last in Short Time
• Only Limited Interval of Scales is Necessary
Translation () and Scaling(s)

1  t  
s , (t )   
s  s 

Scaling(a)
Computation of CWT

1 * t   
CWT  , s     , s  

x

x  x t     dt
s  s 

Step 1: The wavelet is placed at the beginning of the signal, and set
s=1(the most compressed wavelet);
Step 2: The wavelet function at scale “1” is multiplied by the signal, and
integrated over all times; then multiplied by
Step 3: Shift the wavelet to t= , and get the transform value at t= and
s=1;
Step 4: Repeat the procedure until the wavelet reaches the end of the
signal;
Step 5: Scale s is increased by a sufficiently small value, the above
procedure is repeated for all s;
Step 6: Each computation for a given s fills the single row of the time-
scale plane;
Step 7: CWT is obtained if all s are calculated.
WT
WT
Properties of Wavelets
• Simultaneous localization in time and scale
- The location of the wavelet allows to explicitly represent the
location of events in time.
- The shape of the wavelet allows to represent different detail or
resolution.
Properties of Wavelets
• Sparsely: for functions typically found in practice, many of the
coefficients in a wavelet representation are either zero or very small.
• Linear-time complexity: many wavelet transformations can be
accomplished in O(N) time.
• Adaptability: wavelets can be adapted to represent a wide variety of
functions (e.g., functions with discontinuities, functions defined on
bounded domains etc.).
– Well suited to problems involving images, open or closed curves, and
surfaces of just about any variety.
– Can represent functions with discontinuities or corners more
efficiently (i.e., some have sharp corners themselves).
• It represents and analyzes signals at more than one resolution.
• 2 related operations with ties to MRA(Multi Resolution Analysis):
 Subband coding
 Haar transform
• MRA is just a concept, and the wavelet-based transformation is one
method to implement it.
Multiresolution Representation using
a jk   f (t ) *jk (t ) f (t )   a jk  jk (t ) high
t k j
resolution
(more details)


low
resolution
)less details(
Discretization of CWT
• It is Necessary to Sample the Time-Frequency (scale) Plane.
• At High Scale s (Lower Frequency f ), the Sampling Rate N can be
Decreased.
• The Scale Parameter s is Normally Discretized on a Logarithmic Grid.
• The most Common Value is 2.
• The Discretized CWT is not a True Discrete Transform

• Discrete Wavelet Transform (DWT)


– Provides sufficient information both for analysis and synthesis
– Reduce the computation time sufficiently
– Easier to implement
– Analyze the signal at different frequency bands with different
resolutions
– Decompose the signal into a coarse approximation and detail
information
Once the Mother wavelet ψ(t) is fixed, one can form a basis from it by
applying translations and scalings (stretch/compress) : 1  t  
s , (t )   
s  s 
It is convenient to take special values for s and  in defining the wavelet
basis: S=2-j and  k .2 j

1  t  k .2 j  j
 t  k .2 j

s , (t )   j   j
  2 
2
j
  jk (t ) )dyadic/octave grid(
2  2   2 
1  t  k .2 j  j
 t  k .2 j

s , (t )   j   j
  2 2
  j
  jk (t )
2  2   2 
j

 jk (t )  2   2 j t  k 
2 high
resolution

scale/frequency j
localization

low
time localization resolution
Discrete Wavelets

Ψ j , k (t )  2 j 2 Ψ (2 j t  k )
• f(t) is written as a linear combination of φ(t-k) and ψ(2jt-k)

f (t )   ck (t  k )   d j ,k (2 t  k )
j

k k j

scaling function wavelet function

Haar scaling and wavelet functions

computes average computes details


Haar Transform
φ(t)
ψ(t)
Using the basis function in V2

φ0,2(x)
i j ( x )  i , j ( x )
φ1,2(x)

φ2,2(x)
φ0,1(x)
φ3,2(x)
φ1,1(x)

ψ0,1(x) Using the basis function in V1 and W1


V2=V1+W1

ψ1,1(x)
i j ( x )  i , j ( x )
 i j ( x )   i , j ( x)
φ0,0(x)

Using the basis function in V0 ,W0 and W1


ψ0,0(x)
V2=V1+W1=V0+W0+W1

ψ0,1(x)
i j ( x )  i , j ( x )  i j ( x)   i , j ( x)
ψ1,1(x)
Discrete Wavelet Transform
• The continuous wavelet transform was computed by changing the scale
of the analysis window, shifting the window in time, multiplying by the
signal, and integrating over all times.
• In the discrete case, filters of different cutoff frequencies are used
to analyze the signal at different scales. The signal is passed through a
series of highpass filters to analyze the high frequencies, and it is
passed through a series of lowpass filters to analyze the low
frequencies.
– The resolution of the signal, which is a measure of the amount of
detail information in the signal, is changed by the filtering
operations.
– The scale is changed by upsampling and downsampling operations.

CWTx ( , s )  
1
x ( , s )  s  x t  
t
 
 t  dt
s

Binary dilation  (t ) Dyadic translation


k
j j
2 2
j
{ j , k } hvor  j , k ( t )   ( 2 t  k)
Fast Wavelet Transform
Multiresolution refinement equation

:Scaling x by 2j, translating it by k, and letting m = 2k+n gives

:Similarly, we get

:The coefficients

:Scaling function

:Substituting j0 = j+1, k = m
Fast Wavelet Transform
:By definition

Order reversed version

Forward FWT
analysis bank
(MRA)-Subband Coding

• Since the bandwidth of the resulting subbands is smaller than that of the
original image, the subbands can be downsampled without loss of information.
• We wish to select h0  n  , h1  n  , g 0  n  , g1  n  so that the input can be perfectly
reconstructed.
Biorthogonal
Orthonormal
• Calculating the wavelets coefficients at every possible scale is too much
work
• It also generates a very large amount of data

T
DW
Solution: choose only a subset of scales and positions, based on power of
two (dyadic choice)
Fast Wavelet Transform

(a) A two stage FWT


analysis bank

Scaling Space Vj is split into wavelet


subspace Wj-1 and scaling subspace Vj-1.
The spectrum of the original function is split
into two half –band components. The second
filter bank split the spectrum ans subspace
Vj-1, the lower half band, into quarter-band
subspaces Wj-2 and vj-2 with corresponding
(b) Frequency splitting characteristic DWT coefficients Wф (j-1,n) and WΨ (j-1,n).
DWT Demystified

Length: 512 |H(jw)|


B: 0 ~ 

g[n] h[n]
w
Length: 256 /2- /2
Length: 256 2 2 B: 0 ~ /2 Hz
B: /2 ~  Hz
a1 |G(jw)|
d1: Level 1
DWT
.Coeff g[n] h[n]
Length: 128
Length: 128 2 2 w
B: 0 ~  /4 Hz - /2- /2 
B: /4 ~ /2 Hz a2
d2: Level 2
DWT g[n] h[n]
.Coeff
2 2 Length: 64
Length: 64
B: 0 ~ /8 Hz
B: /8 ~ /4 Hz
d3: Level 3 .…a3… Level 3 approximation
DWT Coefficients
.Coeff
V1 basis functions
]5 3 7 9[
,low-pass
down-sampling ,high-pass
down-sampling

2/)3-5( 2/)9-7( 2/)3+5( 2/)9+7(

] 5 3 7 9[

,low-pass ,high-pass
down-sampling down-sampling
V1 basis functions

(8+4)/2 (8-4)/2
Fast Wavelet Transform

-
Fast Wavelet Transform

Underlined: negative indices


Inverse Fast Wavelet Transform
Inverse FWT: Example

Computing a two scale inverse fast wavelet transform of sequence


With haar scaling and wavelet functions.
Wavelet Transform in 2D
Implementation of 2D-DWT

~
LL Ak 1
COLUMNS
H 2 1
ROWS ~
H 1 2
……
COLUMNS
~ D ( h)
G 2 1 LH k 1
ROWS
……

INPUT COLUMNS
IMAGE ~
H 2 1 HL Dk(v)1
~ 1 2
G
ROWS
~ D (d )
G 2 1 HH k 1
COLUMNS

LLL LLH LLH


LL LH LHL LHH
LH LHL LL
LHH
LH
INPUT
IMAGE
HL HH HL HH HL HH
DWT Implementation

columns columns
rows H 2 a a 2 u1
x0 y1 H rows
H 2 y1 x1
+ 2 H
LPF G 2 h h 2 G u2 + x0
H 2 v v 2 u3
y2 H
G 2 y2
+ 2 G x2
HPF G 2 d d 2 G u4

1-level 2D-DWT
FWT in 2D

Analysis Filter Bank


Synthesis Filter Bank

A H

LL LH
.Ver D

HL HH
FWT in 2D:Example

Computing a 2D three-scale FWT(a) the


original image ;(b) a one scale FWT;© a two-
scale FWT; and (d) a three scale FWT.
high pass

high pass high pass


FWT in 2D:Example
LPF coefficient of Haar
8 7 6 5 4 3 2 1
8 7 6 5 4 3 2 1
8 7 6 5 4 3 2 1
8 7 6 5 4 3 2 1
8 7 6 5 4 3 2 1 HPF coefficient of Haar

8 7 6 5 4 3 2 1 -
8 7 6 5 4 3 2 1
8 7 6 5 4 3 2 1

Each row of matrix X0 is passed through LPF .1


8 7 6 5 4 3 2 1 x
8/√2 7/√2 6/√2 2√/5 4/√2 2√/3 2√/2 2√/1 2√/1
8/√2 7/√2 6/√2 5/√2 4/√2 3/√2 2/√2 1/√2 1/√2

8/√2 15/√2 13/√ 11/√2 9/√2 7/√2 2√/5 2√/3 2√/1


2
The above process is done for all each row in the matrix X 0. After decimation the
result by two
15/√2 11/√2 7/√2 3/√2
15/√2 11/√2 7/√2 3/√2
15/√2 11/√2 7/√2 3/√2
=Y1
15/√2 11/√2 7/√2 3/√2
15/√2 11/√2 7/√2 3/√2
15/√2 11/√2 7/√2 3/√2
15/√2 11/√2 7/√2 3/√2
15/√2 11/√2 7/√2 3/√2

Each column of y1 is passed through LPF

2√/3 2√/3 2√/3 2√/3 2√/3 2√/3 2√/3 2√/3 x


3/2 3/2 3/2 3/2 3/2 3/2 3/2 3/2 2√/1
3/2 3/2 3/2 3/2 3/2 3/2 3/2 3/2 1/√2

3/2 3 3 3 3 3 3 3 3/2
2√/7 2√/7 2√/7 2√/7 2√/7 2√/7 2√/7 2√/7 x
7/2 7/2 7/2 7/2 7/2 7/2 7/2 7/2 2√/1
7/2 7/2 7/2 7/2 7/2 7/2 7/2 7/2 1/√2

7/2 7 7 7 7 7 7 7 7/2
7 -- 7 -- 7 -- 7 ---

2√/11 2√/11 2√/11 2√/11 2√/11 2√/11 2√/11 2√/11 x


11/2 11/2 11/2 11/2 11/2 11/2 11/2 11/2 2√/1
11/2 11/2 11/2 11/2 11/2 11/2 11/2 11/2 1/√2

11/2 11 11 11 11 11 11 11 11/2
11 -- 11 -- 11 -- 11 ---
After decimation the result by two
15 11 7 3
=a1 15 11 7 3 LL
15 11 7 3
Each column of y1 is passed through HPF 15 11 7 3

2√/3 2√/3 2√/3 2√/3 2√/3 2√/3 2√/3 2√/3 x


3/2- 3/2- 3/2- 3/2- 3/2- 3/2- 3/2- 3/2- -1/√2
3/2 3/2 3/2 3/2 3/2 3/2 3/2 3/2 1/√2

3/2 0 0 0 0 0 0 0 -3/2

2√/7 2√/7 2√/7 2√/7 2√/7 2√/7 2√/7 2√/7 x


7/2- 7/2- 7/2- 7/2- 7/2- 7/2- 7/2- 7/2- -1/√2
7/2 7/2 7/2 7/2 7/2 7/2 7/2 7/2 1/√2

7/2 0 0 0 0 0 0 0 -7/2
After decimation the result by two 0 0 0 0

=h1
0
0
0
0
0
0
0
0
LH
0 0 0 0

Each row of matrix X0 is passed through HPF .2

8 7 6 5 4 3 2 1 x
-8/√2 -7/√2 -6/√2 2√/5- -4/√2 -3/√2 2√/2- 2√/1- -1/√2
8/√2 7/√2 6/√2 5/√2 4/√2 3/√2 2/√2 1/√2 1/√2

8/√2 -1/√2 -1/√2 -1/√2 -1/√2 -1/√2 -1/√2 -1/√2 -1/√2

The above process is done for all each row in the matrix X 0. After decimation the
result by two
-1/√2 -1/√2 -1/√2 -1/√2
-1/√2 -1/√2 -1/√2 -1/√2
-1/√2 -1/√2 -1/√2 -1/√2

=Y2 -1/√2 -1/√2 -1/√2 -1/√2


-1/√2 -1/√2 -1/√2 -1/√2
-1/√2 -1/√2 -1/√2 -1/√2
-1/√2 -1/√2 -1/√2 -1/√2
-1/√2 -1/√2 -1/√2 -1/√2

Each column of y2 is passed through LPF

2√/1- 2√/1- 2√/1- 2√/1- 2√/1- 2√/1- 2√/1- 2√/1- x


1/2- 1/2- 1/2- 1/2- 1/2- 1/2- 1/2- 1/2- -1/√2
1/2- 1/2- 1/2- 1/2- 1/2- 1/2- 1/2- 1/2- 1/√2

-1/2 -1 -1 -1 -1 -1 -1 -1 -1/2
The above process is done for each column in matrix Y 2. After decimation the
results by two 1- 1- 1- -
1
=v1
1- 1- 1- -
1
HL
1- -1- 1-
Each column of y2 is passed through
1 HPF
1- 1- 1- -
2√/1- 2√/1- 2√/1- 2√/1- 2√/1- 2√/1- 2√/1- 2√/1- x
1
1/2 1/2 1/2 1/2 1/2 1/2 1/2 1/2 -1/√2
1/2- 1/2- 1/2- 1/2- 1/2- 1/2- 1/2- 1/2- 1/√2

-1/2 0 0 0 0 0 0 0 1/2

The above process is done for each column in matrix Y2. After decimation the
results by two
0 0 0 0

HH
=d 1 0 0 0 0
0 0 0 0
0 0 0 0
Further N-level of decomposition are applied over the a (low-low) subband.
Inverse FWT in 2D
1.The result of interpolation a1 by 2 is:
0 0 0 0
15 11 7 3
0 0 0 0
15 11 7 3
0 0 0 0
15 11 7 3
0 0 0 0
15 11 7 3

Each of these columns is passed through LPF


3 0 3 0 3 0 3 0 x
3/√2 0 3/√2 0 3/√2 0 3/√2 0 1/√2
3/√2 0 3/√2 0 3/√2 0 3/√2 0 1/√2

3/√2 3/√2 3/√2 3/√2 3/√2 3/√2 3/√2 3/√2 0

7 0 7 0 7 0 7 0 x
7/√2 0 7/√2 0 7/√2 0 7/√2 0 1/√2
7/√2 0 7/√2 0 7/√2 0 7/√2 0 1/√2

7/√2 7/√2 7/√2 7/√2 7/√2 7/√2 7/√2 7/√2 0

Same as row (11,15)


15/√2 11/√2 7/√2 3/√2

15/√2 11/√2 7/√2 3/√2


15/√2 11/√2 7/√2 3/√2
=u 1 15/√2 11/√2 7/√2 3/√2
15/√2 11/√2 7/√2 3/√2
15/√2 11/√2 7/√2 3/√2
15/√2 11/√2 7/√2 3/√2
15/√2 11/√2 7/√2 3/√2

The result of interpolation h1 by 2 is.2


0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0 0 0 0 0 x
0 0 0 0 0 0 0 0 1/√2
0 0 0 0 0 0 0 0 -1/√2

0 0 0 0 0 0 0 0 0

0 0 0 0
0 0 0 0
0 0 0 0
=U 2
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
15/√2 11/√2 7/√2 3/√2
15/√2 11/√2 7/√2 3/√2
15/√2 11/√2 7/√2 3/√2
U1+U2= Y1 = 15/√2 11/√2 7/√2 3/√2
15/√2 11/√2 7/√2 3/√2
15/√2 11/√2 7/√2 3/√2
15/√2 11/√2 7/√2 3/√2
15/√2 11/√2 7/√2 3/√2

The result of interpolation y1 by 2 is.3


15/√2 0 11/√2 0 7/√2 0 3/√2 0

15/√2 0 11/√2 0 7/√2 0 3/√2 0


15/√2 0 11/√2 0 7/√2 0 3/√2 0
15/√2 0 11/√2 0 7/√2 0 3/√2 0
=x1
15/√2 0 11/√2 0 7/√2 0 3/√2 0
15/√2 0 11/√2 0 7/√2 0 3/√2 0
15/√2 0 11/√2 0 7/√2 0 3/√2 0
15/√2 0 11/√2 0 7/√2 0 3/√2 0
The result of interpolation v1 by 2 is.4

0 0 0 0
-1 -1 -1 -1
0 0 0 0
-1 -1 -1 -1
0 0 0 0
-1 -1 -1 -1
0 0 0 0
-1 -1 -1 -1

Each of these columns is passed through LPF

-1 0 -1 0 -1 0 -1 0 x
-1/√2 0 -1/√2 0 -1/√2 0 -1/√2 0 1/√2
-1/√2 0 -1/√2 0 -1/√2 0 -1/√2 0 1/√2

-1/√2 -1/√2 -1/√2 -1/√2 -1/√2 -1/√2 -1/√2 -1/√2 0


-1/√2 -1/√2 -1/√2 -1/√2
-1/√2 -1/√2 -1/√2 -1/√2
-1/√2 -1/√2 -1/√2 -1/√2
=u3 -1/√2 -1/√2 -1/√2 -1/√2
-1/√2 -1/√2 -1/√2 -1/√2
-1/√2 -1/√2 -1/√2 -1/√2
-1/√2 -1/√2 -1/√2 -1/√2
-1/√2 -1/√2 -1/√2 -1/√2

The result of interpolation d1 by 2 is.5


0 0 0 0
0 0 0 0
0 0 0 0

=u4 0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
Then
-1/√2 -1/√2 -1/√2 -1/√2
-1/√2 -1/√2 -1/√2 -1/√2
-1/√2 -1/√2 -1/√2 -1/√2
= U4+U3= Y2 -1/√2 -1/√2 -1/√2 -1/√2
-1/√2 -1/√2 -1/√2 -1/√2
-1/√2 -1/√2 -1/√2 -1/√2
-1/√2 -1/√2 -1/√2 -1/√2
-1/√2 -1/√2 -1/√2 -1/√2
The result of interpolation y2 by 2 is.6

-1/√2 0 -1/√2 0 -1/√2 0 -1/√2 0


-1/√2 0 -1/√2 0 -1/√2 0 -1/√2 0
-1/√2 0 -1/√2 0 -1/√2 0 -1/√2 0
-1/√2 0 -1/√2 0 -1/√2 0 -1/√2 0
-1/√2 0 -1/√2 0 -1/√2 0 -1/√2 0
-1/√2 0 -1/√2 0 -1/√2 0 -1/√2 0
-1/√2 0 -1/√2 0 -1/√2 0 -1/√2 0
-1/√2 0 -1/√2 0 -1/√2 0 -1/√2 0
Each of these columns is passed through HPF

-1/√2 0 -1/√2 0 -1/√2 0 -1/√2 0 x


-1/2 0 -1/2 0 -1/2 0 -1/2 0 1/√2
1/2 0 1/2 0 1/2 0 1/2 0 -1/√2

1/2 -1/2 1/2 -1/2 1/2 -1/2 1/2 -1/2 0

1/2 -1/2 1/2 -1/2 1/2 -1/2 1/2 -1/2


1/2 -1/2 1/2 -1/2 1/2 -1/2 1/2 -1/2
1/2 -1/2 1/2 -1/2 1/2 -1/2 1/2 -1/2
=x 2
1/2 -1/2 1/2 -1/2 1/2 -1/2 1/2 -1/2
1/2 -1/2 1/2 -1/2 1/2 -1/2 1/2 -1/2
1/2 -1/2 1/2 -1/2 1/2 -1/2 1/2 -1/2
1/2 -1/2 1/2 -1/2 1/2 -1/2 1/2 -1/2
1/2 -1/2 1/2 -1/2 1/2 -1/2 1/2 -1/2
:At last ,the two –dimensional data x0is reconstructed by.7

8 7 6 5 4 3 2 1
8 7 6 5 4 3 2 1
8 7 6 5 4 3 2 1
x1+x2=x0= 8 7 6 5 4 3 2 1
8 7 6 5 4 3 2 1
8 7 6 5 4 3 2 1
8 7 6 5 4 3 2 1
8 7 6 5 4 3 2 1
Each of these columns is passed through HPF

0 0 0 0 0 0 0 0 x
0 0 0 0 0 0 0 0 1/√2
0 0 0 0 0 0 0 0 -1/√2

0 0 0 0 0 0 0 0 0

0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
Each of these rows is passed through LPF
15/√2 0 11/√ 0 7/√2 0 3/√2 0 x
2
15/2 0 11/2 0 7/2 0 3/2 0 1/√2
15/2 0 11/2 0 7/2 0 3/2 0 1/√2

15/2 15/2 11/2 11/2 7/2 7/2 3/2 3/2 0

15/2 15/2 11/2 11/2 7/2 7/2 3/2 3/2

15/2 15/2 11/2 11/2 7/2 7/2 3/2 3/2


15/2 15/2 11/2 11/2 7/2 7/2 3/2 3/2
15/2 15/2 11/2 11/2 7/2 7/2 3/2 3/2
15/2 15/2 11/2 11/2 7/2 7/2 3/2 3/2
15/2 15/2 11/2 11/2 7/2 7/2 3/2 3/2
15/2 15/2 11/2 11/2 7/2 7/2 3/2 3/2
15/2 15/2 11/2 11/2 7/2 7/2 3/2 3/2
Applications

• Noise filtering
• Image compression
– Fingerprint compression
• Image fusion
– Face recognition

• Recognition/Classification
• Image retrieval
Denoising
Matlab Wavelet
• MATLAB has a wavelet toolbox
– Continuous and discrete wavelets
– coefs = cwt(x,scales,'wname')
– wname is the name of the wavelet transform and
includes: Morlet, Daubechies, Haar, Mexican Hat,
Gaussian, etc
– scales is the range of scales the wavelet transform is
stretched or compressed
– [cA,cD] = dwt(X,'wname')
• dwt is the discrete wavelet function
The end

You might also like