Wavelet Transformation
Department of Computer Science And Engineering
Shahjalal University of Science and Technology
Nashid Alam
Registration No: 2012321028
annanya_cse@yahoo.co.uk
Masters -2 Presentation
(Backup Slides# 3)
Courtesy :
Prof. Fred Hamprecht
Heidelberg University
Source:
https://www.youtube.com/watch?v=DGUuJweHamQ
Wavelet
Wavelet
Working with wavelet:
1. Convolve the signal with wavelet filter(h/g)
2. Store the results in coefficients/frequency response
(Result in number is put in the boxes)
3. Coefficients/frequency response:
- The representation of the signal in the new domain.
Properties:
• Maximum frequency depends on the length of the signal.
• Recursive partitioning of the lowest band in subjective to the application.
Details in upcoming slides
Good temper resolution in high frequencies
Good frequency resolution in low pass band
OBTAION:
Wavelet
A high pass filter
Temper resolution : A vertical high-resolution
Frequency resolution : The sample frequency divided by the number of samples
O/P of Low Pass Filter High Pass Filter = A Band Pass Result
1.A length 8 signal
3.Convolve the signal with
the high pass filter
2.Split/divide the signal in two parts
Wavelet
To avoid redundancy
Down sample by 2
Wavelet
• For perfect low pass filter
• Leave everything intact in 0 (zero)
Spectrodensity of the signal at this point
Unit cell
Unit cell is shrunk by half(1/2)
Wavelet
No information loss due to shrinking
First partitioning of lower and higher frequency band
Wavelet
Spectrodensity of the signal at this point
For perfect low pass filter For perfect high pass filter
This works even not for perfect high pass/low pass filter
Wavelet
Split the signal
And
down-sample by 2
In high frequency
Details at level 1
Wavelet
Split in
the low frequency
Details at level 2
Wavelet
Extra Split in
the low frequency
Details at level 3
Wavelet
Approximation
at level 3
Approximation
at level 2
Approximation
at level 1
Wavelet
Works for
Signals of 8 samples
23= 8,
Sample=8, level=3.
Wavelet
Positive half of the
frequency axis
1
1 2 3 4
Wavelet
Positive half of the
frequency axis
2
1 21
1 2 3 4
Wavelet
Positive half
of
the frequency axis
3
1
2
1 21
1 2 3 4
Wavelet
Positive half
of
the frequency axis
Details at level 2
Details at level 3
Details
at
level 1
Approximation
Good frequency resolution in low pass band
Wavelet
Filter response/Coefficient
of
perfect bandpass filter
Wavelet
Behaving
as bandpass
Wavelet
Filter response/Coefficient
of
Practically used wavelet filter
Collect the low frequencies
High frequencies
Wavelet
Behaving
as bandpass
Wavelet
Filter response/Coefficient
of
Practically used wavelet filter
Modular square of
These transfer
function
Add up to 1.
Prevent
Loosing
signal/energy
To
Wavelet
Behaving
as bandpass
Code Fragments to do the task
% Extract the level 1 coefficients.
a1 = appcoef2(wc,s,wname,1);
h1 = detcoef2('h',wc,s,1);
v1 = detcoef2('v',wc,s,1);
d1 = detcoef2('d',wc,s,1);
% Display the decomposition up to level 1 only.
ncolors = size(map,1); % Number of colors.
sz = size(X);
cod_a1 = wcodemat(a1,ncolors);
cod_a1 = wkeep(cod_a1, sz/2);
cod_h1 = wcodemat(h1,ncolors);
cod_h1 = wkeep(cod_h1, sz/2);
cod_v1 = wcodemat(v1,ncolors);
cod_v1 = wkeep(cod_v1, sz/2);
cod_d1 = wcodemat(d1,ncolors);
cod_d1 = wkeep(cod_d1, sz/2);
image([cod_a1,cod_h1;cod_v1,cod_d1]);
axis image; set(gca,'XTick',[],'YTick',[]);
title('Single stage decomposition')
colormap(map)
pause
% Here are the reconstructed branches
ra2 = wrcoef2('a',wc,s,wname,2);
rh2 = wrcoef2('h',wc,s,wname,2);
rv2 = wrcoef2('v',wc,s,wname,2);
rd2 = wrcoef2('d',wc,s,wname,2);
Wavelet
Wavelet
Transfer function
of
The wavelets
Transfer function
of
The Scaling function
Wavelet
Want to understand
The effect of this label
Have to perform
convolution
Understand The effect of each this label
Wavelet
Graph 01: Transfer functions of the wavelet transforms
Works for Signals more then 8 samples
23= 8, Sample=8, level=3.
Level 1
details
Level 2
details
Level 3
details
Level 4
details
Level 5
details
Transfer functions of
Approximation:
The low pass
result
That we keep at
the end
Wavelet
Graph 01: Transfer functions of the wavelet transforms
Level
details
+approximation= 1
Property of wavelet
Wavelet
Approximation is a sinc
- A perfect low pass filter
sincA-sincB
A=A frequency
B=A frequency
-A perfect bandpass filter
Wavelet
Signal with
more than
eight samples
Scenario:
Temper resolution : A vertical high-resolution
Frequency resolution : The sample frequency divided by the number of samples
Temper resolution>
Frequency resolution
Increasing
frequency resolution
Decreases
temporal resolution.
Discrete Wavelet Transform(DWT)
Discrete Wavelet Transform(DWT)
Requires a wavelet ,Ψ(t), such that:
- It scales and shifts
from an orthonormal basis
of the square integral function.
)2/)2((
2
1
)(, jt
j
t n
j
nj  
Scale Shift
Denote Wavelet
j and n both are integer
nmjlmlnj  ., ,, 
To offer an orthonormal basis:)(, tnj
Orthonormal basis: A vector space basis for the space it spans.
.
.
Discrete Wavelet Transform(DWT)
Basis Function
Wavelets,Ψ
Basis function : An element of a particular basis for a function space
Scaling Function,Ψ
Discrete Wavelet Transform(DWT)
With each label:
By shifting-
+
+
-
Shift
Inter-product is zero
Wavelets are orthogonal
Discrete Wavelet Transform(DWT)
Details at level 1 Scale factor , j =2, 22 =4
Discrete Wavelet Transform(DWT)
Details at level 2
Scale factor , j =1, 21 =2
Discrete Wavelet Transform(DWT)
Details at
level 3
Scale factor , j =0, 20 =1
Discrete Wavelet Transform(DWT)
Approximation
Low
frequency
No Scale factor
Daubchies’Wavelet (DW)
Daubchies’Wavelet (DW)
•H()=high pass filter
•D4=Daubchies’ Tap 4 Filter
•Not symmetrical
Initial shape
Backward transformation of Wavelets
Opposite of forward transformation
Mirror the forward transformation on the right hand side
Replace the down-sampling by up-sampling.
Signal
Wavelet
transform
of the Signal
Wavelet
transform
of
the Signal
Signal
2D Wavelet Transform
Scaling function Wavelet
2Πk1 =ω1
2Πk2 =ω2
Low pass filter
2D Wavelet Transform
High pass filter
Scaling function Wavelet
Use Separable Transform
2D Wavelet Transform
Original
image
hx = High pass filter
(X-direction)
gx = low pass filter
(X-direction)
Use Separable Transform
2D Wavelet Transform
hxy = High pass filter
(y-direction)
Use Separable Transform
2D Wavelet Transform
gy = low pass filter
(y-direction)
Use Separable Transform
2D Wavelet Transform
Use Separable Transform
2D Wavelet Transform
Further split
Use Separable Transform
2D Wavelet Transform
hy = High pass filter
(y-direction)
Use Separable Transform
2D Wavelet Transform
hy =Low pass filter
(y-direction)
Use Separable Transform
2D Wavelet Transform
Four region:
Blue= Diagonal Details at label 1
Green=Horizontal Details at label 1
Purple=vertical details at label 1
Yellow= Approximation at Label 1
(Low pass in both x and y direction)
Use Separable Transform
2D Wavelet Transform
Doing the above steps recursively:
Take the current approximation
Use Separable Transform
2D Wavelet Transform
Doing the above steps recursively:
1. Take the current approximation
2. And further split it up
Use Separable Transform
2D Wavelet Transform
Doing the above steps recursively:
1. Take the current approximation
2. And further split it up
Use Separable Transform
2D Wavelet Transform
New
approximation
Doing the above steps recursively:
1. Take the current approximation
2. And further split it up
3. Getting new approximation
Use Separable Transform
2D Wavelet Transform
Diagonal Details
Horizontal Details
vertical details
Approximation
(can be further
decomposed)
In summary
Use Separable Transform
2D Wavelet Transform
In summary
Approximation
(can be further
decomposed)
Use Separable Transform
2D Wavelet Transform
Visualization
Label of
approximation
Horizontal
Details
Horizontal
Details
Vertical
Details
Diagonal
Details
Vertical
Details
Diagonal
Details
Use Separable Transform
2D Wavelet Transform
Visualization
Label of approximation:
• Very strong low pass filter
• Few pixels
Use Separable Transform
2D Wavelet Transform
Visualization
Details
in
Various Scale
Use Separable Transform
2D Wavelet Transform
Visualization
vertical details ->Shoulder
Horizontal Details ->Edges
Diagonal Details
Use Separable Transform
2D Wavelet Transform
More
precise
Visualization
Original image:
Gray square on a
Black Background
Diagonal Details
Horizontal Details
(row by row)
Vertical details
(column by column)
Use Separable Transform
2D Wavelet Transform
Toy of original image
Use Separable Transform
2D Wavelet Transform
Decomposition at
Label 4
Original image
Use Separable Transform
2D Wavelet Transform
Decomposition at
Label 4
Original image
(with diagonal details areas indicated)
Diagonal Details
Use Separable Transform
2D Wavelet Transform
Vertical Details
Decomposition at
Label 4
Original image
(with Vertical details areas indicated)
Experimental Results
Experimental Results
DWT
1.Original Image
(Malignent_mdb238) 2.Decomposition at Label 4
2.Decomposition at Label 1 3.Decomposition at Label 2 3.Decomposition at Label 3
Experimental Results
DWT
1.Original Image
(Malignent_mdb238) 2.Decomposition at Label 4
Experimental Results
1.Original Image
(Benign_mdb252)
2.Decomposition at Label 4
2.Decomposition at Label 1 3.Decomposition at Label 2 3.Decomposition at Label 3
DWT
Experimental Results
1.Original Image
(Malignent_mdb253.jpg) 2.Decomposition at Label 4
2.Decomposition at Label 1 3.Decomposition at Label 2 3.Decomposition at Label 3
CT vs. DWT
DWT Target Goal:
1.Applying a DWT to decompose a digital mammogram into different subbands.
2.The low-pass wavelet band is removed (set to zero) and
the remaining coefficients are enhanced.
3.The inverse wavelet transform is applied to recover
the enhanced mammogram containing microcalcifications [7].
7. Wang T. C and Karayiannis N. B.: Detection of Microcalcifications in Digital Mammograms Using Wavelets, IEEE
Transaction on Medical Imaging, vol. 17, no. 4, (1989) pp. 498-509
The results obtained by the Contourlet Transformation (CT)
are compared with
The well-known method based on the discrete wavelet transform

3.Wavelet Transform(Backup slide-3)