# Signal reconstruction from multiscale edges A wavelet based algorithm.

## Presentation on theme: "Signal reconstruction from multiscale edges A wavelet based algorithm."— Presentation transcript:

Signal reconstruction from multiscale edges A wavelet based algorithm

Author Yen-Ming Mark Lai (ylai@amsc.umd.edu)ylai@amsc.umd.edu Advisor Dr. Radu Balan rvbalan@math.umd.edu CSCAMM, MATH

Motivation Save edges

Motivation Save edge type sharp one- sided edge sharp two- sided edge “noisy” edges

Motivation edgesedge typereconstruct +=

Algorithm Decomposition + Reconstruction

Decomposition Discrete Wavelet Transform Save edges e.g. local extrema Input “edges+edge type”

Decomposition 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 functionswhose H1 normis finite

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)

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)

Take DWT

[1,-1](, Convolution in Matlab * [0,0,0,0,1,1,1,1]conv) next current +=next-current

* Convolution in Matlab next-current =0 next-current=-1

* Convolution in Matlab = next-current= 0next-current= 0next-current= 0next-current= 0next-current= 1next-current= 0next-current= 0next-current= 0 next-current= -1

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 edgesedge typereconstruct +=

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 wavelet mother wavelet dilate

2) Dilate mother wavelet

Convolve family with input input wavelet scale 1 wavelet scale 2 wavelet scale 4 = = =

Convolve “family” input wavelet scale 1 wavelet scale 2 wavelet scale 4 = = = DWT multiscale

What is DWT? (mathematically)

How to dilate? mother wavelet

How to dilate? dyadic (powers of two)

How to dilate? scale

How to dilate? 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.

What is DWT? Convolution of dilates of mother wavelets against original signal. convolution

What is DWT? Convolution of dilates of mother wavelets against original signal. dilates

What is DWT? Convolution of dilates of mother wavelets against original signal. original signal

What is convolution? (best match operation) Discrete Wavelet Transform Input 1)mother wavelet 2)dilation 3)convolution

Convolution (best match operator) dummy variable

Convolution (best match operator) flip g around y axis

Convolution (best match operator) shifts g by t

do nothing to f Convolution (best match operator)

pointwise multiplication

Convolution (best match operator) integrate over R

flip g and shift by 7.7 Convolution (one point)

do nothing to f Convolution (one point)

multiply f and g pointwise Convolution (one point)

integrate over R Convolution (one point)

scalar

Convolution of two boxes

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 maximabest fit location

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)

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 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)

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

Reconstruction Find approximation (minimization problem) Inverse Wavelet Transform Output

Example Input of 256 points

Input Signal (256 points)

major edges

Input Signal (256 points) minor edges (many)

Discrete Wavelet Transform Dyadic (powers of 2) = DWT of “f” at scale 2^j

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

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