Averaging and Differencing - The George Washington University

7/29/2011
Why do we care about
wavelets?
• Audio
http://www.fanpop.com/spots/singing/images/430336/
title/sing-photo
Wavelets
Amanda Clemm, Elizabeth Bolduc
Jenna George, Terika Harris
SPWM 2011
• Visual
• Data
http://www.rabbitroom.com/2010/04/truthstranger-than-fiction/movie-camera/
http://upload.wikimedia.org/wikipedia/en/1/18/Mr._ZIP.png
Simply put…
Think of compression like taking notes.
Some detail is lost, but you still want to
understand main concepts.
http://keep3.sjfc.edu/students/amf06603/eport/MSTI%20331/Classroom/Notes/classnotes.html
Haar Wavelets
• The first known wavelet is the Haar wavelet
proposed by Alfred Haar in 1909
• Haar used these functions to give an example
of a countable orthonormal system for the
space of square-integrable functions in the
real line
• Note that a square-integrable function is a
real- or complex-valued measurable function
for which the integral of the square of the
absolute value is finite.
All of these must be
compressed,
transmitted and
recovered!
Three ways to compress data:
1. Into cosine waves (by Fourier transform)
2. Into pieces of cosines (short time Fourier
transform)
3. Into wavelets
• Ex. Fingerprint digital database
http://www.mathworks.com/cmsimages/40347_wl_wa_fingerprints_wl_7029.gif
Alfred Haar
• Jewish, Hungarian
mathematician during the
late 19th century
• Received his PhD under
David Hilbert
http://www-history.mcs.st-andrews.ac.uk/BigPictures/Haar.jpeg
1
7/29/2011
Haar Scaling Function
1 𝑜𝑛 [0, 1)
0 𝑒𝑙𝑠𝑒𝑤ℎ𝑒𝑟𝑒
that satisfies the scaling equation,
• Consider the wavelet space, 𝑊 𝑗 , as the orthogonal
complement of 𝑉𝑗 in 𝑉𝑗+1 such that 𝑉𝑗+1 = 𝑉𝑗 ⊕ 𝑊 𝑗
• 𝜑(𝑥) =
𝜑 𝑥 =
How do we get from the
Scaling function to Wavelets?
𝑗
• Each 𝑊 𝑗 has a natural basis, 𝜓𝑖 (𝑥) = ψ 2 𝑗 𝑥 − 𝑖 with
𝑐𝑖 𝜑 2𝑥 − 𝑖
1 on 0,
𝑖∈𝑍
• Normalizing this equation, we get the scaling
𝑗
function: 𝜑𝑖 = 2j/2 𝜑(2 𝑗 𝑥 − 𝑖) , a orthonormal
basis for a vector space 𝑉𝑗
𝜓 𝑥 =
−1 on
1
2
1
2
,1
0 elsewhere
In terms of the scaling function,
𝜓 𝑥 = 𝜑 2𝑥 − 𝜑 2𝑥 − 1
These wavelets form an
orthonormal basis
Normalizing the wavelet function, we
use
𝑗
𝜓𝑖 (𝑥) = 2𝑗/2 𝜓 2𝑗 𝑥 − 𝑖
• For example,
𝜓00 (𝑥) = 𝜓 𝑥
1
Normalizing factor
𝜓01 (𝑥) = 22 𝜓 2𝑥
dilates
translates
What are Wavelets?
Wavelets are a set of non-linear bases
that are used to approximate
functions. They are able to provide a
large amount of compression in signal
processing.
𝑗
𝑗
𝜓𝑖 , 𝜓𝑖 =
∞
𝑗
𝜓
−∞ 𝑖
𝑗
𝜓𝑖 𝑑𝑥
Recall: the goal of
compression is to transform
the information in a way
which makes it easy to read
yet maintains the
information.
But what is compression?
http://science.howstuffworks.com/real-transformer.htm
2
7/29/2011
Averaging and Differencing
Average/Difference Table
• If we have a string of numbers, how
can we compress it?
•Ex.
64 48 16 32 56 56 48 24
64
48
16
32
56
56
48
24
56
24
56
36
8
-8
0
12
40
46
16
10
8
-8
0
12
43
-3
16
10
8
-8
0
12
= 24
56+56
2
= −8
56−56
2
64
48
16
32
56
56
48
24
56
24
56
36
8
-8
0
12
40
46
16
10
8
-8
0
12
43
-3
16
10
8
-8
0
12
How do we compress data?
We compress through the method of Averaging and Differencing!
1. Start with a data string- written with its average and detail
coefficients.
2. Fix a value of 𝜀.
3. Any detail coefficient whose magnitude is less than our 𝜀, set
equal to zero.
Ex.
43
64+48
2
64−48
2
= 56
16+32
2
=8
16−32
2
=0
48−24
2
= 36
= 12
Detail Coefficient
Average Coefficient
Lossless Compression
= 56
48+24
2
Lossy Compression
-3
16
10
8
-8
0
12
10
8
-8
0
12
Set 𝜀 = 3, now we have:
43
0
16
This is lossy compression as 𝜀 > 0
If 𝜀 = 0, we have lossless compression!
So…what does this have to do with
wavelets?
• Recall the Haar scaling function: 𝜑(𝑥) =
1 𝑜𝑛 [0, 1)
0 𝑒𝑙𝑠𝑒𝑤ℎ𝑒𝑟𝑒
that satisfies the scaling equation,
𝜑 𝑥 =
3
𝑐𝑖 𝜑 2𝑥 − 𝑖
𝑖∈𝑍
• For each 0 ≤ 𝑖 ≤ 2 -1, we get an induced scaling
function:
𝜑 3𝑖 𝑥 = 𝜑(23 𝑥 − 𝑖)
• These 8 functions form a basis for the vector space 𝑉 3
of piecewise constant functions on [0,1) with possible
1 2 3
7
breaks at , , ,…,
8 8 8
8
http://www.jstor.org/stable/2691277?seq=8
3
7/29/2011
Recall, the Wavelets!
Similarly, we can describe the basis of
𝑉 2 and 𝑉1 as:
1 on 0,
•𝜓 𝑥 =
𝜑2 𝑖 𝑥 = 𝜑(22 𝑥 − 𝑖)
𝜑1 𝑖 𝑥 = 𝜑(21 𝑥 − 𝑖)
1
−1 on
2
1
2
,1 a
0 elsewhere,
These will serve as interpretations of
the averages, but what about the detail
coefficients?
or 𝜓 𝑥 = 𝜑 2𝑥 − 𝜑(2𝑥 − 1)
• Each function 𝛾𝑗 forms a basis for 𝑊𝑗
𝑖
• So,
𝜓2 = 𝜓 22 𝑥 − 𝑖 forms a basis for 𝑊2
𝑖
𝜓1 = 𝜓 21 𝑥 − 𝑖 forms a basis for 𝑊1
𝑖
Our data:
64 48 16 32 56 56 48 24
• 43𝜑00 − 3𝜓00 + 16𝜓01 + 10𝜓11 + 8𝜓02 − 8𝜓12 + 0𝜓22 + 12𝜓32
Identify this string with the sum:
64𝜑30 + 48𝜑31 + 16𝜑32 + 32𝜑33 + 56𝜑34 + 56𝜑35 + 48𝜑36 + 24𝜑37
=
56𝜑20
=
40𝜑10
+
24𝜑21
+
46𝜑11
36𝜑23
+ 8𝜓20
This is just decomposition with
respect to a special basis
− 8𝜓21
+ 0𝜓22
43
-3
16
10
8
-8
0
12
+ 12𝜓23
+
56𝜑22
+
+
16𝜓10
+ 10𝜓11 + 8𝜓20 − 8𝜓21 + 0𝜓22 + 12𝜓23
• As before, we can simplify this data string of one average and
seven wavelet coefficients by setting some of the wavelet
coefficients to zero depending on a value of epsilon
= 43𝜑00 − 3𝜓00 + 16𝜓10 + 10𝜓11 + 8𝜓20 − 8𝜓21 + 0𝜓22 + 12𝜓23
What about frames?
• 𝜙𝐶 x =
1
3
if 𝑥 ∈ [0,3)
0 otherwise
1
3
3
2
3
,3
2
if 𝑥 ∈ 0,
• 𝜓𝑐 𝑥 = − 1 if 𝑥 ∈
3
0 otherwise
• Notice, neither has orthonormal translates
• (𝜓𝑐 )0 , (𝜓𝑐 )0 ≠ 1 
0
0
• (𝜓𝑐 )0 , (𝜓𝑐 )1 ≠ 0 
0
Ingrid Daubechies
• Belgian physicist and
mathematician
• Working in AT&T Bell
Laboratories in 1988, she found
what is now known as the
Daubechies wavelet
• First woman president of
International Mathematical
Union
• Currently teaches at Duke
University
0
• However, the dilates and translates form a
Parseval frame
http://www.pacm.princeton.edu/photos/Daubechies.jpg
http://gwyddion.net/documentation/user-guideen/wavelet-daubechies4.png
4
7/29/2011
Conclusions
• Wavelets are very new field in
mathematics!
• Wavelets are used to compress
data, making it easier to
process digital media.
• So effective are these wavelets,
that the FBI now uses them to
store fingerprints.
Bibliography
•Aboufadel, Edward and Steven Schlicker. Discovering Wavelets. Canada:
John Wiley & Sons, Inc, 1999.
•Alfred Haar. n.d. 25 July 2011
<http://en.wikipedia.org/wiki/Alfr%C3%A9d_Haar>.
•Ali, Musawir. An Introduction to Wavelets and the Haar Transform. n.d.
25 July 2011 <http://www.cs.ucf.edu/~mali/haar/>.
•Haar Wavelets. n.d. 25 July 2011
<http://en.wikipedia.org/wiki/Haar_wavelet>.
•Ingrid Daubechies. n.d. 25 July 2011
<http://en.wikipedia.org/wiki/Ingrid_Daubechies>.
•Mulcahy, Colm. "Plotting and Scheming with Wavelets." Mathematics
Magazine (1996): 323-343.
•Strang, Gilbert. "Wavelets." American Scientist (1994): 250-255.
5