by Tom Germano

- Introduction
- Linear Algebra Review
- Concepts of Multiresolution Analysis
- The Haar Wavelet
- Haar Wavelet Example
- Filter Banks
- Image Thresholding
- References
- Links

So how can a signal be converted and manipulated while keeping resolution
across the entire signal and still be based in time? This is where wavelets
come into play. Wavelets are finite windows through which the signal can
be viewed. In order to move the window about the length of the signal,
the wavelets can be translated about time in addition to being compressed
and widened.

Basically a vector space is a set of vectors such as V=[(0,1),(1,0),(1/2,1/2),(-1/2,0)].
In addition to defining a vector space by explicitly stating all the vectors
that make up the space, you can also define a vector space using a function.
When reading material on wavelets, the vector space L^{2} is often
mentioned meaning the 2 dimensional plane of real numbers. This vector
space can be thought of as the plane made up by the x and y axis. There
are three important terms to learn for understand vector spaces and these
terms of often used in discussions of wavelets with respect to their use
in multiresolution analysis.

__Linear combination
__– this is the easiest term to understand.
It is simply the sum of a set of vectors or equations where each vector,
value, or function is multiplied by some real constant. It is represented
mathematically by the following:

__Span__ – a span is a set of vectors whose linear combination can
create all of the other vectors in the vector space. For example, using
i=(1,0) and j=(0,1) we can recreate any of the vectors mentioned above
through a linear combination.

i*1 + j*0 = (0,1)

i*0 + j*1 = (1,0)

i*(1/2) + j*(1/2) = (1/2,1/2)

i*(-1/2) + j*0 = (-1/2,0)

So we can say that the vectors [(1,0),(0,1)] span the vector space V mentioned above. If we try to see if just the vectors i=(1,0) and k=(-1/2,0) span V, we’ll see that it does not work.

i*1 + k*0 = (1,0)

i*(-1/2) + k*0 = (-1/2,0)

That works fine, but no matter how hard you try you will never make (0,1) using just I and k, so we can say that the vectors i and k do not span vector space V.

__Basis__ – This is the smallest set of vectors that can span a vector
space. If we create a sub set of our vector space V called S consisting
of the set [i,j,k], we can say that it spans V, but is not a basis for
V. Why, because we can eliminate k from S since k can be created using
i and j. So, S is not a basis, but a set of the vectors [i,j] is a basis
for vector space V. This is not the only basis for V, another basis could
be the vector (1/2,1/2) and (-1/2,0), since those two can also create all
the other vectors.

For practical purposes one can think of an image as a vector space such
as V^{j} would be the perfectly normal image, and V^{j-1}
would be that image at a lower resolution until you get to V^{0}
where you just have one pixel in the entire image. For each vector space
V^{j}, there is an orthogonal complement called W^{j} and
the basis function for this vector space is the wavelet.

These are the root functions for the haar wavelet. fis what is called the scale of the haar wavelet, y is the actual wavelet. With these two functions alone, you really cannot do much, so you must create a function where you can translate and scale both of these functions which are the following:

**i** is responsible for the scaling of the function, it basically
shrinks and expands the graph the function makes and represents the resolution
of the function.

**j** is the translation of the graph across the time axis. Note
how as the resolution increases, the number of possible translations increases
exponentially.

Also, f(i,j) and y(i,j)
for the haar wavelet do not call themselves unlike some other wavelets,
they call the piecewise functions mentioned above. To show how these functions
actually work, see the Animations section in this Maple
worksheet.

Pixel Values
`[9 7 3 5] (9+7)/2 = 8`
`
(9-7)/2 = 1`
`
(3+5)/2 = 4`
`
(3-5)/2 = -1`

`[8 4 1 –1] (8+4)/2 = 6`
`
(8-4)/2 = 2`

`[6 2 1 –1]`

There are two types of data here, the sparse data and the detailed data. The sparse data is what we want to get rid of and in this examples are the numbers [9,7,3,5,8,4,6]. The other data type here are the details which make up the differences when doing our compression and here they are [2,1,-1].

This may look wonderful and all, but what good is compression that takes
four values and compresses it to four values? Simple, in images especially,
the pixel values are similar to their neighbors. If they weren’t we would
be looking at random static and there would not be an object. When doing
the averaging and differencing with wavelets, the detail values are usually
low numbers and sometimes zero. These detail values (which compose all
but one of the resulting values) can be compressed much better than the
original pixel values. In this example, the number [6 2 1 –1] are more
easily compressible than [9 7 3 5].

Here we see what happens to an array of 8 values. First the values are
filtered with the high and low pass filters. The data from the high pass
filter is stored and the data from the low pass filter is filtered again.
This process repeats until there is only one value left and since the averaging
and differencing works in pairs, that value is saved. For my examples,
the differences are stored in an array called *d* and the coefficients
of the actual values and sparse values are stored in an array called *c.*
To see how these filter banks are applied using matrices, please review
the Maple worksheet.

[1,0,-3,2,1,0,1,2]

