Wavelets Shai Avidan Tel Aviv University
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
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
Problem • Lapalacian Pyarmid is a redundant representation. Coarse level is blurry and redundant. What about the fine layer?
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]
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 … -1]
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]
Block diagrams
In Matrix form A matrix representation of the transform on vector v:
Multi-Resolution Repeat the process on the coarse level
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
2D Extension
Wavelets • Memory efficient (unlike pyramids) • Time efficient (O(n) and not O(nlogn) like Fourier) • Simple to compute • Orthogonal • Not redundant
Wavelet basis functions
The Scaling function
The inner product
The wavelet function
The wavelet function
Example I I = [9 7 3 5]
Example II
Example III
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.
Version I
Version I - Example
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
Lifting Scheme (ExampleI) Observe we have many more zeros
Lifting Scheme
Lifting Scheme
Lifting Scheme
Lifting Scheme Predict and Update don’t have to be linear…
Wavelet example
Wavelet example
Wavelet Shrinkage Denoising Noisy image Clean image
Wavelet Shrinkage Denoising
Wavelet Shrinkage Denoising New Wavelet coef. value Wavelet coef. value
Wavelet Shrinkage Pipeline
Wavelet Compression (I)
Wavelet Compression (II)
Wavelet Compression (III)
Wavelet Compression (Result)
JPEG 2000 Wavelet transform used in JPEG 2000
JPEG 2000
JPEG 2000
Recommend
More recommend