Signal reconstruction from multiscale edges A wavelet based algorithm
Jan 18, 2016
Signal reconstruction from multiscale edges
A wavelet based algorithm
Author
Yen-Ming Mark Lai
Advisor
Dr. Radu Balan
CSCAMM, MATH
Motivation
Save edges
Motivation
Save edge type
sharp one-sided edge
sharp two-sided edge
“noisy” edges
Motivation
edges edge type reconstruct+ =
Algorithm
Decomposition + Reconstruction
Decomposition
Discrete Wavelet
Transform
Save edges e.g. local extrema
Input
“edges+edge type”
Decomposition
input
input
input
edge detection (scale 1)
edge detection (scale 2)
edge detection (scale 4)
=
=
=
Reconstruction
Find approximation
Inverse Wavelet
Transform
Output
local extrema “edges+edge type”
How to find approximation?
Find approximation
local extrema“edges+edge type”
Find approximation (iterative)
Alternate projections between two spaces
Find approximation (iterative)
sequences of functions
n: nf
whose H1 norm
2'2
22LnLn ff
is finite
Find approximation (iterative)
0k
Find approximation (iterative)
sequences of functions:
1) interpolate input signal’s wavelet extrema
2) have minimal H1 norm
Q: Why minimize over H1 norm?
A: Interpolation points act like local extrema
Numerical Example
algorithm interpolates between points
unclear what to do outside interpolation points
Find approximation (iterative)
0
Find approximation (iterative)
dyadic wavelet transforms of L^2 functions
Find approximation (iterative)
intersection = space of solutions
Find approximation (iterative)
Start at zero element to minimize solution’s norm
Preliminary Results
Step Edge (length 8)
Quadratic Spline Wavelet
Take DWT
Take DWT
[1,-1]( ,
Convolution in Matlab
*[0,0,0,0,1,1,1,1]conv )
next
1 current 1+ =next-current
*
Convolution in Matlab
next-current =0 next-current =-1
*
Convolution in Matlab
=
next-current = 0
next-current = 0
next-current = 0
next-current = 0
next-current = 1
next-current = 0
next-current = 0
next-current = 0
next-current = -1
Save Local Extrema
Save Local Extrema
Interpolate DWT (Level 1)
interpolation to minimize H1 norm
unclear what to do outside interpolation points
error
Original DWT – Level 1
Interpolated DWT – Level 1
error
Original DWT – Level 2
Interpolated DWT – Level 2
error
Original DWT – Level 3
Interpolated DWT – Level 3
matrix inversion failed
Original DWT – Level 4
Interpolated DWT – Level 4
Interpolated DWT
Take IDWT to Recover Signal
Recovered Signal (Red) and Original Step Edge (Blue)
Summary
Choose Input
Take DWT
Save Local Extrema of DWT
Interpolate Local Extrema of DWT
Take IDWT
Issues
• Convolution detects false edges
• What to do with values outside
interpolations points?
• What to do when matrix inversion fails?
Timeline
Dec – write up mid-year report
Jan– code local extrema search
Oct/Nov – code Alternate Projections(90%)
(85%)
(100%)
Timeline
• February/March – test and debug entire
system (8 weeks)
• April – run code against database (4
weeks)
• May – write up final report (2 weeks)
Questions?
Supplemental Slides
Input Signal (256 points)
Which points to save?
Compressed Signal (37 points)
What else for reconstruction?
Compressed Signal (37 points)
sharp one-sided edge
Compressed Signal (37 points)
sharp two-sided edge
Compressed Signal (37 points)
“noisy” edges
Calculation
Reconstruction:
• edges
• edge type information
Original: (256 points)
(37 points)
(x points)
37
Compression
edges edge type
+ x < 256
Summary
Save edges
Summary
Save edge type
sharp one-sided edge
sharp two-sided edge
“noisy” edges
Summary
edges edge type reconstruct+ =
Algorithm
Decomposition + Reconstruction
Decomposition
Discrete Wavelet
Transform
Save edges e.g. local extrema
Input
“edges+edge type”
Reconstruction
Find approximation
Inverse Wavelet
Transform
Output
local extrema “edges+edge type”
What is Discrete Wavelet Transform?
Discrete Wavelet
Transform
Input
What is DWT?
1) Choose mother wavelet
2) Dilate mother wavelet
3) Convolve family with input
DWT
1) Choose mother wavelet
2) Dilate mother waveletmother wavelet
dilate
2) Dilate mother wavelet
Convolve family with input
input
input
input
wavelet scale 1
wavelet scale 2
wavelet scale 4
=
=
=
Convolve “family”
input
input
input
wavelet scale 1
wavelet scale 2
wavelet scale 4
=
=
=
DWT
multiscale
What is DWT?
(mathematically)
How to dilate?
)2(
2
1)(
2 jj
xxj
mother wavelet
How to dilate?
)2(
2
1)(
2 jj
xxj
dyadic (powers of two)
How to dilate?
)2(
2
1)(
2 jj
xxj
scale
How to dilate?
)2(
2
1)(
2 jj
xxj z
halve amplitude
double support
Mother Wavelet (Haar)scale 1, j=0
Mother Wavelet (Haar)
scale 2, j=1
Mother Wavelet (Haar)
scale 4, j=2
What is DWT?
Convolution of dilates of mother wavelets against original signal.
)()2(
2
1)()(
2xf
xxfx
jjj
What is DWT?
Convolution of dilates of mother wavelets against original signal.
)()2(
2
1)()(
2xf
xxfx
jjj
convolution
What is DWT?
Convolution of dilates of mother wavelets against original signal.
)()2(
2
1)()(
2xf
xxfx
jjj
dilates
What is DWT?
Convolution of dilates of mother wavelets against original signal.
)()2(
2
1)()(
2xf
xxfx
jjj
original signal
What is convolution?(best match operation)
Discrete Wavelet
Transform
Input1)mother wavelet
2)dilation
3)convolution
Convolution (best match operator)
dtgftgf )()()(
dummy variable
Convolution (best match operator)
flip g around y axis
dtgftgf )()()(
dtgftgf )()()(
Convolution (best match operator)
shifts g by t
dtgftgf )()()(
do nothing to f
Convolution (best match operator)
dtgftgf )()()(
Convolution (best match operator)
pointwise multiplication
dtgftgf )()()(
Convolution (best match operator)
integrate over R
)7.7(gf
flip g and shift by 7.7
dgf )7.7()(
Convolution (one point)
)7.7(gf
do nothing to f
dgf )7.7()(
Convolution (one point)
)7.7(gf
multiply f and g pointwise
dgf )7.7()(
Convolution (one point)
)7.7(gf
integrate over R
dgf )7.7()(
Convolution (one point)
)7.7(gf
Convolution (one point)
scalar
Convolution of two boxes
f
Convolution of two boxes
45.1g
Convolution of two boxes
45.1t
Convolution of two boxes
dgfgf )45.1()()45.1( 0
Convolution of two boxes
f
Convolution of two boxes
5.0g
Convolution of two boxes
5.0t
Convolution of two boxes
dgfgf )5.0()()5.0( 5.0
Convolution of two boxes
Convolution of two boxes
gf
Why convolution?
Location of maximum best fit
Where does red box most look like blue box?
Why convolution?
Location of maximum best fit
maximum
Why convolution?
Location of maximum best fit
maxima best fit location
Where does exponential most look like box?
Where does exponential most look like box?
Where does exponential most look like box?
maximum
Where does exponential most look like box?
maximum best fit location
So what?
If wavelet is an edge, convolution detects location of edges
Mother Wavelet (Haar)
Mother Wavelet (Haar)
Mother Wavelet (Haar)
What is edge?
Local extrema of wavelet transform
Summary of Decomposition
Discrete Wavelet
Transform
Save “edges” e.g. local extrema
Input
“edges+edge type”
Summary of Decomposition
input
input
input
edge detection (scale 1)
edge detection (scale 2)
edge detection (scale 4)
=
=
=
How to find approximation?
Find approximation
local extrema“edges+edge type”
Find approximation (iterative)
Alternate projections between two spaces
Find approximation (iterative)
2'2
22:LnLnn ffnf
Find approximation (iterative)
2'2
22:LnLnn ffnf
H_1 Sobolev Norm
Find approximation (iterative)
functions that interpolate given local maxima points
Find approximation (iterative)
dyadic wavelet transforms of L^2 functions
Find approximation (iterative)
intersection = space of solutions
Find approximation (iterative)
Start at zero element to minimize solution’s norm
Q: Why minimize over K?
A: Interpolation points act like local extrema
2'2
22:LnLnn ffnf
Reconstruction
Find approximation(minimization
problem)
Inverse Wavelet
Transform
Output
Example
Input of 256 points
Input Signal (256 points)
Input Signal (256 points)
major edges
Input Signal (256 points)
minor edges (many)
Discrete Wavelet Transform
fW dj2
Dyadic (powers of 2)
= DWT of “f” at scale 2^j
DWT (9 scales, 256 points each)
DWT (9 scales, 256 points each)
major edges
Input Signal (256 points)
major edges
DWT (9 scales, 256 points each)
minor edges (many)
Input Signal (256 points)
minor edges (many)
Decomposition
Discrete Wavelet
Transform
Save “edges” e.g. local extrema
Input
DWT (9 scales, 256 points each)
Save Local Maxima
Local Maxima of Transform
Local Maxima of Transform
low scale most sensitive
Mother Wavelet (Haar)
Local Maxima of Transform
high scale least sensitive
Mother Wavelet (Haar)
Decomposition
Discrete Wavelet
Transform
Save “edges” e.g. local extrema
Input
Local Maxima of Transform
Find approximation (iterative)
Alternate projections between two spaces
Reconstruction
Find approximation(minimization
problem)
Inverse Wavelet
Transform
Output
Mallat’s Reconstruction (20 iterations)
original
reconstruction (20 iterations)
Implementation
Language: MATLAB – Matlab wavelet toolbox
Complexity: convergence criteria
Databases
• Baseline signals
– sinusoids, Gaussians, step edges, Diracs
• Audio signals
Validation
• Unit testing of components
– DWT/IDWT
– Local extrema search
– Projection onto interpolation space (\Gamma)
Testing
• L2 norm of the error (sum of squares)
versus iterations
• Saturation point in iteration (knee)
Schedule (Coding)
• October/November – code Alternate
Projections (8 weeks)
• December – write up mid-year report (2
weeks)
• January – code local extrema search (1
week)
Schedule (Testing)
• February/March – test and debug entire
system (8 weeks)
• April – run code against database (4
weeks)
• May – write up final report (2 weeks)
Milestones
• December 1, 2010 – Alternate Projections
code passes unit test
• February 1, 2011 – local extrema search
code passes unit test
• April 1, 2011 - codes passes system test
Deliverables
• Documented MATLAB code
• Testing results (reproducible)
• Mid-year report/Final report