de-noising signals: a wavelet approach s. ezekiel, w. oblitey, r trimble computer science department...
TRANSCRIPT
De-Noising Signals: A De-Noising Signals: A Wavelet ApproachWavelet Approach
S. Ezekiel, W. Oblitey, R TrimbleS. Ezekiel, W. Oblitey, R TrimbleComputer Science DepartmentComputer Science Department
Indiana University of PennsylvaniaIndiana University of PennsylvaniaIndiana, PA 15705Indiana, PA 15705
IntroductionIntroduction Past 3 decades– DSP fast growing fieldsPast 3 decades– DSP fast growing fields Signal is a function of independent variable ( time, Signal is a function of independent variable ( time,
distance, position..) distance, position..) Analog signal- operation done on time domainAnalog signal- operation done on time domain Digital signal- both domain( time and frequency)Digital signal- both domain( time and frequency) Multi-band spectral subtraction– Wu, Hidden Markov Multi-band spectral subtraction– Wu, Hidden Markov
model– Sameti et al. --- Noise Masking algorithm – model– Sameti et al. --- Noise Masking algorithm – Virag---- Weighted LinearVirag---- Weighted Linear
These Models--Variable degree of success- These Models--Variable degree of success- depending on the goals and assumptionsdepending on the goals and assumptions
Our goal:-develop a model to reduce various Our goal:-develop a model to reduce various noises and improve the quality of a signalnoises and improve the quality of a signal
What is Wavelet? ( Wavelet Analysis)What is Wavelet? ( Wavelet Analysis) Wavelets are functions that satisfy certain mathematical
requirements and are used to represent data or other functions Idea is not new--- Joseph Fourier--- 1800's Wavelet-- the scale we use to see data plays an important role FT non local -- very poor job on sharp spikes
Sine waveSine wave
WaveletWavelet db10db10
History of wavelets 1807 Joseph Fourier- theory of frequency analysis-- any 2pi
functions f(x) is the sum of its Fourier Series 1909 Alfred Haar-- PhD thesis-- defined Haar basis function---- it is
compact support( vanish outside finite interval) 1930 Paul Levy-Physicist investigated Brownian motion ( random
signal) and concluded Haar basis is better than FT 1930's Littlewood Paley, Stein ==> calculated the energy of the
function 1960 Guido Weiss, Ronald Coifman-- studied simplest element of functions space called atom
1980 Alex Grossmann (physicist) Jean Morlet( Engineer)-- broadly defined wavelet in terms of quantum mechanics
1985 Stephane Mallat--defined wavelet for his DSP ( Ph.D. thesis) Y. Meyer constructed first non trivial wavelet. 1988 Ingrid Daubechies-- used Mallat work constructed set of
wavelets The name emerged from the literature of geophysics, by a route The name emerged from the literature of geophysics, by a route
through France. The word through France. The word ondeonde led to led to ondeletteondelette.. Translation Translation wavewave led to led to wavelet-- by Jean Morletwavelet-- by Jean Morlet
01
2
0
0
2
0
2
0
( ) ( cos sin )
where the coefficients are calculated by
1( )
2
1( )cos( )
1( )sin( )
k kk
k
k
f x a a kx b kx
a f x dx
a f x kx dx
b f x kx dx
22
0
Energy of a function ( )
1( )
2
f x
energy f x dx
Fourier Series and EnergyFourier Series and Energy
Fourier, HaarFourier, Haar Amplitude, time Amplitude, time amplitude , frequency amplitude , frequency 1965 Cooley and Tukey – Fast Fourier 1965 Cooley and Tukey – Fast Fourier
TransformTransform Haar Haar 1
1 0 x<2
1( ) 1 <x 1
20 otherwise
x
( ),
(2 ), (2 1),
(4 ), (4 1), (4 2), (4 3),
x
x x
x x x x
WaveletsWaveletsWaveletsWavelets( ) ( ) jwtF f t e dt
Fourier TransformFourier Transform
CWT = C( scale, position)=CWT = C( scale, position)= ( ) ( scale, position, t) f t dt
1 2 3 4 5 6
1.5
2
2.5
3
Scaling wave means simply Stretching Scaling wave means simply Stretching (or Shrinking) it (or Shrinking) it
2.5 5 7.5 10 12.5 15 17.5
-1
-0.5
0.5
1
ShiftingShiftingf (t) f(t-k)f (t) f(t-k)
Wavelet Decomposition and ReconstructionWavelet Decomposition and Reconstruction Calculating coefficients for C at every scale– lots of Calculating coefficients for C at every scale– lots of
workwork Choose a subset– powers of 2’sChoose a subset– powers of 2’s dyadic scales ==> dyadic scales ==>
DWTDWT Efficient way of calculating coefficients– by using Efficient way of calculating coefficients– by using
filters– defined by Mallat-- => FWT( 2 channel sub-filters– defined by Mallat-- => FWT( 2 channel sub-band coder)=>decompose signal into 2 parts: band coder)=>decompose signal into 2 parts: approximate (low= actual content) and detail approximate (low= actual content) and detail (high=flavor)(high=flavor)
The above is called The above is called decomposition decomposition of Level 1of Level 1 This process can be iterated => signal broken down This process can be iterated => signal broken down
into many low-resolutions.into many low-resolutions. The procedure to reconstruct the original signal from The procedure to reconstruct the original signal from
its decomposed parts is called its decomposed parts is called ReconstructionReconstruction
TransformsTransforms Transform of a signal is a new representation of that Transform of a signal is a new representation of that
signalsignal Example:- signal x0,x1,x2,x3 define y0,y1,y2,y3Example:- signal x0,x1,x2,x3 define y0,y1,y2,y3 QuestionsQuestions
1. 1. What is the purpose of y'sWhat is the purpose of y's 2. 2. Can we get back x'sCan we get back x's
Answer for 2: The Transform is invertible-- perfect Answer for 2: The Transform is invertible-- perfect reconstructionreconstruction
Divide Transform in to 3 groupsDivide Transform in to 3 groups 1. Lossless( Orthogonal)-- Transformed Signal has the same 1. Lossless( Orthogonal)-- Transformed Signal has the same
lengthlength 2. Invertible (bi-orthogonal)-- length and angle may change-- 2. Invertible (bi-orthogonal)-- length and angle may change--
no information lostno information lost 3. Lossy ( Not invertible)-- 3. Lossy ( Not invertible)--
Transform of a signal is a new representation of that Transform of a signal is a new representation of that signalsignal
Example:- signal x0,x1,x2,x3 define y0,y1,y2,y3Example:- signal x0,x1,x2,x3 define y0,y1,y2,y3 QuestionsQuestions
1. 1. What is the purpose of y'sWhat is the purpose of y's 2. 2. Can we get back x'sCan we get back x's
Answer for 2: The Transform is invertible-- perfect Answer for 2: The Transform is invertible-- perfect reconstructionreconstruction
Divide Transform in to 3 groupsDivide Transform in to 3 groups 1. Lossless( Orthogonal)-- Transformed Signal has the same 1. Lossless( Orthogonal)-- Transformed Signal has the same
lengthlength 2. Invertible (bi-orthogonal)-- length and angle may change-- 2. Invertible (bi-orthogonal)-- length and angle may change--
no information lostno information lost 3. Lossy ( Not invertible)-- 3. Lossy ( Not invertible)--
Answer to Q1: PurposeAnswer to Q1: Purpose IT SEES LARGE vs SMALLIT SEES LARGE vs SMALL
X0=1.2, X1= 1.0, x2=-1.0, x3=-1.2 Y=[2.2 0 -2.2 0] Key idea for wavelets is the concept of " SCALESCALE" We can take sum and difference again==> recursion
=> MultiresolutionMultiresolution Main idea of Wavelet analysis– analyze a function at Main idea of Wavelet analysis– analyze a function at
different scales– mother wavelet use to construct different scales– mother wavelet use to construct wavelet in different scale and translate each relative to wavelet in different scale and translate each relative to the function being analyzedthe function being analyzed
Z=[ 0 0 4.4 0 ] Reconstruct =====>compression 4:1
Scaling function and WaveletsScaling function and Wavelets corresponding to low pass--> there is scaling function corresponding to low pass--> there is scaling function corresponding to high pass--> there is wavelet function corresponding to high pass--> there is wavelet function dilation equation--> scaling function dilation equation--> scaling function In terms of original low pass filtersIn terms of original low pass filters we have we have for h(0) and h(1) = 1/2 we have for h(0) and h(1) = 1/2 we have the graph compressed by 2 gives and shifted by the graph compressed by 2 gives and shifted by
1/2 gives 1/2 gives
By similar way the wavelet equation By similar way the wavelet equation
( )t( )t
0
( ) 2 ( ) (2 )N
k
t c k t k
0
( ) 2 ( ) (2 )N
k
t h k t k
( ) (2 ) (2 1)t t t
( )t (2 )t(2 1)t
( ) (2 ) (2 1)t t t
Multiresolution AnalysisMultiresolution Analysis
Signals and Signal ApplicationsSignals and Signal Applications
There are various types of signals:There are various types of signals: Heart Rate Variability (HRV)Heart Rate Variability (HRV) Seismic SignalsSeismic Signals Speech SignalsSpeech Signals
Noise is mixed during the data collection Noise is mixed during the data collection phasephase
x(t) = a(t) + d(t)x(t) = a(t) + d(t)
ECG Signal with Noise
ThresholdingThresholding
Transformation of an input signal to an output Transformation of an input signal to an output signal where is the Threshold valuesignal where is the Threshold value
I
Hard Threshold
( ) ( )( )
0
Soft Threshold
( )(| ( ) |) ( )( )
0
I i if I i TBI i
otherwise
sign I I i T if I i TBI i
otherwise
TT
BI T
Signal Enhancement ModelSignal Enhancement Model
Several traditional methods, such as Several traditional methods, such as median filtering, averaging with various median filtering, averaging with various masks, and histogram have been studied masks, and histogram have been studied and implementedand implemented
Each of these methods are designed to Each of these methods are designed to filter a specific type of noise, for example filter a specific type of noise, for example white, Gaussian, impulsive, additive, white, Gaussian, impulsive, additive, quantization, or multiplicative noise.quantization, or multiplicative noise.
Step 1: Data Collection. A total of 57 Step 1: Data Collection. A total of 57 signals were collected for study. We signals were collected for study. We collected 11 speech, 14 HRV, 30 Seismic, collected 11 speech, 14 HRV, 30 Seismic, and 2 Historic Stock Market signals. and 2 Historic Stock Market signals.
Step 2: Resample. We added noises to Step 2: Resample. We added noises to test our model against. test our model against. RiverRiver car enginecar engine air conditioner air conditioner highway traffichighway traffic
Step 3: Wavelet Decomposition. Choose a wavelet. Step 3: Wavelet Decomposition. Choose a wavelet. Decide the number of levels then, compute Decide the number of levels then, compute wavelet decomposition for levels.wavelet decomposition for levels. This This process separates the signal into two parts, low process separates the signal into two parts, low frequency (approximate coefficients ) and high frequency (approximate coefficients ) and high frequency (detailed coefficients).frequency (detailed coefficients).
Step 4: Remove Noises by ThresholdingStep 4: Remove Noises by Thresholding Choose the threshold value and type.Choose the threshold value and type. Apply the thresholding technique to only the high Apply the thresholding technique to only the high
frequency part of levelfrequency part of level This clears out most background noise This clears out most background noise
Step 5: Reconstruction. Perform wavelet Step 5: Reconstruction. Perform wavelet reconstruction from the approximate coefficients in reconstruction from the approximate coefficients in step 4. step 4.
,N( )x n N
Error MeasuresError Measures We used the two commonly used measure to test We used the two commonly used measure to test
the quality of our signalthe quality of our signal Root Mean Square (RMS) errorRoot Mean Square (RMS) error
The Peak Signal-to-Noise RatioThe Peak Signal-to-Noise Ratio
2
1
1 N
i ii
RMS x yN
1020*
where is the maximum value of the signal.
bPSNR Log
RMSb
Speech Signal Speech Signal (male subject)(male subject)
Heart Rate Variability Heart Rate Variability (male, age 48, 8% heart disease, 24 hour sample)(male, age 48, 8% heart disease, 24 hour sample)
Seismic Signal Seismic Signal (24 hour sample)(24 hour sample)
Dow Jones Dow Jones (5 day sample from 1888-1990)(5 day sample from 1888-1990)
Speech Signal Speech Signal (female)(female)
We calculated the PSNR for the de-noised We calculated the PSNR for the de-noised signals and we obtained the values signals and we obtained the values 56.1370, 38.6432, 62.5, 32.568, and 56.1370, 38.6432, 62.5, 32.568, and 27.1034 respectively. This clearly shows 27.1034 respectively. This clearly shows that our model efficiently removed the that our model efficiently removed the various noises. Further our model retained various noises. Further our model retained 98.8015%, 99.9623%, 99%, 99.47%, and 98.8015%, 99.9623%, 99%, 99.47%, and 88.4015% of the original content of the 88.4015% of the original content of the signal even after removing 26.8812%, signal even after removing 26.8812%, 79.5370%, 82%, 82.1181%, and 80.95% 79.5370%, 82%, 82.1181%, and 80.95% of the detail coefficients, respectively.of the detail coefficients, respectively.
ConclusionConclusion
A framework using wavelet and multiresolution A framework using wavelet and multiresolution analysis based noise removal was presented.analysis based noise removal was presented.
This approach offers high quality and flexibility This approach offers high quality and flexibility since: since: Parameters can be easily modified to remove various Parameters can be easily modified to remove various
noisesnoises Threshold values can be automatically calculated and Threshold values can be automatically calculated and
adjusted based on the waveform.adjusted based on the waveform. Although these techniques have been shown to Although these techniques have been shown to
de-noise signals, further experimental analysis is de-noise signals, further experimental analysis is needs fine-tune the various parameters. needs fine-tune the various parameters.
JPEG (Joint Photographic Experts Group)JPEG (Joint Photographic Experts Group) 1. Color images ( RGB) change into luminance, chrominance, color 1. Color images ( RGB) change into luminance, chrominance, color
space space 2. color images are down sampled by creating low resolution pixels – 2. color images are down sampled by creating low resolution pixels –
not luminance part– horizontally and vertically, ( 2:1 or 2:1, 1:1)– 1/3 not luminance part– horizontally and vertically, ( 2:1 or 2:1, 1:1)– 1/3 +(2/3)*(1/4)= ½ size of original size+(2/3)*(1/4)= ½ size of original size
3. group 8x8 pixels called data sets– if not multiple of 8– bottom row 3. group 8x8 pixels called data sets– if not multiple of 8– bottom row and right col are duplicatedand right col are duplicated
4. apply DCT for each data set– 64 coefficients 4. apply DCT for each data set– 64 coefficients 5. each of 64 frequency components in a data unit is divided by a 5. each of 64 frequency components in a data unit is divided by a
separate number called quantization coefficients (QC) and then separate number called quantization coefficients (QC) and then rounded into integerrounded into integer
6. QC encode using RLE, Huffman encoding, Arithmetic Encoding 6. QC encode using RLE, Huffman encoding, Arithmetic Encoding ( QM coder)( QM coder)
7. Add Headers, parameters, and output the result7. Add Headers, parameters, and output the result• interchangeable format= compressed data + all tables need for interchangeable format= compressed data + all tables need for
decoderdecoder• abbreviated format= compressed data+ not tables ( few tables)abbreviated format= compressed data+ not tables ( few tables)• abbreviated format =just tables + no compressed data abbreviated format =just tables + no compressed data
DECODER DO THE REVERSE OF THE ABOVE STEPSDECODER DO THE REVERSE OF THE ABOVE STEPS
JPEG 2000 or JPEG Y2kJPEG 2000 or JPEG Y2k divide into 3 colorsdivide into 3 colors each color is partitioned into rectangular, non-overlapping each color is partitioned into rectangular, non-overlapping
regions called tiles– that are compressed individuallyregions called tiles– that are compressed individually A tile is compressed into 4 main stepsA tile is compressed into 4 main steps
1. compute wavelet transform – sub band of wavelets– integer, fp,---L+1 1. compute wavelet transform – sub band of wavelets– integer, fp,---L+1 levels, L is the parameter determined by the encoder levels, L is the parameter determined by the encoder
2. wavelet coeff are quantized, -- depends on bit rate2. wavelet coeff are quantized, -- depends on bit rate 3. use arithmetic encoder for wavelet coefficients3. use arithmetic encoder for wavelet coefficients 4. construct bit stream– do certain region, no order4. construct bit stream– do certain region, no order
Bit streams are organized into layers, each layer contains Bit streams are organized into layers, each layer contains higher resolution image informationhigher resolution image information
thus decoding layer by layer is a natural way to achieve thus decoding layer by layer is a natural way to achieve progressive image transformation and decompressionprogressive image transformation and decompression
Wavelet PacketWavelet PacketWavelet PacketWavelet Packet Walsh-Hadamard transform-- complete binary tree --> wavelet
packet "Hadamard matrix"==> all entries are 1 and -1 and all rows are
orthogonalorthogonal-- divide two time by sqrt(2)==> orthogonal orthogonal & symmetricsymmetric Compare with wavelet-- computations
xx
sums y0 and y2sums y0 and y2
difference y1 and y3 difference y1 and y3
sums z0=0sums z0=0
sums z1=0.4sums z1=0.4
difference z2=4.4difference z2=4.4
difference z3=0difference z3=0
Filters and Filter BanksFilters and Filter Banks Filters and Filter BanksFilters and Filter Banks FilterFilter is a linear time-invariant operator It acts on input vector xx --- Out put vector yy is the convolution of
x with a fixed vector hh h--> contains filter coefficients-- our filters are digital not
analog-- h(n) are discrete time t= nT, T is sampling period assume it is 1 here x(n) and y(n) comes all the time t= 0, +_ 1.... y(n) = Σh(k) x(n-k) = convolution h* xh* x in the time domain
Filter BankFilter Bank= Set of all filters Convolution by hand--- arrange it as ordinary multiplication -- but don't carry
digits from one column to another
x= 3 2 4 h= 1 5 2 x * h = 3 17 20 24 8