SLIDE 1
Wavelets
Shai Avidan Tel Aviv University
SLIDE 2 Slide Credits (partial list)
- Rick Szeliski
- Steve Seitz
- Alyosha Efros
- Yacov Hel-Or
- Miki Elad
- Hagit Hel-Or
- Marc Levoy
- Bill Freeman
- Fredo Durand
- Sylvain Paris
- Andrew Adams
SLIDE 3 Laplacian Pyramid
- Make the coarse level by downsampling
- Make the fine level by upsampling the coarse layer,
and taking the difference with the original
- Reconstruct by upsampling the coarse layer and
adding the fine layer
SLIDE 4 Problem
- Lapalacian Pyarmid is a redundant
- representation. Coarse level is blurry
and redundant. What about the fine layer?
SLIDE 5
The basic 2x2 transform
Lets start with a simple transform Given signal [a,b] we obtain [c,d] Given [c,d] we can recover [a,b] Observe that c is sum of elements and d is their difference The scaling function: [1 1] The wavelet function: [-1 1]
SLIDE 6 Extending to even length vector
Given sequence v[M] Example: v=[1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16] c = 1/sqrt(2) [ (1+2) (3+4)…(15+16)] = 1/sqrt(2) [3 7 11 15 19 23 27 31] d =1/sqrt(2) [(1-2) (3-4)…(15-16)] = 1/sqrt(2) [-1 -1 …
SLIDE 7
To reconstruct
Reconstruct: c = 1/sqrt(2)[0 3 0 7 0 11 0 15 0 19 0 23 0 27 0 31] d = 1/sqrt(2)[0 -1 0 -1 … 0 -1] LPF(c) = 1/2[(0+3) (3+0) (0+7) (7+0)…] = 1/2[3 3 7 7 … 31 31] HPF(d) = 1/2[(0+1) (-1-0) …] = 1/2[1 -1 …] LPF(c)-HPF(d) = 1/2([3 3 7 7 … 31 31]-[1 -1 …]) = 1/2([(3-1) (3+1) (7-1) (7+1)…]) = [1 2 3 4 …] Recall: LPF is: 1/sqrt(2)[1 1] HPF is: 1/sqrt(2)[1 -1]
SLIDE 8
Block diagrams
SLIDE 9
In Matrix form
A matrix representation of the transform on vector v:
SLIDE 10
Multi-Resolution
Repeat the process on the coarse level
SLIDE 11
And in Matrix form
The right matrix is the one we saw before, the left matrix keeps the last two elements and transforms the first two
SLIDE 12
2D Extension
SLIDE 13 Wavelets
- Memory efficient (unlike pyramids)
- Time efficient (O(n) and not O(nlogn) like Fourier)
- Simple to compute
- Orthogonal
- Not redundant
SLIDE 14
Wavelet basis functions
SLIDE 15
The Scaling function
SLIDE 16
The inner product
SLIDE 17
The wavelet function
SLIDE 18
The wavelet function
SLIDE 19
Example I
I = [9 7 3 5]
SLIDE 20
Example II
SLIDE 21
Example III
SLIDE 22
Wavelet Lifting
Here’s another way to build a wavelet transform: Given vector X of size N=2^n Denote P_G(0) = X P_G(1) = Reduce(P_G(0)) – Select even elements Use P_G(1) to predict P^odd_G(0) Now let: P_w(0) = P^odd_G(0)-P_G(1) And we can repeat this in a multi-scale fashion.
SLIDE 23
Version I
SLIDE 24
Version I - Example
SLIDE 25
Lifting Scheme (Version I)
So far we’ve used simple Reduce. Can we use a more complicated reduce function? The answer is yes and it’s called Lifting Scheme. It was proposed by Sweldens in the mid 90’s. Given X, split to even X_e and odd X_o. Use X_e to predict X_o, so: X^new_o = X_o – Pred(X_e) The advantage is that we can use better prediction schemes with larger support
SLIDE 26 Lifting Scheme (ExampleI)
Observe we have many more zeros
SLIDE 27
Lifting Scheme
SLIDE 28
Lifting Scheme
SLIDE 29
Lifting Scheme
SLIDE 30
Lifting Scheme
Predict and Update don’t have to be linear…
SLIDE 31
Wavelet example
SLIDE 32
Wavelet example
SLIDE 33
Wavelet Shrinkage Denoising
Noisy image Clean image
SLIDE 34
Wavelet Shrinkage Denoising
SLIDE 35 Wavelet Shrinkage Denoising
Wavelet coef. value New Wavelet coef. value
SLIDE 36
Wavelet Shrinkage Pipeline
SLIDE 37
Wavelet Compression (I)
SLIDE 38
Wavelet Compression (II)
SLIDE 39
Wavelet Compression (III)
SLIDE 40
Wavelet Compression (Result)
SLIDE 41
JPEG 2000
Wavelet transform used in JPEG 2000
SLIDE 42
JPEG 2000
SLIDE 43
JPEG 2000