Wavelets: 1. A Brief Summary 2. Vanishing Moments 3. 2d-Wavelets 4. Compression 5. De-Noising
Wavelets: 1. A Brief Summary 2. Vanishing Moments 3. 2d-Wavelets 4. Compression 5. De-Noising
Wavelets: 1. A Brief Summary 2. Vanishing Moments 3. 2d-Wavelets 4. Compression 5. De-Noising
Marialuce Graziadei
1. A brief summary (t): scaling function. For the 2-scale relation hold (t) =
k=
pk (2t k)
(t IR)
qk (2t k)
(t IR)
(t IR)
t (t) dt.
Goal: to show that, if the mother-wavelet has successive moments equal to zero (for a xed b) the wavelet coefcients decrease quickly when a decreases. Assumptions: f (k) (t) has jumps at most in a nite number of points. the function f (t) is (k 1) times continuously differentiable;
f (k1)(b) k1 f (t + b) = f (b) + f (b)t + ... + t + t k r (t), (k 1)! where r (t) is piecewise continuous and bounded, with at most a nite number of jumps.
Wavelet coefcients
< f, a,b
1 >= a = a + a k+ 2
1
f (t)((t b)/a) dt =
(k1)
f (b + at)(t) dt
1 k+ 2
t k r (at)(t) dt
(a 0)
The following table shows the wavelet coefcients, computed for different values of a and for b = 0.5 and b = 0.6, using the Mexican hat. The convergence factors (log2 ) are also reported.
a 0.128 0.064 0.032 0.016 0.008 0.004 b = 0.5 6.6277 2.6678 0.9724 0.3465 0.1226 0.0432 k+1 2 1.329 1.4559 1.4888 1.4987 1.5050 b = 0.6 4.0958 0.6136 0.0303 0.0067 0.0012 0.0002 k+1 2 2.7389 4.3382 2.1796 2.4986 2.4997
For b = 0.5 the wavelet coefcients go to zero more slowly than for b = 0.6!!!
3. 2D-wavelets Notation: f (x k, y l) = f k,l (x, l) are the translations of f . f (x, y) f (2n x, 2n y) are the dilatations of f . The denition of a 2D Multi-Resolution Analysis (MRA) is similar to a 1D-MRA. If a sequence of subspaces (Vn ) satises the following properties a) Vn Vn+1 b) c)
nZ Z
(n Z ), Z
Vn = L 2 (IR2), Vn = {0},
nZ Z
d) f (x, y) Vn f (2x, 2y) Vn+1 , e) f (x, y) V0 f k,l (x, y) V0 . then it is called a MRA of L 2 (IR2 ).
6
is a scaling function for the MRA it is continuous, with a compact support in IR2 , with possible jumps on the boundary of the support; the integer translations of , k,l , form a Riesz-basis for V0 . Scaling functions Sufcient conditions for a compactly supported function to be a scaling function for an MRA 1. There exists a sequence of numbers pk,l (only a nite number differs from zero) such that (x, y) = pk,l (2x k, 2y l) ((x, y) IR2).
k,l
(x, y)(x + k, y + l) d x d y
The Riesz function R (z 1 , z 2 ) is positive for |z 1 | = |z 2 | = 1. 3. The translation of the function are such that (t k) 1. (Partition of the unity).
If has these properties, the following hold The reference space V0 consists of functions f (x, y) that can be expressed as f (x, y) = ak,l k,l (x, y)
k,l
((x, y) IR2)
((x, y) IR2 )
As in 1D-MRA, the goal is to build the detail space (Wn ) such that
Vn+1 = Vn Wn
The space Wn is built from a mother-wavelet . The functions (2n x k, 2n y l) form a Riesz-basis for Wn .
In 2-D more than one wavelet is necessary to span W0 . Example: 2-D Haar wavelets 1 (x): 1-D Haar scaling function; 1 (x): 1-D Haar wavelet. The 2-D Haar scaling function is dened from the 1-D Haar scaling function as (x, y)=1(x)1(y) and, if one want to ll V0 to obtain V1 : (1)(x, y) = 1 (x)1(y) = (2x, y) (2x 1, y),
(2)(x, y) = 1 (x)1(y) = (x, 2y) (x, 2y 1), (3)(x, y) =1 (x)1(y) = (2x, 2y) (2x 1, 2y) + (2x 1, 2y 1) (2x, 2y 1). These three functions belong to V1 and are orthogonal to V0, so they belong to W0 .
1 0.9 0.8 0.7 0.6 0.5 0.4 0.3 0.2 0.1 0 0 0.6 0.2 0.4 0.4 0.6 0.8 0.2 1 0 1 0.8
1 0.8 0.6 0.4 0.2 0 0.2 0.4 0.6 0.8 1 0 0.6 0.2 0.4 0.4 0.6 0.8 0.2 1 0 1 0.8
1 0.8 0.6 0.4 0.2 0 0.2 0.4 0.6 0.8 1 0 0.6 0.2 0.4 0.4 0.6 0.8 0.2 1 0 1 0.8
1 0.8 0.6 0.4 0.2 0 0.2 0.4 0.6 0.8 1 0 0.6 0.2 0.4 0.4 0.6 0.8 0.2 1 0 1 0.8
10
The function (1) , (2) and (3) must satisfy the following
1 2 3 W0 = W 0 W 0 W 0
the translation of ( j ) are a Riesz basis for W0 Then (x, y) = pk,l (2x k, 2y l) qk,l (2x k, 2y l)
( j)
( j)
k,l
( j )(x, y) =
k,l
y)+
j =1 k,l
11
Furthermore, for all functions f L2 (IR2 ) there are three se. ( j) ries (ar,k,l ), ( j = 1, 2, 3) such that
3
f (x, y) =
m=1 r = k,l
Filterbanks As in 1-D, one can decompose f V0 using a lterbank. f can be written as f (x, y) =
0 ak,l k,l (x, y). k,l
But f = f 1+g1+g2+g3 with f 1 V1 and g1, g2, g3 W1 . These functions can be represented as f 1(x, y) = g1(x, y) = g2(x, y) = g3(x, y) =
1 ak,l k,l (x/2, y/2); k,l (1) d1,k,l k,l (x/2, y/2); (2) d2,k,l k,l (x/2, y/2); (3) d3,k,l k,l (x/2, y/2);
k,l
k,l
k,l
12
Then
1 ak,l = 0 h0 2ku,2lv au,v , u,v 0 hm 2ku,2lv au,v u,v
dm,k,l =
(m = 1, 2, 3).
The reconstruction coefcients can be computed in the same way as in the 1-D case.
13
Filterbanks
H0 (z) H1 (z)
1 (ak,l )
(d1,k,l )
0 ak,l
H2 (z) H3 (z)
(d2,k,l ) (d3,k,l )
Figure 3: Decomposition
14
1 (ak,l )
P(z)
(d1,k,l )
Q1 (z)
0 (ak,l )
(d2,k,l) )
Q2 (z)
(d3,k,l) )
Q3 (z)
Figure 4: Reconstruction
15
Analysis of 2-D images Discrete images: arrays f of M rows and N columns f 1,M f 2,M . . . f N,M . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . f= . . . . . . . . . . . . . . . . . . . . . f 1,2 f 2,2 . . . f N,2 f 1,1 f 2,1 . . . f N,1 The 2-D wavelet transform of such an image can be performed in two steps. Step 1. Perform a 1-D wavelet transform on each row of f, thereby producing a new image. Step 2. Perform a 1-D wavelet transform on each column of of the matrix obtained with the Step 1. A 1-level wavelet transform can be therefore symbolized as follows: a 1 | h1 f v 1 | d1
where the sub-images h1 , d1 , a1 and v1 each have M/2 rows and N /2 columns.
16
Sub-image a1 : it is created computing trends along rows of f, following by computing trends along columns, so it is an an averaged, lower resolution version of f. Sub-image h1 : it is created computing trends along rows of f, following by computing uctuation along columns. Consequently it detects horizontal edges. Sub-image v1: it is created like h1 , but inverting the role of rows and columns: it detects vertical edges. Sub-image d1 : it tends to emphasize diagonal features, because it is created from uctuation along both rows and columns.
20
40
60
80
100
17
Approximation A1 20 40 60 80 100 120 140 160 50 100 150 20 40 60 80 100 120 140 160
Orizontal detail H1
50
100
150
Vertical detail H1 20 40 60 80 100 120 140 160 50 100 150 20 40 60 80 100 120 140 160
Diagonal detail D1
50
100
150
18
4. De-noising The transmission of a signal over some distance often implies the contamination of the signal itself by noise. The term noise refers to any undesirable change that has altered the value of the original signal. The simplest model for acquisition of noise by a signal is the additive noise , which has the form f = s + n, where f is the contaminated signal, s is the original signal and n is the noise. The most common types of noise are the following: 1.Random noise. The noise signal is highly oscillatory above and below an average mean value. 2.Pop noise. The noise is perceived as randomly occurring, isolated pops. As a model for this type of noise we add a few non-zero values to the original signal at isolated locations. 3.Localized random noise. It appears as in type 1, but only over a (some) short segment(s) of the signal. This can occur when there is a short-lived disturbance in the environment during transmission of the signal.
19
De-noising procedure principles 1. Decompose. Choose a wavelet and a level N . Compute the wavelet decomposition of the signal at level N. 2. Threshold detail coefcients. For each level from 1 to N , select a threshold and apply soft or hard thresholding to the detail coefcients. 3. Reconstruct. How to choose a threshold? The most frequently encountered noise in transmission is the gaussian noise. It can be characterised by a the mean and by the standard deviation . Assume that = 0.
The gaussian nature of the noise is preserved during the transformation the wavelet coefcients are distributed according to a Gaussian curve having = 0 and standard deviation .
From the theory, if one chooses T = 4.5, the 99.99% of the wavelet coefcients will be eliminated. Usually the nest detail consist almost entirely of noise. Its standard deviation can be assumed as a good estimate for .
20
Soft or hard thresholding? Let T denote the threshold, x the wavelet transform values and H (x) the transform value after the thresholding. Hard thresholding means
H (x) =
x 0
if |x| T if |x| T
H (x) =
si gn(x)(|x| T ) 0
if |x| T
if |x| T
21
0.8
0.6
0.4
0.2
0.2
0.4
0.6
0.8
0.8
0.6
0.4
0.2
0.2
0.4
0.6
0.8
0.8
0.6
0.4
0.2
0.2
0.4
0.6
0.8
1. Hard thresholding exaggerates small differences in transform values that have magnitude near the threshold value T 2. Soft thresholding has risk of oversmoothing
22
5. Compression Compression means converting the signal(s) data into a new format that requires less bit to be transmitted. Lossless compression It is completely error free (ex: techniques that produce .zip les). The maximum compression ratio are 2 : 1. Lossy compression It is used when inaccurancies can be accepted because quite imperceptible. The compression ratio vary from 10 : 1 to 100 : 1 when more complex techniques are used. Wavelets are applied in this eld. Compression procedure Perform wavelet transform of the signal up to level N ;
Set equal to zero all values of the wavelet coefcients which are insignicant, i.e. which are below some threshold value;
Transmit only the signicant, non-zero values of the transform obtained from Step 2; Reconstruct the signal.
23
How to choose a threshold? Suppose that L j are the transform coefcients. One can put them in decreasing order L 1 L 2 L 3 ... L M
Ef =
L2 j
j =1
The threshold T is chosen according with the amount of energy that we want to retain. If the term L 2 + L 2 + L 2 + ... + L 2 N 1 2 3 Ef is such that a sufcient amount of energy is kept, then all the coefcients smaller than L N can be put equal to zero.
24