We can do our normal compression and get the following:

[.5, -.5, .5, -.5, .5, -2.5, .5, -.5]

Or we can implement the scaling of 2^{(j/2)} and get this:

From here we can do a better job of applying a threshold on our detail values. In this example we can scale any value at or below 1/sqrt(2) to 0 and get the following as our new coefficients:

How well does this thresholding mangle our orginial data? Here are the plots of the original data and reconstructed data with the thresheld coefficients followed by the comparison of the two:

Chui, Charles K., __An Introduction to Wavelets__, Academic Press,
Boston, 1992.

Chui, Charles K., __Wavelets: A Tutorial in Theory and Applications__,
Academic Press, Boston, 1992.

Daubechies, Ingrid, __Different perspectives on wavelets : American
Mathematical Society Short Course__, January 11-12, 1993, San Antonio,
Texas.

Daubechies, Ingrid, __Ten lectures on Wavelets__, Society for Industrial
and Applied Mathematics, Kolman,

Iyengar, S. S., Prasad, L., __Wavelet Analysis wth Applications to
Image Processing__, CRC Press, Boca Raton, 1997.

Kolman, Bernard, __Introductory Linear Algebra with Applications__,
Prentice Hall, New Jersey, 1997.

Renikoff, Howard L., Wells, Raymond O. Jr, __Wavelet Analysis: The
Scalable Structure of Information__, Springer-Verlag, New York, 1998

Stuart, R. D., __An Introduction to Fourier Analysis__, Science Paperback,
Cambridge, 1966.

Walter, Gilbert G., __Wavelets and Other Orthogonal Systems with Applications__,
CRC Press, Boca Raton, 1994.

S. G. Mallat, "A Theory for Multiresolution Signal Decomposition: A Wavelet Representation," IEEE Transactions on Pattern Analysis and Machine Intelligence, Vol 11, No. 7, July 1989.

E. J. Stollnitz, T. D. DeRose, D. H. Salesin, "Wavelets for Computer Graphics: A Primer Part I", IEEE Computer Graphics and Applications, 15, May 1995.

E. J. Stollnitz, T. D. DeRose, D. H. Salesin, "Wavelets for Computer
Graphics: A Primer Part II", IEEE Computer Graphics

and Applications, 15, July 1995.

C. Mulcahy, "Image Compression Using the Haar Wavelet Transform,"

C. Mulcahy, "Plotting and Scheming with Wavelet," Mathematics Magazine 69, 5, 1996.

G. Strang, "Wavelets and Dilation Equations: A Brief Introduction," Siam Review 31, 1989.

P. Muller, B. Vidakovic, "Wavelets for Kids: A Tutorial Introduction,"
1991.

B. Lipchak, "2D and 3D Progressive Transmission Using Wavelets," http://www.cs.wpi.edu/~matt/courses/cs563/talks/Wavelet_Presentation/Wavelet_Presentation.html

A. Nicolaou, "A Wavelet Wading Pool," http://www.cgl.uwaterloo.ca/~anicolao/wadingpool/WaveletWadingPool.html

R. Polikar, "The Wavelet Tutorial Part I: Fundamental Concepts and an Overview of the Wavelet Theory," http://www.public.iastate.edu/~rpolikar/WAVELETS/WTpart1.html

R. Polikar, "The Wavelet Tutorial Part II: Fundamentals: The Fourier Transform and the Short Term Fourier Transform," http://www.public.iastate.edu/~rpolikar/WAVELETS/WTpart2.html

R. Polikar, "The Wavelet Tutorial Part III: Multiresolution Analysis and the Continuous Wavelet Transform," http://www.public.iastate.edu/~rpolikar/WAVELETS/WTpart3.html

R. Polikar, "The Wavelet Tutorial Part IV: Multiresolution Analysis: The Discrete Wavelet Transform," http://www.public.iastate.edu/~rpolikar/WAVELETS/WTpart4.html

D. Zorin, J. Owens, "Introduction to Wavelets," http://www-graphics.stanford.edu/courses/cs448-97-fall/notes.html

D. Zorin, J. Owens, "Introduction to Wavelets II," http://www-graphics.stanford.edu/courses/cs448-97-fall/notes.html

http://www.amara.com/current/wavelet.html – Amara’s Wavelets Page containing tutorials and many links

http://dir.yahoo.com/Science/Mathematics/Wavelets/ - Wavelets at Yahoo

http://www.mathsoft.com/wavelets.html – Huge resource of papers about wavelets

http://www.multires.caltech.edu/teaching/courses/waveletcourse/ - Wavelets in computer graphics

http://www.cs.washington.edu/research/projects/grail2/www/pub/abstracts.html – More papers on the applications of wavelets in computer graphics

http://cas.ensmp.fr/~chaplais/Wavetour_presentation/Wavetour_presentation_US.html – A Wavelet Tour of Signal Processing by Stephane Mallat

http://www-graphics.stanford.edu/courses/cs448-97-fall/notes.html
– Stanford course with lecture notes on computer graphics