Discreet Haar Transform | Wavelet | Functional Analysis

Today’s Schedule Building the Haar Matrix Coding the Haar Transform 2D Haar Transform Iterating In the Classroom

Discrete Haar Wavelet Transforms
Patrick J. Van Fleet
Center for Applied Mathematics
University of St. Thomas
St. Paul, MN USA
PREP - Wavelet Workshop, 2006
Wednesday, 7 June, 2006 Lecture 4
Discrete Haar Wavelet Transforms
Today’s Schedule Building the Haar Matrix Coding the Haar Transform 2D Haar Transform Iterating In the Classroom
Outline
Today’s Schedule
Building the Haar Matrix
Putting Two Filters Together
Why the Word Wavelet?
Examples
Coding the Haar Transform
Implementing W
N
Implementing W
T
N
2D Haar Transform
Building the 2D Transform
Coding the 2D Transform
Iterating
In the Classroom
Teaching Ideas
Computer Usage
Wednesday, 7 June, 2006 Lecture 4
Discrete Haar Wavelet Transforms
Today’s Schedule Building the Haar Matrix Coding the Haar Transform 2D Haar Transform Iterating In the Classroom
Today’s Schedule
9:00-10:15 Lecture One: Why Wavelets?
10:15-10:30 Coffee Break (OSS 235)
10:30-11:45 Lecture Two: Digital Images, Measures, and
Huffman Codes
12:00-1:00 Lunch (Cafeteria)
1:30-2:45 Lecture Three: Fourier Series, Convolution and
Filters
2:45-3:00 Coffee Break (OSS 235)
3:00-4:15 ⇒Lecture Four: 1D and 2D Haar Transforms
5:30-6:30 Dinner (Cafeteria)
Wednesday, 7 June, 2006 Lecture 4
Discrete Haar Wavelet Transforms
Today’s Schedule Building the Haar Matrix Coding the Haar Transform 2D Haar Transform Iterating In the Classroom
Putting Two Filters Together
Building the Haar Matrix
Putting Two Filters Together

Consider again the filter h = (h
0
, h
1
) = (
1
2
,
1
2
).

If we compute y = h ∗ x, we obtain the components
y
n
=
1
2
x
n
+
1
2
x
n−1

We could write down the convolution matrix
Wednesday, 7 June, 2006 Lecture 4
Discrete Haar Wavelet Transforms
Today’s Schedule Building the Haar Matrix Coding the Haar Transform 2D Haar Transform Iterating In the Classroom
Putting Two Filters Together
Building the Haar Matrix
Putting Two Filters Together

Consider again the filter h = (h
0
, h
1
) = (
1
2
,
1
2
).

If we compute y = h ∗ x, we obtain the components
y
n
=
1
2
x
n
+
1
2
x
n−1

We could write down the convolution matrix
Wednesday, 7 June, 2006 Lecture 4
Discrete Haar Wavelet Transforms
Today’s Schedule Building the Haar Matrix Coding the Haar Transform 2D Haar Transform Iterating In the Classroom
Putting Two Filters Together
Building the Haar Matrix
Putting Two Filters Together

Consider again the filter h = (h
0
, h
1
) = (
1
2
,
1
2
).

If we compute y = h ∗ x, we obtain the components
y
n
=
1
2
x
n
+
1
2
x
n−1

We could write down the convolution matrix
Wednesday, 7 June, 2006 Lecture 4
Discrete Haar Wavelet Transforms
Today’s Schedule Building the Haar Matrix Coding the Haar Transform 2D Haar Transform Iterating In the Classroom
Putting Two Filters Together
Building the Haar Matrix
Putting Two Filters Together

Consider again the filter h = (h
0
, h
1
) = (
1
2
,
1
2
).

If we compute y = h ∗ x, we obtain the components
y
n
=
1
2
x
n
+
1
2
x
n−1

We could write down the convolution matrix
Wednesday, 7 June, 2006 Lecture 4
Discrete Haar Wavelet Transforms
Today’s Schedule Building the Haar Matrix Coding the Haar Transform 2D Haar Transform Iterating In the Classroom
Putting Two Filters Together
Building the Haar Matrix
Putting Two Filters Together
H =

.
.
.
.
.
.
.
.
.
.
.
.
0 0 0
1
2
1
2
0 0 0 0 0 0 0 0
0 0 0 0
1
2
1
2
0 0 0 0 0 0 0
. . . 0 0 0 0 0
1
2
1
2
0 0 0 0 0 0 . . .
0 0 0 0 0 0
1
2
1
2
0 0 0 0 0
0 0 0 0 0 0 0
1
2
1
2
0 0 0 0
.
.
.
.
.
.
.
.
.
¸
¸
¸
¸
¸
¸
¸
¸
¸
¸
¸
Wednesday, 7 June, 2006 Lecture 4
Discrete Haar Wavelet Transforms
Today’s Schedule Building the Haar Matrix Coding the Haar Transform 2D Haar Transform Iterating In the Classroom
Putting Two Filters Together
Building the Haar Matrix
Putting Two Filters Together

. . . but we can’t invert the process.

What would we need to be able to invert the process?

We have averages of consecutive numbers - if we had the
directed distance between these averages and the
consecutive numbers, then we could invert.

The directed distance is exactly the sequence x convolved
with the filter g = (
1
2
, −
1
2
).
Wednesday, 7 June, 2006 Lecture 4
Discrete Haar Wavelet Transforms
Today’s Schedule Building the Haar Matrix Coding the Haar Transform 2D Haar Transform Iterating In the Classroom
Putting Two Filters Together
Building the Haar Matrix
Putting Two Filters Together

. . . but we can’t invert the process.

What would we need to be able to invert the process?

We have averages of consecutive numbers - if we had the
directed distance between these averages and the
consecutive numbers, then we could invert.

The directed distance is exactly the sequence x convolved
with the filter g = (
1
2
, −
1
2
).
Wednesday, 7 June, 2006 Lecture 4
Discrete Haar Wavelet Transforms
Today’s Schedule Building the Haar Matrix Coding the Haar Transform 2D Haar Transform Iterating In the Classroom
Putting Two Filters Together
Building the Haar Matrix
Putting Two Filters Together

. . . but we can’t invert the process.

What would we need to be able to invert the process?

We have averages of consecutive numbers - if we had the
directed distance between these averages and the
consecutive numbers, then we could invert.

The directed distance is exactly the sequence x convolved
with the filter g = (
1
2
, −
1
2
).
Wednesday, 7 June, 2006 Lecture 4
Discrete Haar Wavelet Transforms
Today’s Schedule Building the Haar Matrix Coding the Haar Transform 2D Haar Transform Iterating In the Classroom
Putting Two Filters Together
Building the Haar Matrix
Putting Two Filters Together

. . . but we can’t invert the process.

What would we need to be able to invert the process?

We have averages of consecutive numbers - if we had the
directed distance between these averages and the
consecutive numbers, then we could invert.

The directed distance is exactly the sequence x convolved
with the filter g = (
1
2
, −
1
2
).
Wednesday, 7 June, 2006 Lecture 4
Discrete Haar Wavelet Transforms
Today’s Schedule Building the Haar Matrix Coding the Haar Transform 2D Haar Transform Iterating In the Classroom
Putting Two Filters Together
Building the Haar Matrix
Putting Two Filters Together

. . . but we can’t invert the process.

What would we need to be able to invert the process?

We have averages of consecutive numbers - if we had the
directed distance between these averages and the
consecutive numbers, then we could invert.

The directed distance is exactly the sequence x convolved
with the filter g = (
1
2
, −
1
2
).
Wednesday, 7 June, 2006 Lecture 4
Discrete Haar Wavelet Transforms
Today’s Schedule Building the Haar Matrix Coding the Haar Transform 2D Haar Transform Iterating In the Classroom
Putting Two Filters Together
Building the Haar Matrix
Putting Two Filters Together
Indeed if
y
n
=
1
2
x
n
+
1
2
x
n−1
and z
n
=
1
2
x
n

1
2
x
n−1
then
x
n
= y
n
+ z
n
and x
n−1
= y
n
−z
n
Wednesday, 7 June, 2006 Lecture 4
Discrete Haar Wavelet Transforms
Today’s Schedule Building the Haar Matrix Coding the Haar Transform 2D Haar Transform Iterating In the Classroom
Putting Two Filters Together
Building the Haar Matrix
Putting Two Filters Together
Perhaps we could invert the process if we used both filters. We
know that G is
Wednesday, 7 June, 2006 Lecture 4
Discrete Haar Wavelet Transforms
Today’s Schedule Building the Haar Matrix Coding the Haar Transform 2D Haar Transform Iterating In the Classroom
Putting Two Filters Together
Building the Haar Matrix
Putting Two Filters Together
G =

.
.
.
.
.
.
.
.
.
.
.
.
0 0 0 −
1
2
1
2
0 0 0 0 0 0 0 0
0 0 0 0 −
1
2
1
2
0 0 0 0 0 0 0
. . . 0 0 0 0 0 −
1
2
1
2
0 0 0 0 0 0 . . .
0 0 0 0 0 0 −
1
2
1
2
0 0 0 0 0
0 0 0 0 0 0 0 −
1
2
1
2
0 0 0 0
.
.
.
.
.
.
.
.
.
¸
¸
¸
¸
¸
¸
¸
¸
¸
¸
¸
Wednesday, 7 June, 2006 Lecture 4
Discrete Haar Wavelet Transforms
Today’s Schedule Building the Haar Matrix Coding the Haar Transform 2D Haar Transform Iterating In the Classroom
Putting Two Filters Together
Building the Haar Matrix
Putting Two Filters Together
So that

H
G
¸
¸
· x =

y
z
¸
¸
Wednesday, 7 June, 2006 Lecture 4
Discrete Haar Wavelet Transforms
Today’s Schedule Building the Haar Matrix Coding the Haar Transform 2D Haar Transform Iterating In the Classroom
Putting Two Filters Together
Building the Haar Matrix
Putting Two Filters Together
If we think about inverting, we can write down:
Wednesday, 7 June, 2006 Lecture 4
Discrete Haar Wavelet Transforms
Today’s Schedule Building the Haar Matrix Coding the Haar Transform 2D Haar Transform Iterating In the Classroom
Putting Two Filters Together
Building the Haar Matrix
Putting Two Filters Together
.
.
.
.
.
.
y
1
−z
1
=
x
1
+x
0
2

x
1
−x
0
2
= x
0
y
1
+z
1
=
x
1
+x
0
2
+
x
1
−x
0
2
= x
1
y
2
−z
2
=
x
2
+x
1
2

x
2
−x
1
2
= x
1
y
2
+z
2
=
x
2
+x
1
2
+
x
2
−x
1
2
= x
2
y
3
−z
3
=
x
3
+x
2
2

x
3
−x
2
2
= x
2
y
3
+z
3
=
x
3
+x
2
2
+
x
3
−x
2
2
= x
3
.
.
.
.
.
.
Wednesday, 7 June, 2006 Lecture 4
Discrete Haar Wavelet Transforms
Today’s Schedule Building the Haar Matrix Coding the Haar Transform 2D Haar Transform Iterating In the Classroom
Putting Two Filters Together
Building the Haar Matrix
Putting Two Filters Together
But there is some redundancy here - we do not need all the
values of y
n
, z
n
to recover x
n
:
Wednesday, 7 June, 2006 Lecture 4
Discrete Haar Wavelet Transforms
Today’s Schedule Building the Haar Matrix Coding the Haar Transform 2D Haar Transform Iterating In the Classroom
Putting Two Filters Together
Building the Haar Matrix
Putting Two Filters Together
.
.
.
.
.
.
y
1
−z
1
=
x
1
+x
0
2

x
1
−x
0
2
= x
0
y
1
+z
1
=
x
1
+x
0
2
+
x
1
−x
0
2
= x
1
y
2
−z
2
=
x
2
+x
1
2

x
2
−x
1
2
= x
1
y
2
+z
2
=
x
2
+x
1
2
+
x
2
−x
1
2
= x
2
y
3
−z
3
=
x
3
+x
2
2

x
3
−x
2
2
= x
2
y
3
+z
3
=
x
3
+x
2
2
+
x
3
−x
2
2
= x
3
.
.
.
.
.
.
Wednesday, 7 June, 2006 Lecture 4
Discrete Haar Wavelet Transforms
Today’s Schedule Building the Haar Matrix Coding the Haar Transform 2D Haar Transform Iterating In the Classroom
Putting Two Filters Together
Building the Haar Matrix
Putting Two Filters Together

So we can omit every other row in H, G and still produce
enough to be able to recover x

This is called downsampling.

We are also now in a position to truncate our matrix.
Indeed, if x = (x
0
, . . . , x
N
), then it is natural to truncate the
matrix and write:
Wednesday, 7 June, 2006 Lecture 4
Discrete Haar Wavelet Transforms
Today’s Schedule Building the Haar Matrix Coding the Haar Transform 2D Haar Transform Iterating In the Classroom
Putting Two Filters Together
Building the Haar Matrix
Putting Two Filters Together

So we can omit every other row in H, G and still produce
enough to be able to recover x

This is called downsampling.

We are also now in a position to truncate our matrix.
Indeed, if x = (x
0
, . . . , x
N
), then it is natural to truncate the
matrix and write:
Wednesday, 7 June, 2006 Lecture 4
Discrete Haar Wavelet Transforms
Today’s Schedule Building the Haar Matrix Coding the Haar Transform 2D Haar Transform Iterating In the Classroom
Putting Two Filters Together
Building the Haar Matrix
Putting Two Filters Together

So we can omit every other row in H, G and still produce
enough to be able to recover x

This is called downsampling.

We are also now in a position to truncate our matrix.
Indeed, if x = (x
0
, . . . , x
N
), then it is natural to truncate the
matrix and write:
Wednesday, 7 June, 2006 Lecture 4
Discrete Haar Wavelet Transforms
Today’s Schedule Building the Haar Matrix Coding the Haar Transform 2D Haar Transform Iterating In the Classroom
Putting Two Filters Together
Building the Haar Matrix
Putting Two Filters Together

So we can omit every other row in H, G and still produce
enough to be able to recover x

This is called downsampling.

We are also now in a position to truncate our matrix.
Indeed, if x = (x
0
, . . . , x
N
), then it is natural to truncate the
matrix and write:
Wednesday, 7 June, 2006 Lecture 4
Discrete Haar Wavelet Transforms
Today’s Schedule Building the Haar Matrix Coding the Haar Transform 2D Haar Transform Iterating In the Classroom
Putting Two Filters Together
Building the Haar Matrix
Putting Two Filters Together
˜
W
N
=

1
2
1
2
0 0 0 0 0 0
0 0
1
2
1
2
0 0 . . . 0 0
.
.
.
.
.
.
.
.
.
0 0 0 0 . . . 0 0
1
2
1
2

1
2
1
2
0 0 0 0 0 0
0 0 −
1
2
1
2
0 0 . . . 0 0
.
.
.
.
.
.
.
.
.
0 0 0 0 . . . 0 0 −
1
2
1
2
¸
¸
¸
¸
¸
¸
¸
¸
¸
¸
¸
¸
¸
¸
¸
¸
¸
Wednesday, 7 June, 2006 Lecture 4
Discrete Haar Wavelet Transforms
Today’s Schedule Building the Haar Matrix Coding the Haar Transform 2D Haar Transform Iterating In the Classroom
Putting Two Filters Together
Building the Haar Matrix
Putting Two Filters Together
This matrix is easy to invert if we remember the formulas:
x
n
= y
n
+ z
n
and x
n−1
= y
n
−z
n
We have:
Wednesday, 7 June, 2006 Lecture 4
Discrete Haar Wavelet Transforms
Today’s Schedule Building the Haar Matrix Coding the Haar Transform 2D Haar Transform Iterating In the Classroom
Putting Two Filters Together
Building the Haar Matrix
Putting Two Filters Together
˜
W
−1
N
=

1 0 0
1 0 0
0 1 0
0 1 0
.
.
.
.
.
.
.
.
.
0 0 0
0 0 0
0 0 1
0 0 1

−1 0 0
1 0 0
0 −1 0
0 1 0
.
.
.
.
.
.
.
.
.
0 0 0
0 0 0
0 0 −1
0 0 1
¸
¸
¸
¸
¸
¸
¸
¸
¸
¸
¸
¸
¸
¸
¸
Wednesday, 7 June, 2006 Lecture 4
Discrete Haar Wavelet Transforms
Today’s Schedule Building the Haar Matrix Coding the Haar Transform 2D Haar Transform Iterating In the Classroom
Putting Two Filters Together
Building the Haar Matrix
Putting Two Filters Together

Note we are very close to having
˜
W
N
an orthogonal matrix.

We have
˜
W
T
N
=
1
2
˜
W
−1
N
.

If we multiply
˜
W
N
by

2, we will obtain an orthogonal
matrix.

We have:
Wednesday, 7 June, 2006 Lecture 4
Discrete Haar Wavelet Transforms
Today’s Schedule Building the Haar Matrix Coding the Haar Transform 2D Haar Transform Iterating In the Classroom
Putting Two Filters Together
Building the Haar Matrix
Putting Two Filters Together

Note we are very close to having
˜
W
N
an orthogonal matrix.

We have
˜
W
T
N
=
1
2
˜
W
−1
N
.

If we multiply
˜
W
N
by

2, we will obtain an orthogonal
matrix.

We have:
Wednesday, 7 June, 2006 Lecture 4
Discrete Haar Wavelet Transforms
Today’s Schedule Building the Haar Matrix Coding the Haar Transform 2D Haar Transform Iterating In the Classroom
Putting Two Filters Together
Building the Haar Matrix
Putting Two Filters Together

Note we are very close to having
˜
W
N
an orthogonal matrix.

We have
˜
W
T
N
=
1
2
˜
W
−1
N
.

If we multiply
˜
W
N
by

2, we will obtain an orthogonal
matrix.

We have:
Wednesday, 7 June, 2006 Lecture 4
Discrete Haar Wavelet Transforms
Today’s Schedule Building the Haar Matrix Coding the Haar Transform 2D Haar Transform Iterating In the Classroom
Putting Two Filters Together
Building the Haar Matrix
Putting Two Filters Together

Note we are very close to having
˜
W
N
an orthogonal matrix.

We have
˜
W
T
N
=
1
2
˜
W
−1
N
.

If we multiply
˜
W
N
by

2, we will obtain an orthogonal
matrix.

We have:
Wednesday, 7 June, 2006 Lecture 4
Discrete Haar Wavelet Transforms
Today’s Schedule Building the Haar Matrix Coding the Haar Transform 2D Haar Transform Iterating In the Classroom
Putting Two Filters Together
Building the Haar Matrix
Putting Two Filters Together

Note we are very close to having
˜
W
N
an orthogonal matrix.

We have
˜
W
T
N
=
1
2
˜
W
−1
N
.

If we multiply
˜
W
N
by

2, we will obtain an orthogonal
matrix.

We have:
Wednesday, 7 June, 2006 Lecture 4
Discrete Haar Wavelet Transforms
Today’s Schedule Building the Haar Matrix Coding the Haar Transform 2D Haar Transform Iterating In the Classroom
Putting Two Filters Together
Building the Haar Matrix
Putting Two Filters Together
W
N
=

H
G
¸
¸
=


2
2

2
2
0 0 0 0
0 0

2
2

2
2
0 0
.
.
.
.
.
.
.
.
.
0 0 0 0 . . .

2
2

2
2


2
2

2
2
0 0 0 0
0 0 −

2
2

2
2
0 0
.
.
.
.
.
.
.
.
.
0 0 0 0 . . . −

2
2

2
2
¸
¸
¸
¸
¸
¸
¸
¸
¸
¸
¸
¸
¸
¸
¸
¸
¸
¸
Wednesday, 7 June, 2006 Lecture 4
Discrete Haar Wavelet Transforms
Today’s Schedule Building the Haar Matrix Coding the Haar Transform 2D Haar Transform Iterating In the Classroom
Putting Two Filters Together
Building the Haar Matrix
Putting Two Filters Together

W
N
is called the Discrete Haar Wavelet Transform

The filter
h =


2
2
,

2
2

is called the Haar filter.

Note that H(ω) =

2
2
+

2
2
e
i ω
satisfies H(π) = 0, but
H(0) =

2
2
. We will still consider this to be a lowpass filter-
the

2
2
resulted when we made the transform orthogonal.
Wednesday, 7 June, 2006 Lecture 4
Discrete Haar Wavelet Transforms
Today’s Schedule Building the Haar Matrix Coding the Haar Transform 2D Haar Transform Iterating In the Classroom
Putting Two Filters Together
Building the Haar Matrix
Putting Two Filters Together

W
N
is called the Discrete Haar Wavelet Transform

The filter
h =


2
2
,

2
2

is called the Haar filter.

Note that H(ω) =

2
2
+

2
2
e
i ω
satisfies H(π) = 0, but
H(0) =

2
2
. We will still consider this to be a lowpass filter-
the

2
2
resulted when we made the transform orthogonal.
Wednesday, 7 June, 2006 Lecture 4
Discrete Haar Wavelet Transforms
Today’s Schedule Building the Haar Matrix Coding the Haar Transform 2D Haar Transform Iterating In the Classroom
Putting Two Filters Together
Building the Haar Matrix
Putting Two Filters Together

W
N
is called the Discrete Haar Wavelet Transform

The filter
h =


2
2
,

2
2

is called the Haar filter.

Note that H(ω) =

2
2
+

2
2
e
i ω
satisfies H(π) = 0, but
H(0) =

2
2
. We will still consider this to be a lowpass filter-
the

2
2
resulted when we made the transform orthogonal.
Wednesday, 7 June, 2006 Lecture 4
Discrete Haar Wavelet Transforms
Today’s Schedule Building the Haar Matrix Coding the Haar Transform 2D Haar Transform Iterating In the Classroom
Putting Two Filters Together
Building the Haar Matrix
Putting Two Filters Together

W
N
is called the Discrete Haar Wavelet Transform

The filter
h =


2
2
,

2
2

is called the Haar filter.

Note that H(ω) =

2
2
+

2
2
e
i ω
satisfies H(π) = 0, but
H(0) =

2
2
. We will still consider this to be a lowpass filter-
the

2
2
resulted when we made the transform orthogonal.
Wednesday, 7 June, 2006 Lecture 4
Discrete Haar Wavelet Transforms
Today’s Schedule Building the Haar Matrix Coding the Haar Transform 2D Haar Transform Iterating In the Classroom
Why the Word Wavelet?
Building the Haar Matrix
Why the Word Wavelet?

The word wavelet comes from the more classical treatment
of the topic. Here, we work in L
2
(R) and downsampling is
basically a way to move between nested subspaces V
j
that
are generated by the translates and dilates of a single
scaling function.

If V
0
is the space of piecewise constants with possible
breaks at Z, then the characteristic function φ(t ) = χ
[0,1)
(t )
and its translates form an orthonormal basis for V
0
.
Wednesday, 7 June, 2006 Lecture 4
Discrete Haar Wavelet Transforms
Today’s Schedule Building the Haar Matrix Coding the Haar Transform 2D Haar Transform Iterating In the Classroom
Why the Word Wavelet?
Building the Haar Matrix
Why the Word Wavelet?

The word wavelet comes from the more classical treatment
of the topic. Here, we work in L
2
(R) and downsampling is
basically a way to move between nested subspaces V
j
that
are generated by the translates and dilates of a single
scaling function.

If V
0
is the space of piecewise constants with possible
breaks at Z, then the characteristic function φ(t ) = χ
[0,1)
(t )
and its translates form an orthonormal basis for V
0
.
Wednesday, 7 June, 2006 Lecture 4
Discrete Haar Wavelet Transforms
Today’s Schedule Building the Haar Matrix Coding the Haar Transform 2D Haar Transform Iterating In the Classroom
Why the Word Wavelet?
Building the Haar Matrix
Why the Word Wavelet?

The word wavelet comes from the more classical treatment
of the topic. Here, we work in L
2
(R) and downsampling is
basically a way to move between nested subspaces V
j
that
are generated by the translates and dilates of a single
scaling function.

If V
0
is the space of piecewise constants with possible
breaks at Z, then the characteristic function φ(t ) = χ
[0,1)
(t )
and its translates form an orthonormal basis for V
0
.
Wednesday, 7 June, 2006 Lecture 4
Discrete Haar Wavelet Transforms
Today’s Schedule Building the Haar Matrix Coding the Haar Transform 2D Haar Transform Iterating In the Classroom
Why the Word Wavelet?
Building the Haar Matrix
Why the Word Wavelet?
Wednesday, 7 June, 2006 Lecture 4
Discrete Haar Wavelet Transforms
Today’s Schedule Building the Haar Matrix Coding the Haar Transform 2D Haar Transform Iterating In the Classroom
Why the Word Wavelet?
Building the Haar Matrix
Why the Word Wavelet?
If V
1
is the space of piecewise constants with possible
breakpoints at
1
2
Z, then V
0
⊂ V
1
, and the functions

2φ(2t −k)
form an orthornormal basis for V
1
.
Wednesday, 7 June, 2006 Lecture 4
Discrete Haar Wavelet Transforms
Today’s Schedule Building the Haar Matrix Coding the Haar Transform 2D Haar Transform Iterating In the Classroom
Why the Word Wavelet?
Building the Haar Matrix
Why the Word Wavelet?
Note that
φ(t ) =

2


2
2
φ(2t ) +

2
2
φ(2t −1)

is called a dilation equation.
Wednesday, 7 June, 2006 Lecture 4
Discrete Haar Wavelet Transforms
Today’s Schedule Building the Haar Matrix Coding the Haar Transform 2D Haar Transform Iterating In the Classroom
Why the Word Wavelet?
Building the Haar Matrix
Why the Word Wavelet?

We can get the Haar filter coefficients from the dilation
equation.

The word wavelet refers to the function ψ(t ) that generates
a basis for the orthogonal complement of V
0
in V
1
.

In this case, the wavelet function is
ψ(t ) =

1 0 ≤ t <
1
2
−1
1
2
≤ t < 1
Wednesday, 7 June, 2006 Lecture 4
Discrete Haar Wavelet Transforms
Today’s Schedule Building the Haar Matrix Coding the Haar Transform 2D Haar Transform Iterating In the Classroom
Why the Word Wavelet?
Building the Haar Matrix
Why the Word Wavelet?

We can get the Haar filter coefficients from the dilation
equation.

The word wavelet refers to the function ψ(t ) that generates
a basis for the orthogonal complement of V
0
in V
1
.

In this case, the wavelet function is
ψ(t ) =

1 0 ≤ t <
1
2
−1
1
2
≤ t < 1
Wednesday, 7 June, 2006 Lecture 4
Discrete Haar Wavelet Transforms
Today’s Schedule Building the Haar Matrix Coding the Haar Transform 2D Haar Transform Iterating In the Classroom
Why the Word Wavelet?
Building the Haar Matrix
Why the Word Wavelet?

We can get the Haar filter coefficients from the dilation
equation.

The word wavelet refers to the function ψ(t ) that generates
a basis for the orthogonal complement of V
0
in V
1
.

In this case, the wavelet function is
ψ(t ) =

1 0 ≤ t <
1
2
−1
1
2
≤ t < 1
Wednesday, 7 June, 2006 Lecture 4
Discrete Haar Wavelet Transforms
Today’s Schedule Building the Haar Matrix Coding the Haar Transform 2D Haar Transform Iterating In the Classroom
Why the Word Wavelet?
Building the Haar Matrix
Why the Word Wavelet?

We can get the Haar filter coefficients from the dilation
equation.

The word wavelet refers to the function ψ(t ) that generates
a basis for the orthogonal complement of V
0
in V
1
.

In this case, the wavelet function is
ψ(t ) =

1 0 ≤ t <
1
2
−1
1
2
≤ t < 1
Wednesday, 7 June, 2006 Lecture 4
Discrete Haar Wavelet Transforms
Today’s Schedule Building the Haar Matrix Coding the Haar Transform 2D Haar Transform Iterating In the Classroom
Why the Word Wavelet?
Building the Haar Matrix
Why the Word Wavelet?
Note that ψ(t ) ∈ V
1
and
ψ(t ) = φ(t ) =

2


2
2
φ(2t ) −

2
2
φ(2t −1)

so that the highpass filter g =


2
2
, −

2
2

can be read from this
dilation equation.
Wednesday, 7 June, 2006 Lecture 4
Discrete Haar Wavelet Transforms
Today’s Schedule Building the Haar Matrix Coding the Haar Transform 2D Haar Transform Iterating In the Classroom
Why the Word Wavelet?
Building the Haar Matrix
Why the Word Wavelet?

I opted to stay away from the classical approach to
wavelets.

It is beautiful theory, but too much for sophomores and
juniors.

I believe it’s better to give them a practical introduction to
Fourier series and convolution, and then derive the the
discrete wavelet transform by using a lowpass/highpass
filter pair and downsampling.
Wednesday, 7 June, 2006 Lecture 4
Discrete Haar Wavelet Transforms
Today’s Schedule Building the Haar Matrix Coding the Haar Transform 2D Haar Transform Iterating In the Classroom
Why the Word Wavelet?
Building the Haar Matrix
Why the Word Wavelet?

I opted to stay away from the classical approach to
wavelets.

It is beautiful theory, but too much for sophomores and
juniors.

I believe it’s better to give them a practical introduction to
Fourier series and convolution, and then derive the the
discrete wavelet transform by using a lowpass/highpass
filter pair and downsampling.
Wednesday, 7 June, 2006 Lecture 4
Discrete Haar Wavelet Transforms
Today’s Schedule Building the Haar Matrix Coding the Haar Transform 2D Haar Transform Iterating In the Classroom
Why the Word Wavelet?
Building the Haar Matrix
Why the Word Wavelet?

I opted to stay away from the classical approach to
wavelets.

It is beautiful theory, but too much for sophomores and
juniors.

I believe it’s better to give them a practical introduction to
Fourier series and convolution, and then derive the the
discrete wavelet transform by using a lowpass/highpass
filter pair and downsampling.
Wednesday, 7 June, 2006 Lecture 4
Discrete Haar Wavelet Transforms
Today’s Schedule Building the Haar Matrix Coding the Haar Transform 2D Haar Transform Iterating In the Classroom
Why the Word Wavelet?
Building the Haar Matrix
Why the Word Wavelet?

I opted to stay away from the classical approach to
wavelets.

It is beautiful theory, but too much for sophomores and
juniors.

I believe it’s better to give them a practical introduction to
Fourier series and convolution, and then derive the the
discrete wavelet transform by using a lowpass/highpass
filter pair and downsampling.
Wednesday, 7 June, 2006 Lecture 4
Discrete Haar Wavelet Transforms
Today’s Schedule Building the Haar Matrix Coding the Haar Transform 2D Haar Transform Iterating In the Classroom
Examples
Building the Haar Matrix
Examples
Let’s have a look at the Mathematica notebook
HaarTransforms1D.nb
for a bit more on Haar Transforms.
Wednesday, 7 June, 2006 Lecture 4
Discrete Haar Wavelet Transforms
Today’s Schedule Building the Haar Matrix Coding the Haar Transform 2D Haar Transform Iterating In the Classroom
Implementing W
N
Coding the Haar Transform
Implementing W
N

The natural inclination when coding the DHWT is to simply
write a loop and compute the lowpass portion and the
highpass portion in the same loop.

This bogs down in Mathematica and is also difficult to
generalize when we consider longer filters.

If we look at the lowpass portion of the transform, Hv, we
can see a better way to code things.
Wednesday, 7 June, 2006 Lecture 4
Discrete Haar Wavelet Transforms
Today’s Schedule Building the Haar Matrix Coding the Haar Transform 2D Haar Transform Iterating In the Classroom
Implementing W
N
Coding the Haar Transform
Implementing W
N

The natural inclination when coding the DHWT is to simply
write a loop and compute the lowpass portion and the
highpass portion in the same loop.

This bogs down in Mathematica and is also difficult to
generalize when we consider longer filters.

If we look at the lowpass portion of the transform, Hv, we
can see a better way to code things.
Wednesday, 7 June, 2006 Lecture 4
Discrete Haar Wavelet Transforms
Today’s Schedule Building the Haar Matrix Coding the Haar Transform 2D Haar Transform Iterating In the Classroom
Implementing W
N
Coding the Haar Transform
Implementing W
N

The natural inclination when coding the DHWT is to simply
write a loop and compute the lowpass portion and the
highpass portion in the same loop.

This bogs down in Mathematica and is also difficult to
generalize when we consider longer filters.

If we look at the lowpass portion of the transform, Hv, we
can see a better way to code things.
Wednesday, 7 June, 2006 Lecture 4
Discrete Haar Wavelet Transforms
Today’s Schedule Building the Haar Matrix Coding the Haar Transform 2D Haar Transform Iterating In the Classroom
Implementing W
N
Coding the Haar Transform
Implementing W
N

The natural inclination when coding the DHWT is to simply
write a loop and compute the lowpass portion and the
highpass portion in the same loop.

This bogs down in Mathematica and is also difficult to
generalize when we consider longer filters.

If we look at the lowpass portion of the transform, Hv, we
can see a better way to code things.
Wednesday, 7 June, 2006 Lecture 4
Discrete Haar Wavelet Transforms
Today’s Schedule Building the Haar Matrix Coding the Haar Transform 2D Haar Transform Iterating In the Classroom
Implementing W
N
Coding the Haar Transform
Implementing W
N
Consider Hv when v ∈ R
8
. We have
Hv =

2
2

v
1
+ v
2
v
3
+ v
4
v
5
+ v
6
v
7
+ v
8
¸
¸
¸
¸
Wednesday, 7 June, 2006 Lecture 4
Discrete Haar Wavelet Transforms
Today’s Schedule Building the Haar Matrix Coding the Haar Transform 2D Haar Transform Iterating In the Classroom
Implementing W
N
Coding the Haar Transform
Implementing W
N
If we rewrite this, we have
Hv =

2
2

v
1
+ v
2
v
3
+ v
4
v
5
+ v
6
v
7
+ v
8
¸
¸
¸
¸
=

v
1
v
2
v
3
v
4
v
5
v
6
v
7
v
8
¸
¸
¸
¸
·
¸

2
2

2
2
¸
= Vh
Wednesday, 7 June, 2006 Lecture 4
Discrete Haar Wavelet Transforms
Today’s Schedule Building the Haar Matrix Coding the Haar Transform 2D Haar Transform Iterating In the Classroom
Implementing W
N
Coding the Haar Transform
Implementing W
N
In a similar way we see that
Gv = Vg
So all we need to do to compute W
n
v is to create V, multiply it
with h and g, and join to the two blocks together!
Wednesday, 7 June, 2006 Lecture 4
Discrete Haar Wavelet Transforms
Today’s Schedule Building the Haar Matrix Coding the Haar Transform 2D Haar Transform Iterating In the Classroom
Implementing W
N
Coding the Haar Transform
Implementing W
N
Here is some Mathematica code to do it:
DHWT[v_]:=Module[{V,lp,hp,y},
V=Partition[v,2,2];
lp=V.{1,1};
hp=V.{1,-1};
y=Join[lp,hp];
Return[Sqrt[2]
*
y/2];
];
Wednesday, 7 June, 2006 Lecture 4
Discrete Haar Wavelet Transforms
Today’s Schedule Building the Haar Matrix Coding the Haar Transform 2D Haar Transform Iterating In the Classroom
Implementing W
T
N
Coding the Haar Transform
Implementing W
T
N

Writing the code for the inverse transform is a bit trickier.

Now the computation is
W
T
N
v =

H
T

G
T

v

Let’s again look at a vector v ∈ R
8
and consider the
product W
T
8
v:
Wednesday, 7 June, 2006 Lecture 4
Discrete Haar Wavelet Transforms
Today’s Schedule Building the Haar Matrix Coding the Haar Transform 2D Haar Transform Iterating In the Classroom
Implementing W
T
N
Coding the Haar Transform
Implementing W
T
N

Writing the code for the inverse transform is a bit trickier.

Now the computation is
W
T
N
v =

H
T

G
T

v

Let’s again look at a vector v ∈ R
8
and consider the
product W
T
8
v:
Wednesday, 7 June, 2006 Lecture 4
Discrete Haar Wavelet Transforms
Today’s Schedule Building the Haar Matrix Coding the Haar Transform 2D Haar Transform Iterating In the Classroom
Implementing W
T
N
Coding the Haar Transform
Implementing W
T
N

Writing the code for the inverse transform is a bit trickier.

Now the computation is
W
T
N
v =

H
T

G
T

v

Let’s again look at a vector v ∈ R
8
and consider the
product W
T
8
v:
Wednesday, 7 June, 2006 Lecture 4
Discrete Haar Wavelet Transforms
Today’s Schedule Building the Haar Matrix Coding the Haar Transform 2D Haar Transform Iterating In the Classroom
Implementing W
T
N
Coding the Haar Transform
Implementing W
T
N

Writing the code for the inverse transform is a bit trickier.

Now the computation is
W
T
N
v =

H
T

G
T

v

Let’s again look at a vector v ∈ R
8
and consider the
product W
T
8
v:
Wednesday, 7 June, 2006 Lecture 4
Discrete Haar Wavelet Transforms
Today’s Schedule Building the Haar Matrix Coding the Haar Transform 2D Haar Transform Iterating In the Classroom
Implementing W
T
N
Coding the Haar Transform
Implementing W
T
N
W
T
8
v =

2
2

1 0 0 0 −1 0 0 0
1 0 0 0 1 0 0 0
0 1 0 0 0 −1 0 0
0 1 0 0 0 1 0 0
0 0 1 0 0 0 −1 0
0 0 1 0 0 0 1 0
0 0 0 1 0 0 0 −1
0 0 0 1 0 0 0 1
¸
¸
¸
¸
¸
¸
¸
¸
¸
¸
¸
¸
·

v
1
v
2
v
3
v
4
v
5
v
6
v
7
v
8
¸
¸
¸
¸
¸
¸
¸
¸
¸
¸
¸
¸
Wednesday, 7 June, 2006 Lecture 4
Discrete Haar Wavelet Transforms
Today’s Schedule Building the Haar Matrix Coding the Haar Transform 2D Haar Transform Iterating In the Classroom
Implementing W
T
N
Coding the Haar Transform
Implementing W
T
N
or
W
T
8
v =

2
2

v
1
−v
5
v
1
+ v
5
v
2
−v
6
v
2
+ v
6
v
3
−v
7
v
3
+ v
7
v
4
−v
8
v
4
+ v
8
¸
¸
¸
¸
¸
¸
¸
¸
¸
¸
¸
¸
Wednesday, 7 June, 2006 Lecture 4
Discrete Haar Wavelet Transforms
Today’s Schedule Building the Haar Matrix Coding the Haar Transform 2D Haar Transform Iterating In the Classroom
Implementing W
T
N
Coding the Haar Transform
Implementing W
T
N

The matrix V takes a bit different shape this time.

Now V is
V =

v
1
v
5
v
2
v
6
v
3
v
7
v
4
v
8
¸
¸
¸
¸

We need to dot V with both h and g but then intertwine the
results.
Wednesday, 7 June, 2006 Lecture 4
Discrete Haar Wavelet Transforms
Today’s Schedule Building the Haar Matrix Coding the Haar Transform 2D Haar Transform Iterating In the Classroom
Implementing W
T
N
Coding the Haar Transform
Implementing W
T
N

The matrix V takes a bit different shape this time.

Now V is
V =

v
1
v
5
v
2
v
6
v
3
v
7
v
4
v
8
¸
¸
¸
¸

We need to dot V with both h and g but then intertwine the
results.
Wednesday, 7 June, 2006 Lecture 4
Discrete Haar Wavelet Transforms
Today’s Schedule Building the Haar Matrix Coding the Haar Transform 2D Haar Transform Iterating In the Classroom
Implementing W
T
N
Coding the Haar Transform
Implementing W
T
N

The matrix V takes a bit different shape this time.

Now V is
V =

v
1
v
5
v
2
v
6
v
3
v
7
v
4
v
8
¸
¸
¸
¸

We need to dot V with both h and g but then intertwine the
results.
Wednesday, 7 June, 2006 Lecture 4
Discrete Haar Wavelet Transforms
Today’s Schedule Building the Haar Matrix Coding the Haar Transform 2D Haar Transform Iterating In the Classroom
Implementing W
T
N
Coding the Haar Transform
Implementing W
T
N

The matrix V takes a bit different shape this time.

Now V is
V =

v
1
v
5
v
2
v
6
v
3
v
7
v
4
v
8
¸
¸
¸
¸

We need to dot V with both h and g but then intertwine the
results.
Wednesday, 7 June, 2006 Lecture 4
Discrete Haar Wavelet Transforms
Today’s Schedule Building the Haar Matrix Coding the Haar Transform 2D Haar Transform Iterating In the Classroom
Implementing W
T
N
Coding the Haar Transform
Implementing W
T
N
Let’s return to the Mathematica notebook
HaarTransforms1D.nb
to see how to code the inverse.
Wednesday, 7 June, 2006 Lecture 4
Discrete Haar Wavelet Transforms
Today’s Schedule Building the Haar Matrix Coding the Haar Transform 2D Haar Transform Iterating In the Classroom
Building the 2D Transform
2D Haar Transform
Building the 2D Transform

Let’s now assume A is an N ×N image with N even.

How do we transform A?

If we compute W
N
A, we are simply applying the DHWT to
each column of A:
Wednesday, 7 June, 2006 Lecture 4
Discrete Haar Wavelet Transforms
Today’s Schedule Building the Haar Matrix Coding the Haar Transform 2D Haar Transform Iterating In the Classroom
Building the 2D Transform
2D Haar Transform
Building the 2D Transform

Let’s now assume A is an N ×N image with N even.

How do we transform A?

If we compute W
N
A, we are simply applying the DHWT to
each column of A:
Wednesday, 7 June, 2006 Lecture 4
Discrete Haar Wavelet Transforms
Today’s Schedule Building the Haar Matrix Coding the Haar Transform 2D Haar Transform Iterating In the Classroom
Building the 2D Transform
2D Haar Transform
Building the 2D Transform

Let’s now assume A is an N ×N image with N even.

How do we transform A?

If we compute W
N
A, we are simply applying the DHWT to
each column of A:
Wednesday, 7 June, 2006 Lecture 4
Discrete Haar Wavelet Transforms
Today’s Schedule Building the Haar Matrix Coding the Haar Transform 2D Haar Transform Iterating In the Classroom
Building the 2D Transform
2D Haar Transform
Building the 2D Transform

Let’s now assume A is an N ×N image with N even.

How do we transform A?

If we compute W
N
A, we are simply applying the DHWT to
each column of A:
Wednesday, 7 June, 2006 Lecture 4
Discrete Haar Wavelet Transforms
Today’s Schedule Building the Haar Matrix Coding the Haar Transform 2D Haar Transform Iterating In the Classroom
Building the 2D Transform
2D Haar Transform
Building the 2D Transform
A W
N
A
Wednesday, 7 June, 2006 Lecture 4
Discrete Haar Wavelet Transforms
Today’s Schedule Building the Haar Matrix Coding the Haar Transform 2D Haar Transform Iterating In the Classroom
Building the 2D Transform
2D Haar Transform
Building the 2D Transform

We’ve processed the columns of A - what should we do to
process the rows of A as well?

Answer: Compute W
N
AW
T
N
.
Wednesday, 7 June, 2006 Lecture 4
Discrete Haar Wavelet Transforms
Today’s Schedule Building the Haar Matrix Coding the Haar Transform 2D Haar Transform Iterating In the Classroom
Building the 2D Transform
2D Haar Transform
Building the 2D Transform

We’ve processed the columns of A - what should we do to
process the rows of A as well?

Answer: Compute W
N
AW
T
N
.
Wednesday, 7 June, 2006 Lecture 4
Discrete Haar Wavelet Transforms
Today’s Schedule Building the Haar Matrix Coding the Haar Transform 2D Haar Transform Iterating In the Classroom
Building the 2D Transform
2D Haar Transform
Building the 2D Transform

We’ve processed the columns of A - what should we do to
process the rows of A as well?

Answer: Compute W
N
AW
T
N
.
Wednesday, 7 June, 2006 Lecture 4
Discrete Haar Wavelet Transforms
Today’s Schedule Building the Haar Matrix Coding the Haar Transform 2D Haar Transform Iterating In the Classroom
Building the 2D Transform
2D Haar Transform
Building the 2D Transform
A W
N
AW
T
N
Wednesday, 7 June, 2006 Lecture 4
Discrete Haar Wavelet Transforms
Today’s Schedule Building the Haar Matrix Coding the Haar Transform 2D Haar Transform Iterating In the Classroom
Building the 2D Transform
2D Haar Transform
Building the 2D Transform

If we look at W
N
AW
T
N
in block format, we can get a better
idea what’s going on.

W
N
AW
T
N
=
¸
H
G

A
¸
H
G

T
=
¸
HA
GA

H
T
G
T

=
¸
HAH
T
HAG
T
GAH
T
GAG
T

=
¸
B V
H D

Wednesday, 7 June, 2006 Lecture 4
Discrete Haar Wavelet Transforms
Today’s Schedule Building the Haar Matrix Coding the Haar Transform 2D Haar Transform Iterating In the Classroom
Building the 2D Transform
2D Haar Transform
Building the 2D Transform

If we look at W
N
AW
T
N
in block format, we can get a better
idea what’s going on.

W
N
AW
T
N
=
¸
H
G

A
¸
H
G

T
=
¸
HA
GA

H
T
G
T

=
¸
HAH
T
HAG
T
GAH
T
GAG
T

=
¸
B V
H D

Wednesday, 7 June, 2006 Lecture 4
Discrete Haar Wavelet Transforms
Today’s Schedule Building the Haar Matrix Coding the Haar Transform 2D Haar Transform Iterating In the Classroom
Building the 2D Transform
2D Haar Transform
Building the 2D Transform

If we look at W
N
AW
T
N
in block format, we can get a better
idea what’s going on.

W
N
AW
T
N
=
¸
H
G

A
¸
H
G

T
=
¸
HA
GA

H
T
G
T

=
¸
HAH
T
HAG
T
GAH
T
GAG
T

=
¸
B V
H D

Wednesday, 7 June, 2006 Lecture 4
Discrete Haar Wavelet Transforms
Today’s Schedule Building the Haar Matrix Coding the Haar Transform 2D Haar Transform Iterating In the Classroom
Building the 2D Transform
2D Haar Transform
Building the 2D Transform

HAH
T
averages along the columns of A and then along the
rows of HA. This will produce an approximation (or blur) B
of A.

HAG
T
averages along the columns of A and then
differences along the rows of HA. This will produce vertical
differences V between B and A.
Wednesday, 7 June, 2006 Lecture 4
Discrete Haar Wavelet Transforms
Today’s Schedule Building the Haar Matrix Coding the Haar Transform 2D Haar Transform Iterating In the Classroom
Building the 2D Transform
2D Haar Transform
Building the 2D Transform

HAH
T
averages along the columns of A and then along the
rows of HA. This will produce an approximation (or blur) B
of A.

HAG
T
averages along the columns of A and then
differences along the rows of HA. This will produce vertical
differences V between B and A.
Wednesday, 7 June, 2006 Lecture 4
Discrete Haar Wavelet Transforms
Today’s Schedule Building the Haar Matrix Coding the Haar Transform 2D Haar Transform Iterating In the Classroom
Building the 2D Transform
2D Haar Transform
Building the 2D Transform

HAH
T
averages along the columns of A and then along the
rows of HA. This will produce an approximation (or blur) B
of A.

HAG
T
averages along the columns of A and then
differences along the rows of HA. This will produce vertical
differences V between B and A.
Wednesday, 7 June, 2006 Lecture 4
Discrete Haar Wavelet Transforms
Today’s Schedule Building the Haar Matrix Coding the Haar Transform 2D Haar Transform Iterating In the Classroom
Building the 2D Transform
2D Haar Transform
Building the 2D Transform

GAH
T
differences along the columns of A and then
averages along the rows of GA. This will produce
horizontal differences H between B and A.

GAG
T
differences along the columns of A and then
differences along the rows of GA. This will produce
diagonal differences V between B and A.
Wednesday, 7 June, 2006 Lecture 4
Discrete Haar Wavelet Transforms
Today’s Schedule Building the Haar Matrix Coding the Haar Transform 2D Haar Transform Iterating In the Classroom
Building the 2D Transform
2D Haar Transform
Building the 2D Transform

GAH
T
differences along the columns of A and then
averages along the rows of GA. This will produce
horizontal differences H between B and A.

GAG
T
differences along the columns of A and then
differences along the rows of GA. This will produce
diagonal differences V between B and A.
Wednesday, 7 June, 2006 Lecture 4
Discrete Haar Wavelet Transforms
Today’s Schedule Building the Haar Matrix Coding the Haar Transform 2D Haar Transform Iterating In the Classroom
Building the 2D Transform
2D Haar Transform
Building the 2D Transform

GAH
T
differences along the columns of A and then
averages along the rows of GA. This will produce
horizontal differences H between B and A.

GAG
T
differences along the columns of A and then
differences along the rows of GA. This will produce
diagonal differences V between B and A.
Wednesday, 7 June, 2006 Lecture 4
Discrete Haar Wavelet Transforms
Today’s Schedule Building the Haar Matrix Coding the Haar Transform 2D Haar Transform Iterating In the Classroom
Building the 2D Transform
2D Haar Transform
Building the 2D Transform
To better understand these block forms, let’s look at the
Mathematica notebook
HaarTransforms2D.nb
Wednesday, 7 June, 2006 Lecture 4
Discrete Haar Wavelet Transforms
Today’s Schedule Building the Haar Matrix Coding the Haar Transform 2D Haar Transform Iterating In the Classroom
Coding the 2D Transform
2D Haar Transform
Coding the 2D Transform

Coding the 2D Haar transform is easy - we already have a
routine that will apply the DHWT to each column of A,

so we can easily write a routine to compute C = W
N
A.
Let’s call this routine W.

Our goal is to compute B = W
N
AW
T
N
= CW
T
N
.

It turns out that writing code for CW
T
N
is a bit tedious, but if
we use some linear algebra . . .
Wednesday, 7 June, 2006 Lecture 4
Discrete Haar Wavelet Transforms
Today’s Schedule Building the Haar Matrix Coding the Haar Transform 2D Haar Transform Iterating In the Classroom
Coding the 2D Transform
2D Haar Transform
Coding the 2D Transform

Coding the 2D Haar transform is easy - we already have a
routine that will apply the DHWT to each column of A,

so we can easily write a routine to compute C = W
N
A.
Let’s call this routine W.

Our goal is to compute B = W
N
AW
T
N
= CW
T
N
.

It turns out that writing code for CW
T
N
is a bit tedious, but if
we use some linear algebra . . .
Wednesday, 7 June, 2006 Lecture 4
Discrete Haar Wavelet Transforms
Today’s Schedule Building the Haar Matrix Coding the Haar Transform 2D Haar Transform Iterating In the Classroom
Coding the 2D Transform
2D Haar Transform
Coding the 2D Transform

Coding the 2D Haar transform is easy - we already have a
routine that will apply the DHWT to each column of A,

so we can easily write a routine to compute C = W
N
A.
Let’s call this routine W.

Our goal is to compute B = W
N
AW
T
N
= CW
T
N
.

It turns out that writing code for CW
T
N
is a bit tedious, but if
we use some linear algebra . . .
Wednesday, 7 June, 2006 Lecture 4
Discrete Haar Wavelet Transforms
Today’s Schedule Building the Haar Matrix Coding the Haar Transform 2D Haar Transform Iterating In the Classroom
Coding the 2D Transform
2D Haar Transform
Coding the 2D Transform

Coding the 2D Haar transform is easy - we already have a
routine that will apply the DHWT to each column of A,

so we can easily write a routine to compute C = W
N
A.
Let’s call this routine W.

Our goal is to compute B = W
N
AW
T
N
= CW
T
N
.

It turns out that writing code for CW
T
N
is a bit tedious, but if
we use some linear algebra . . .
Wednesday, 7 June, 2006 Lecture 4
Discrete Haar Wavelet Transforms
Today’s Schedule Building the Haar Matrix Coding the Haar Transform 2D Haar Transform Iterating In the Classroom
Coding the 2D Transform
2D Haar Transform
Coding the 2D Transform

Coding the 2D Haar transform is easy - we already have a
routine that will apply the DHWT to each column of A,

so we can easily write a routine to compute C = W
N
A.
Let’s call this routine W.

Our goal is to compute B = W
N
AW
T
N
= CW
T
N
.

It turns out that writing code for CW
T
N
is a bit tedious, but if
we use some linear algebra . . .
Wednesday, 7 June, 2006 Lecture 4
Discrete Haar Wavelet Transforms
Today’s Schedule Building the Haar Matrix Coding the Haar Transform 2D Haar Transform Iterating In the Classroom
Coding the 2D Transform
2D Haar Transform
Coding the 2D Transform

If we transpose both sides of B = CW
T
N
, we have
B
T
= W
N
C
T

So we can simply apply W to C
T
and transpose the result.

One student wasn’t so sure about this . . .

Let’s return to HaarTransforms2D.nb to write some
code for the 2D Haar Wavelet Transform.
Wednesday, 7 June, 2006 Lecture 4
Discrete Haar Wavelet Transforms
Today’s Schedule Building the Haar Matrix Coding the Haar Transform 2D Haar Transform Iterating In the Classroom
Coding the 2D Transform
2D Haar Transform
Coding the 2D Transform

If we transpose both sides of B = CW
T
N
, we have
B
T
= W
N
C
T

So we can simply apply W to C
T
and transpose the result.

One student wasn’t so sure about this . . .

Let’s return to HaarTransforms2D.nb to write some
code for the 2D Haar Wavelet Transform.
Wednesday, 7 June, 2006 Lecture 4
Discrete Haar Wavelet Transforms
Today’s Schedule Building the Haar Matrix Coding the Haar Transform 2D Haar Transform Iterating In the Classroom
Coding the 2D Transform
2D Haar Transform
Coding the 2D Transform

If we transpose both sides of B = CW
T
N
, we have
B
T
= W
N
C
T

So we can simply apply W to C
T
and transpose the result.

One student wasn’t so sure about this . . .

Let’s return to HaarTransforms2D.nb to write some
code for the 2D Haar Wavelet Transform.
Wednesday, 7 June, 2006 Lecture 4
Discrete Haar Wavelet Transforms
Today’s Schedule Building the Haar Matrix Coding the Haar Transform 2D Haar Transform Iterating In the Classroom
Coding the 2D Transform
2D Haar Transform
Coding the 2D Transform

If we transpose both sides of B = CW
T
N
, we have
B
T
= W
N
C
T

So we can simply apply W to C
T
and transpose the result.

One student wasn’t so sure about this . . .

Let’s return to HaarTransforms2D.nb to write some
code for the 2D Haar Wavelet Transform.
Wednesday, 7 June, 2006 Lecture 4
Discrete Haar Wavelet Transforms
Today’s Schedule Building the Haar Matrix Coding the Haar Transform 2D Haar Transform Iterating In the Classroom
Coding the 2D Transform
2D Haar Transform
Coding the 2D Transform

If we transpose both sides of B = CW
T
N
, we have
B
T
= W
N
C
T

So we can simply apply W to C
T
and transpose the result.

One student wasn’t so sure about this . . .

Let’s return to HaarTransforms2D.nb to write some
code for the 2D Haar Wavelet Transform.
Wednesday, 7 June, 2006 Lecture 4
Discrete Haar Wavelet Transforms
Today’s Schedule Building the Haar Matrix Coding the Haar Transform 2D Haar Transform Iterating In the Classroom
2D Haar Transform
Iterating

It’s time to explain the NumIterations directive you have
seen in the Mathematica notebooks.

We can motivate the idea by looking at the cumulative
energy of an image A and its wavelet transform.
Wednesday, 7 June, 2006 Lecture 4
Discrete Haar Wavelet Transforms
Today’s Schedule Building the Haar Matrix Coding the Haar Transform 2D Haar Transform Iterating In the Classroom
2D Haar Transform
Iterating

It’s time to explain the NumIterations directive you have
seen in the Mathematica notebooks.

We can motivate the idea by looking at the cumulative
energy of an image A and its wavelet transform.
Wednesday, 7 June, 2006 Lecture 4
Discrete Haar Wavelet Transforms
Today’s Schedule Building the Haar Matrix Coding the Haar Transform 2D Haar Transform Iterating In the Classroom
2D Haar Transform
Iterating

It’s time to explain the NumIterations directive you have
seen in the Mathematica notebooks.

We can motivate the idea by looking at the cumulative
energy of an image A and its wavelet transform.
Wednesday, 7 June, 2006 Lecture 4
Discrete Haar Wavelet Transforms
Today’s Schedule Building the Haar Matrix Coding the Haar Transform 2D Haar Transform Iterating In the Classroom
2D Haar Transform
Iterating
Here is a 200 ×200 image and it’s transform:
A W
N
AW
T
N
Wednesday, 7 June, 2006 Lecture 4
Discrete Haar Wavelet Transforms
Today’s Schedule Building the Haar Matrix Coding the Haar Transform 2D Haar Transform Iterating In the Classroom
2D Haar Transform
Iterating
Here are the cumulative energies for both A (red) and its
transform (brown):
Wednesday, 7 June, 2006 Lecture 4
Discrete Haar Wavelet Transforms
Today’s Schedule Building the Haar Matrix Coding the Haar Transform 2D Haar Transform Iterating In the Classroom
2D Haar Transform
Iterating

To give you an idea, the largest 10000 elements in A make
up about 36.5% of the energy in A while the first 10000
elements in the transform comprise about 99.5% of the
energy in the transform.

The wavelet transform is totally invertible, so if we were to
Huffman encode the transform, the bit stream should be
markedly smaller.
Wednesday, 7 June, 2006 Lecture 4
Discrete Haar Wavelet Transforms
Today’s Schedule Building the Haar Matrix Coding the Haar Transform 2D Haar Transform Iterating In the Classroom
2D Haar Transform
Iterating

To give you an idea, the largest 10000 elements in A make
up about 36.5% of the energy in A while the first 10000
elements in the transform comprise about 99.5% of the
energy in the transform.

The wavelet transform is totally invertible, so if we were to
Huffman encode the transform, the bit stream should be
markedly smaller.
Wednesday, 7 June, 2006 Lecture 4
Discrete Haar Wavelet Transforms
Today’s Schedule Building the Haar Matrix Coding the Haar Transform 2D Haar Transform Iterating In the Classroom
2D Haar Transform
Iterating

To give you an idea, the largest 10000 elements in A make
up about 36.5% of the energy in A while the first 10000
elements in the transform comprise about 99.5% of the
energy in the transform.

The wavelet transform is totally invertible, so if we were to
Huffman encode the transform, the bit stream should be
markedly smaller.
Wednesday, 7 June, 2006 Lecture 4
Discrete Haar Wavelet Transforms
Today’s Schedule Building the Haar Matrix Coding the Haar Transform 2D Haar Transform Iterating In the Classroom
2D Haar Transform
Iterating

We can get even more concentration of the energy if we
iterate the wavelet transform. That is, after computing the
wavelet transform of A, we extract the blur and compute a
wavelet transform of it.

We could repeat this process p times if the dimensions of
A are divisible by 2
p
.
Wednesday, 7 June, 2006 Lecture 4
Discrete Haar Wavelet Transforms
Today’s Schedule Building the Haar Matrix Coding the Haar Transform 2D Haar Transform Iterating In the Classroom
2D Haar Transform
Iterating

We can get even more concentration of the energy if we
iterate the wavelet transform. That is, after computing the
wavelet transform of A, we extract the blur and compute a
wavelet transform of it.

We could repeat this process p times if the dimensions of
A are divisible by 2
p
.
Wednesday, 7 June, 2006 Lecture 4
Discrete Haar Wavelet Transforms
Today’s Schedule Building the Haar Matrix Coding the Haar Transform 2D Haar Transform Iterating In the Classroom
2D Haar Transform
Iterating

We can get even more concentration of the energy if we
iterate the wavelet transform. That is, after computing the
wavelet transform of A, we extract the blur and compute a
wavelet transform of it.

We could repeat this process p times if the dimensions of
A are divisible by 2
p
.
Wednesday, 7 June, 2006 Lecture 4
Discrete Haar Wavelet Transforms
Today’s Schedule Building the Haar Matrix Coding the Haar Transform 2D Haar Transform Iterating In the Classroom
2D Haar Transform
Iterating
Now suppose we iterate 2 times:
Wednesday, 7 June, 2006 Lecture 4
Discrete Haar Wavelet Transforms
Today’s Schedule Building the Haar Matrix Coding the Haar Transform 2D Haar Transform Iterating In the Classroom
2D Haar Transform
Iterating
or 3 times:
Wednesday, 7 June, 2006 Lecture 4
Discrete Haar Wavelet Transforms
Today’s Schedule Building the Haar Matrix Coding the Haar Transform 2D Haar Transform Iterating In the Classroom
2D Haar Transform
Iterating
Here are the cumulative energy vectors for 1 iteration (brown),
2 iterations (blue), and 3 iterations (gray):
Wednesday, 7 June, 2006 Lecture 4
Discrete Haar Wavelet Transforms
Today’s Schedule Building the Haar Matrix Coding the Haar Transform 2D Haar Transform Iterating In the Classroom
Teaching Ideas
In the Classroom
Teaching Ideas

The students really enjoy the material in this chapter. It is
quite straightforward and ties together everything new
we’ve done to date.

I have them look at the entropy of particular vectors when
processed by the Haar transform. This gives them some
idea of the potential for wavelet-based compression.
Wednesday, 7 June, 2006 Lecture 4
Discrete Haar Wavelet Transforms
Today’s Schedule Building the Haar Matrix Coding the Haar Transform 2D Haar Transform Iterating In the Classroom
Teaching Ideas
In the Classroom
Teaching Ideas

The students really enjoy the material in this chapter. It is
quite straightforward and ties together everything new
we’ve done to date.

I have them look at the entropy of particular vectors when
processed by the Haar transform. This gives them some
idea of the potential for wavelet-based compression.
Wednesday, 7 June, 2006 Lecture 4
Discrete Haar Wavelet Transforms
Today’s Schedule Building the Haar Matrix Coding the Haar Transform 2D Haar Transform Iterating In the Classroom
Teaching Ideas
In the Classroom
Teaching Ideas

The students really enjoy the material in this chapter. It is
quite straightforward and ties together everything new
we’ve done to date.

I have them look at the entropy of particular vectors when
processed by the Haar transform. This gives them some
idea of the potential for wavelet-based compression.
Wednesday, 7 June, 2006 Lecture 4
Discrete Haar Wavelet Transforms
Today’s Schedule Building the Haar Matrix Coding the Haar Transform 2D Haar Transform Iterating In the Classroom
Computer Usage
In the Classroom
Computer Usage

As you might imagine, we do lots of coding in this chapter.

I let the students work in pairs and they write code for the
Haar transform and its inverse (1D and 2D) as well as
iterated versions.

They can get pretty frustrated with Mathematica at this
point - it is good to show them some simple debugging
techniques.
Wednesday, 7 June, 2006 Lecture 4
Discrete Haar Wavelet Transforms
Today’s Schedule Building the Haar Matrix Coding the Haar Transform 2D Haar Transform Iterating In the Classroom
Computer Usage
In the Classroom
Computer Usage

As you might imagine, we do lots of coding in this chapter.

I let the students work in pairs and they write code for the
Haar transform and its inverse (1D and 2D) as well as
iterated versions.

They can get pretty frustrated with Mathematica at this
point - it is good to show them some simple debugging
techniques.
Wednesday, 7 June, 2006 Lecture 4
Discrete Haar Wavelet Transforms
Today’s Schedule Building the Haar Matrix Coding the Haar Transform 2D Haar Transform Iterating In the Classroom
Computer Usage
In the Classroom
Computer Usage

As you might imagine, we do lots of coding in this chapter.

I let the students work in pairs and they write code for the
Haar transform and its inverse (1D and 2D) as well as
iterated versions.

They can get pretty frustrated with Mathematica at this
point - it is good to show them some simple debugging
techniques.
Wednesday, 7 June, 2006 Lecture 4
Discrete Haar Wavelet Transforms
Today’s Schedule Building the Haar Matrix Coding the Haar Transform 2D Haar Transform Iterating In the Classroom
Computer Usage
In the Classroom
Computer Usage

As you might imagine, we do lots of coding in this chapter.

I let the students work in pairs and they write code for the
Haar transform and its inverse (1D and 2D) as well as
iterated versions.

They can get pretty frustrated with Mathematica at this
point - it is good to show them some simple debugging
techniques.
Wednesday, 7 June, 2006 Lecture 4
Discrete Haar Wavelet Transforms
Today’s Schedule Building the Haar Matrix Coding the Haar Transform 2D Haar Transform Iterating In the Classroom
Computer Usage
In the Classroom
Computer Usage

I let them use their own images/audio files (sometimes
dangerous).

To test their iterated 1D inverse, they must download an
audio clip from my website that has been transformed p
times, guess at p, and then apply their inverse to guess the
movie clip.
Wednesday, 7 June, 2006 Lecture 4
Discrete Haar Wavelet Transforms
Today’s Schedule Building the Haar Matrix Coding the Haar Transform 2D Haar Transform Iterating In the Classroom
Computer Usage
In the Classroom
Computer Usage

I let them use their own images/audio files (sometimes
dangerous).

To test their iterated 1D inverse, they must download an
audio clip from my website that has been transformed p
times, guess at p, and then apply their inverse to guess the
movie clip.
Wednesday, 7 June, 2006 Lecture 4
Discrete Haar Wavelet Transforms
Today’s Schedule Building the Haar Matrix Coding the Haar Transform 2D Haar Transform Iterating In the Classroom
Computer Usage
In the Classroom
Computer Usage

I let them use their own images/audio files (sometimes
dangerous).

To test their iterated 1D inverse, they must download an
audio clip from my website that has been transformed p
times, guess at p, and then apply their inverse to guess the
movie clip.
Wednesday, 7 June, 2006 Lecture 4
Discrete Haar Wavelet Transforms
Today’s Schedule Building the Haar Matrix Coding the Haar Transform 2D Haar Transform Iterating In the Classroom
Today’s Schedule
9:00-10:15 Lecture One: Why Wavelets?
10:15-10:30 Coffee Break (OSS 235)
10:30-11:45 Lecture Two: Digital Images, Measures, and
Huffman Codes
12:00-1:00 Lunch (Cafeteria)
1:30-2:45 Lecture Three: Fourier Series, Convolution and
Filters
2:45-3:00 Coffee Break (OSS 235)
3:00-4:15 Lecture Four: 1D and 2D Haar Transforms
5:30-6:30 ⇒Dinner (Cafeteria)
Wednesday, 7 June, 2006 Lecture 4
Discrete Haar Wavelet Transforms

Today’s Schedule

Building the Haar Matrix

Coding the Haar Transform

2D Haar Transform

Iterating

In the Classroom

Today’s Schedule Building the Haar Matrix Putting Two Filters Together Why the Word Wavelet? Examples Coding the Haar Transform Implementing WN T Implementing WN 2D Haar Transform Building the 2D Transform Coding the 2D Transform Iterating In the Classroom Teaching Ideas Wednesday, 7Computer Usage June, 2006
Discrete Haar Wavelet Transforms

Outline

Lecture 4

Today’s Schedule

Building the Haar Matrix

Coding the Haar Transform

2D Haar Transform

Iterating

In the Classroom

Today’s Schedule
9:00-10:15 Lecture One: Why Wavelets? 10:15-10:30 Coffee Break (OSS 235) 10:30-11:45 Lecture Two: Digital Images, Measures, and Huffman Codes 12:00-1:00 Lunch (Cafeteria) 1:30-2:45 Lecture Three: Fourier Series, Convolution and Filters 2:45-3:00 Coffee Break (OSS 235) 3:00-4:15 ⇒Lecture Four: 1D and 2D Haar Transforms 5:30-6:30 Dinner (Cafeteria)
Wednesday, 7 June, 2006 Discrete Haar Wavelet Transforms Lecture 4

2 If we compute y = h ∗ x. 2006 Discrete Haar Wavelet Transforms Lecture 4 . 7 June. we obtain the components yn = 1 1 xn + xn−1 2 2 We could write down the convolution matrix Wednesday. h1 ) = ( 2 . 1 ).Today’s Schedule Building the Haar Matrix Coding the Haar Transform 2D Haar Transform Iterating In the Classroom Putting Two Filters Together Building the Haar Matrix Putting Two Filters Together 1 Consider again the filter h = (h0 .

2006 Discrete Haar Wavelet Transforms Lecture 4 . 1 ). we obtain the components yn = 1 1 xn + xn−1 2 2 We could write down the convolution matrix Wednesday. 2 If we compute y = h ∗ x.Today’s Schedule Building the Haar Matrix Coding the Haar Transform 2D Haar Transform Iterating In the Classroom Putting Two Filters Together Building the Haar Matrix Putting Two Filters Together 1 Consider again the filter h = (h0 . h1 ) = ( 2 . 7 June.

2 If we compute y = h ∗ x. h1 ) = ( 2 . we obtain the components yn = 1 1 xn + xn−1 2 2 We could write down the convolution matrix Wednesday. 1 ). 2006 Discrete Haar Wavelet Transforms Lecture 4 .Today’s Schedule Building the Haar Matrix Coding the Haar Transform 2D Haar Transform Iterating In the Classroom Putting Two Filters Together Building the Haar Matrix Putting Two Filters Together 1 Consider again the filter h = (h0 . 7 June.

7 June. we obtain the components yn = 1 1 xn + xn−1 2 2 We could write down the convolution matrix Wednesday. 2006 Discrete Haar Wavelet Transforms Lecture 4 . 1 ).Today’s Schedule Building the Haar Matrix Coding the Haar Transform 2D Haar Transform Iterating In the Classroom Putting Two Filters Together Building the Haar Matrix Putting Two Filters Together 1 Consider again the filter h = (h0 . h1 ) = ( 2 . 2 If we compute y = h ∗ x.

.Today’s Schedule Building the Haar Matrix Coding the Haar Transform 2D Haar Transform Iterating In the Classroom Putting Two Filters Together Building the Haar Matrix Putting Two Filters Together  .... 0 0 . 0 0 0 0 0 . 0 0 0 0 0 . 7 June.           Wednesday. ...     . . . 0 0 0 0 0 .      H =  .. 0 0 0 0 0 .. 1 2 0 . 0 0 0 0 0 0 0 0 0 0 0 0 0 . 1 2 . . 1 2 1 2  0 1 2 1 2 0 0 0 0 0 0 1 2 1 2 0 0 0 0 0 0 1 2 1 2 0 0 0 0 0 0 .. 2006 Discrete Haar Wavelet Transforms Lecture 4 ...

2006 Discrete Haar Wavelet Transforms Lecture 4 . The directed distance is exactly the sequence x convolved 1 1 with the filter g = ( 2 . − 2 ). Wednesday.if we had the directed distance between these averages and the consecutive numbers.Today’s Schedule Building the Haar Matrix Coding the Haar Transform 2D Haar Transform Iterating In the Classroom Putting Two Filters Together Building the Haar Matrix Putting Two Filters Together . 7 June. but we can’t invert the process. . . then we could invert. What would we need to be able to invert the process? We have averages of consecutive numbers .

− 2 ). What would we need to be able to invert the process? We have averages of consecutive numbers . but we can’t invert the process.Today’s Schedule Building the Haar Matrix Coding the Haar Transform 2D Haar Transform Iterating In the Classroom Putting Two Filters Together Building the Haar Matrix Putting Two Filters Together . The directed distance is exactly the sequence x convolved 1 1 with the filter g = ( 2 . then we could invert. 2006 Discrete Haar Wavelet Transforms Lecture 4 . .if we had the directed distance between these averages and the consecutive numbers. 7 June. Wednesday. .

− 2 ). . 7 June. 2006 Discrete Haar Wavelet Transforms Lecture 4 . Wednesday. What would we need to be able to invert the process? We have averages of consecutive numbers . then we could invert.if we had the directed distance between these averages and the consecutive numbers. The directed distance is exactly the sequence x convolved 1 1 with the filter g = ( 2 .Today’s Schedule Building the Haar Matrix Coding the Haar Transform 2D Haar Transform Iterating In the Classroom Putting Two Filters Together Building the Haar Matrix Putting Two Filters Together . . but we can’t invert the process.

− 2 ). What would we need to be able to invert the process? We have averages of consecutive numbers . but we can’t invert the process. . .Today’s Schedule Building the Haar Matrix Coding the Haar Transform 2D Haar Transform Iterating In the Classroom Putting Two Filters Together Building the Haar Matrix Putting Two Filters Together . 7 June. Wednesday. The directed distance is exactly the sequence x convolved 1 1 with the filter g = ( 2 . 2006 Discrete Haar Wavelet Transforms Lecture 4 . then we could invert.if we had the directed distance between these averages and the consecutive numbers.

if we had the directed distance between these averages and the consecutive numbers. but we can’t invert the process. . The directed distance is exactly the sequence x convolved 1 1 with the filter g = ( 2 . 7 June. . 2006 Discrete Haar Wavelet Transforms Lecture 4 . Wednesday.Today’s Schedule Building the Haar Matrix Coding the Haar Transform 2D Haar Transform Iterating In the Classroom Putting Two Filters Together Building the Haar Matrix Putting Two Filters Together . What would we need to be able to invert the process? We have averages of consecutive numbers . − 2 ). then we could invert.

Today’s Schedule Building the Haar Matrix Coding the Haar Transform 2D Haar Transform Iterating In the Classroom Putting Two Filters Together Building the Haar Matrix Putting Two Filters Together Indeed if yn = then xn = yn + zn and xn−1 = yn − zn 1 1 xn + xn−1 2 2 and zn = 1 1 xn − xn−1 2 2 Wednesday. 2006 Discrete Haar Wavelet Transforms Lecture 4 . 7 June.

7 June. 2006 Discrete Haar Wavelet Transforms Lecture 4 .Today’s Schedule Building the Haar Matrix Coding the Haar Transform 2D Haar Transform Iterating In the Classroom Putting Two Filters Together Building the Haar Matrix Putting Two Filters Together Perhaps we could invert the process if we used both filters. We know that G is Wednesday.

0 0 0 0 0 .. 0 0 0 0 0 ....     .. 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 . .. Wednesday. 0 0 0 0 0 . .      G =  . .. . −1 2 0 0 0 0 . 0 0 0 0 0 . 1 2 −1 2 0 1 2 −1 2 0 0 1 2 1 −2 0 0 0 0 0 0 1 2 1 −2 0 0 0 0 0 0 ... 7 June. . 2006 Discrete Haar Wavelet Transforms Lecture 4 . 1 2 0 ...Today’s Schedule Building the Haar Matrix Coding the Haar Transform 2D Haar Transform Iterating In the Classroom Putting Two Filters Together Building the Haar Matrix Putting Two Filters Together  .

2006 Discrete Haar Wavelet Transforms Lecture 4 . 7 June.Today’s Schedule Building the Haar Matrix Coding the Haar Transform 2D Haar Transform Iterating In the Classroom Putting Two Filters Together Building the Haar Matrix Putting Two Filters Together So that   G H   y z   ·x= Wednesday.

2006 Discrete Haar Wavelet Transforms Lecture 4 . we can write down: Wednesday.Today’s Schedule Building the Haar Matrix Coding the Haar Transform 2D Haar Transform Iterating In the Classroom Putting Two Filters Together Building the Haar Matrix Putting Two Filters Together If we think about inverting. 7 June.

. .Today’s Schedule Building the Haar Matrix Coding the Haar Transform 2D Haar Transform Iterating In the Classroom Putting Two Filters Together Building the Haar Matrix Putting Two Filters Together . . . . − + − + − + x1 − x0 2 x1 − x0 2 x2 − x1 2 x2 − x1 2 x3 − x2 2 x3 − x2 2 = x0 = x1 = x1 = x2 = x2 = x3 Lecture 4 . x1 + x0 2 x1 + x0 2 x2 + x1 2 x2 + x1 2 x3 + x2 2 x3 + x2 2 . 7 June. . 2006 Discrete Haar Wavelet Transforms = = = = = = . y1 − z1 y1 + z1 y2 − z2 y2 + z2 y3 − z3 y3 + z3 . . Wednesday. .

zn to recover xn : Wednesday. 2006 Discrete Haar Wavelet Transforms Lecture 4 .we do not need all the values of yn .Today’s Schedule Building the Haar Matrix Coding the Haar Transform 2D Haar Transform Iterating In the Classroom Putting Two Filters Together Building the Haar Matrix Putting Two Filters Together But there is some redundancy here . 7 June.

2006 Discrete Haar Wavelet Transforms = = = = = = . . . . 7 June. . .Today’s Schedule Building the Haar Matrix Coding the Haar Transform 2D Haar Transform Iterating In the Classroom Putting Two Filters Together Building the Haar Matrix Putting Two Filters Together . . x1 + x0 2 x1 + x0 2 x2 + x1 2 x2 + x1 2 x3 + x2 2 x3 + x2 2 . . y1 − z1 y1 + z1 y2 − z2 y2 + z2 y3 − z3 y3 + z3 . . Wednesday. − + − + − + x1 − x0 2 x1 − x0 2 x2 − x1 2 x2 − x1 2 x3 − x2 2 x3 − x2 2 = x0 = x1 = x1 = x2 = x2 = x3 Lecture 4 .

We are also now in a position to truncate our matrix.Today’s Schedule Building the Haar Matrix Coding the Haar Transform 2D Haar Transform Iterating In the Classroom Putting Two Filters Together Building the Haar Matrix Putting Two Filters Together So we can omit every other row in H. then it is natural to truncate the matrix and write: Wednesday. G and still produce enough to be able to recover x This is called downsampling. . if x = (x0 . Indeed. . 2006 Discrete Haar Wavelet Transforms Lecture 4 . xN ). 7 June. . .

G and still produce enough to be able to recover x This is called downsampling. . We are also now in a position to truncate our matrix.Today’s Schedule Building the Haar Matrix Coding the Haar Transform 2D Haar Transform Iterating In the Classroom Putting Two Filters Together Building the Haar Matrix Putting Two Filters Together So we can omit every other row in H. . 2006 Discrete Haar Wavelet Transforms Lecture 4 . then it is natural to truncate the matrix and write: Wednesday. . . if x = (x0 . 7 June. xN ). Indeed.

2006 Discrete Haar Wavelet Transforms Lecture 4 .Today’s Schedule Building the Haar Matrix Coding the Haar Transform 2D Haar Transform Iterating In the Classroom Putting Two Filters Together Building the Haar Matrix Putting Two Filters Together So we can omit every other row in H. if x = (x0 . then it is natural to truncate the matrix and write: Wednesday. . . xN ). . 7 June. G and still produce enough to be able to recover x This is called downsampling. . Indeed. We are also now in a position to truncate our matrix.

. . Indeed. xN ). 7 June. . .Today’s Schedule Building the Haar Matrix Coding the Haar Transform 2D Haar Transform Iterating In the Classroom Putting Two Filters Together Building the Haar Matrix Putting Two Filters Together So we can omit every other row in H. then it is natural to truncate the matrix and write: Wednesday. if x = (x0 . We are also now in a position to truncate our matrix. 2006 Discrete Haar Wavelet Transforms Lecture 4 . G and still produce enough to be able to recover x This is called downsampling.

. .. 0 .  ...  .Today’s Schedule Building the Haar Matrix Coding the Haar Transform 2D Haar Transform Iterating In the Classroom Putting Two Filters Together Building the Haar Matrix Putting Two Filters Together  1 2 1 2 0 0 1 2 1 2  0   .  .  . 0 0 −1 2 1 2 0 0 0 0 0 0 . 0 0 0 1 2 0 0 0 0 .  . .  1  1 2 2     0 0   0 0   . 0 0 ... . 0 0 0 .... 1 0 −2  0 0 0 0   .   0   ˜ WN =   1  −2   0  . 0 . 1 2 Wednesday.  . 2006 Discrete Haar Wavelet Transforms Lecture 4 .  .. 7 June.

Today’s Schedule Building the Haar Matrix Coding the Haar Transform 2D Haar Transform Iterating In the Classroom Putting Two Filters Together Building the Haar Matrix Putting Two Filters Together This matrix is easy to invert if we remember the formulas: xn = yn + zn We have: and xn−1 = yn − zn Wednesday. 7 June. 2006 Discrete Haar Wavelet Transforms Lecture 4 .

. . . 0 0 1 1 0 0 0 0 .. . 0 0 1 1 −1 0 0 1 0 0 0 −1 0 0 1 0 . .. . . 0 0 0 0 0 0 0 0 −1 0 0 1                Wednesday. 7 June.Today’s Schedule Building the Haar Matrix Coding the Haar Transform 2D Haar Transform Iterating In the Classroom Putting Two Filters Together Building the Haar Matrix Putting Two Filters Together  ˜ −1 WN        =   0 0   0 0   0 0 0 0 1 1 0 0 . . . 2006 Discrete Haar Wavelet Transforms Lecture 4 . . . . .

we will obtain an orthogonal matrix. We have: Wednesday. ˜ ˜ We have WN 2 N √ ˜ If we multiply WN by 2. 7 June. T = 1 W −1 . 2006 Discrete Haar Wavelet Transforms Lecture 4 .Today’s Schedule Building the Haar Matrix Coding the Haar Transform 2D Haar Transform Iterating In the Classroom Putting Two Filters Together Building the Haar Matrix Putting Two Filters Together ˜ Note we are very close to having WN an orthogonal matrix.

7 June. ˜ ˜ We have WN 2 N √ ˜ If we multiply WN by 2. T = 1 W −1 . 2006 Discrete Haar Wavelet Transforms Lecture 4 .Today’s Schedule Building the Haar Matrix Coding the Haar Transform 2D Haar Transform Iterating In the Classroom Putting Two Filters Together Building the Haar Matrix Putting Two Filters Together ˜ Note we are very close to having WN an orthogonal matrix. we will obtain an orthogonal matrix. We have: Wednesday.

Today’s Schedule Building the Haar Matrix Coding the Haar Transform 2D Haar Transform Iterating In the Classroom Putting Two Filters Together Building the Haar Matrix Putting Two Filters Together ˜ Note we are very close to having WN an orthogonal matrix. T = 1 W −1 . We have: Wednesday. we will obtain an orthogonal matrix. 7 June. ˜ ˜ We have WN 2 N √ ˜ If we multiply WN by 2. 2006 Discrete Haar Wavelet Transforms Lecture 4 .

7 June. ˜ ˜ We have WN 2 N √ ˜ If we multiply WN by 2. 2006 Discrete Haar Wavelet Transforms Lecture 4 .Today’s Schedule Building the Haar Matrix Coding the Haar Transform 2D Haar Transform Iterating In the Classroom Putting Two Filters Together Building the Haar Matrix Putting Two Filters Together ˜ Note we are very close to having WN an orthogonal matrix. T = 1 W −1 . we will obtain an orthogonal matrix. We have: Wednesday.

We have: Wednesday. ˜ ˜ We have WN 2 N √ ˜ If we multiply WN by 2.Today’s Schedule Building the Haar Matrix Coding the Haar Transform 2D Haar Transform Iterating In the Classroom Putting Two Filters Together Building the Haar Matrix Putting Two Filters Together ˜ Note we are very close to having WN an orthogonal matrix. we will obtain an orthogonal matrix. 2006 Discrete Haar Wavelet Transforms Lecture 4 . 7 June. T = 1 W −1 .

0 Wednesday.  .      H 0  = WN =   √  G  − 22   0  .                   0 √ 0 . . . 0 − 0 2 2 2 2 0 0 √ 2 2 √ 0 0 . √ 2 2 √ 0 0 . . . − 2 2 Lecture 4 .Today’s Schedule Building the Haar Matrix Coding the Haar Transform 2D Haar Transform Iterating In the Classroom Putting Two Filters Together Building the Haar Matrix Putting Two Filters Together  √ 2 2 √ 2 2 0 √ 2 2 0 √ 2 2  0   . √ 2 2 0 0 . . ..  .. 2006 Discrete Haar Wavelet Transforms 0 0 √ 2 2 0 0 . ....  .. 7 June. 0 0 .

but H(0) = √ 2 2 . 2 2 √ + 2 2 eiω satisfies H(π) = 0. 2006 Discrete Haar Wavelet Transforms Lecture 4 .Today’s Schedule Building the Haar Matrix Coding the Haar Transform 2D Haar Transform Iterating In the Classroom Putting Two Filters Together Building the Haar Matrix Putting Two Filters Together WN is called the Discrete Haar Wavelet Transform The filter h= is called the Haar filter. 7 June. Wednesday. We will still consider this to be a lowpass filter- the 2 2 resulted when we made the transform orthogonal. √ Note that H(ω) = √ 2 2 √ √ 2 2 .

2006 Discrete Haar Wavelet Transforms Lecture 4 . but H(0) = √ 2 2 . 2 2 √ + 2 2 eiω satisfies H(π) = 0.Today’s Schedule Building the Haar Matrix Coding the Haar Transform 2D Haar Transform Iterating In the Classroom Putting Two Filters Together Building the Haar Matrix Putting Two Filters Together WN is called the Discrete Haar Wavelet Transform The filter h= is called the Haar filter. Wednesday. √ Note that H(ω) = √ 2 2 √ √ 2 2 . 7 June. We will still consider this to be a lowpass filter- the 2 2 resulted when we made the transform orthogonal.

Wednesday. √ Note that H(ω) = √ 2 2 √ √ 2 2 . We will still consider this to be a lowpass filter- the 2 2 resulted when we made the transform orthogonal. but H(0) = √ 2 2 . 2006 Discrete Haar Wavelet Transforms Lecture 4 .Today’s Schedule Building the Haar Matrix Coding the Haar Transform 2D Haar Transform Iterating In the Classroom Putting Two Filters Together Building the Haar Matrix Putting Two Filters Together WN is called the Discrete Haar Wavelet Transform The filter h= is called the Haar filter. 2 2 √ + 2 2 eiω satisfies H(π) = 0. 7 June.

We will still consider this to be a lowpass filter- the 2 2 resulted when we made the transform orthogonal. Wednesday. 2006 Discrete Haar Wavelet Transforms Lecture 4 . √ Note that H(ω) = √ 2 2 √ √ 2 2 . but H(0) = √ 2 2 . 7 June.Today’s Schedule Building the Haar Matrix Coding the Haar Transform 2D Haar Transform Iterating In the Classroom Putting Two Filters Together Building the Haar Matrix Putting Two Filters Together WN is called the Discrete Haar Wavelet Transform The filter h= is called the Haar filter. 2 2 √ + 2 2 eiω satisfies H(π) = 0.

2006 Discrete Haar Wavelet Transforms Lecture 4 . 7 June.Today’s Schedule Building the Haar Matrix Coding the Haar Transform 2D Haar Transform Iterating In the Classroom Why the Word Wavelet? Building the Haar Matrix Why the Word Wavelet? The word wavelet comes from the more classical treatment of the topic. Here. Wednesday. we work in L2 (R) and downsampling is basically a way to move between nested subspaces Vj that are generated by the translates and dilates of a single scaling function.1) (t) and its translates form an orthonormal basis for V0 . then the characteristic function φ(t) = χ[0. If V0 is the space of piecewise constants with possible breaks at Z.

1) (t) and its translates form an orthonormal basis for V0 . then the characteristic function φ(t) = χ[0. 2006 Discrete Haar Wavelet Transforms Lecture 4 . If V0 is the space of piecewise constants with possible breaks at Z. Here.Today’s Schedule Building the Haar Matrix Coding the Haar Transform 2D Haar Transform Iterating In the Classroom Why the Word Wavelet? Building the Haar Matrix Why the Word Wavelet? The word wavelet comes from the more classical treatment of the topic. Wednesday. 7 June. we work in L2 (R) and downsampling is basically a way to move between nested subspaces Vj that are generated by the translates and dilates of a single scaling function.

2006 Discrete Haar Wavelet Transforms Lecture 4 .1) (t) and its translates form an orthonormal basis for V0 .Today’s Schedule Building the Haar Matrix Coding the Haar Transform 2D Haar Transform Iterating In the Classroom Why the Word Wavelet? Building the Haar Matrix Why the Word Wavelet? The word wavelet comes from the more classical treatment of the topic. then the characteristic function φ(t) = χ[0. 7 June. Here. If V0 is the space of piecewise constants with possible breaks at Z. we work in L2 (R) and downsampling is basically a way to move between nested subspaces Vj that are generated by the translates and dilates of a single scaling function. Wednesday.

7 June. 2006 Discrete Haar Wavelet Transforms Lecture 4 .Today’s Schedule Building the Haar Matrix Coding the Haar Transform 2D Haar Transform Iterating In the Classroom Why the Word Wavelet? Building the Haar Matrix Why the Word Wavelet? Wednesday.

Wednesday. 7 June. and the functions 2φ(2t − k ) 2 form an orthornormal basis for V1 . then V0 ⊂ V1 .Today’s Schedule Building the Haar Matrix Coding the Haar Transform 2D Haar Transform Iterating In the Classroom Why the Word Wavelet? Building the Haar Matrix Why the Word Wavelet? If V1 is the space of piecewise constants with possible √ breakpoints at 1 Z. 2006 Discrete Haar Wavelet Transforms Lecture 4 .

Wednesday. 2006 Discrete Haar Wavelet Transforms Lecture 4 .Today’s Schedule Building the Haar Matrix Coding the Haar Transform 2D Haar Transform Iterating In the Classroom Why the Word Wavelet? Building the Haar Matrix Why the Word Wavelet? Note that √ φ(t) = 2 √ √ 2 2 φ(2t) + φ(2t − 1) 2 2 is called a dilation equation. 7 June.

the wavelet function is ψ(t) = 1 0≤t < 1 2 −1 1 ≤ t < 1 2 Wednesday.Today’s Schedule Building the Haar Matrix Coding the Haar Transform 2D Haar Transform Iterating In the Classroom Why the Word Wavelet? Building the Haar Matrix Why the Word Wavelet? We can get the Haar filter coefficients from the dilation equation. 7 June. The word wavelet refers to the function ψ(t) that generates a basis for the orthogonal complement of V0 in V1 . In this case. 2006 Discrete Haar Wavelet Transforms Lecture 4 .

Today’s Schedule Building the Haar Matrix Coding the Haar Transform 2D Haar Transform Iterating In the Classroom Why the Word Wavelet? Building the Haar Matrix Why the Word Wavelet? We can get the Haar filter coefficients from the dilation equation. The word wavelet refers to the function ψ(t) that generates a basis for the orthogonal complement of V0 in V1 . In this case. the wavelet function is ψ(t) = 1 0≤t < 1 2 −1 1 ≤ t < 1 2 Wednesday. 7 June. 2006 Discrete Haar Wavelet Transforms Lecture 4 .

the wavelet function is ψ(t) = 1 0≤t < 1 2 −1 1 ≤ t < 1 2 Wednesday. In this case.Today’s Schedule Building the Haar Matrix Coding the Haar Transform 2D Haar Transform Iterating In the Classroom Why the Word Wavelet? Building the Haar Matrix Why the Word Wavelet? We can get the Haar filter coefficients from the dilation equation. The word wavelet refers to the function ψ(t) that generates a basis for the orthogonal complement of V0 in V1 . 7 June. 2006 Discrete Haar Wavelet Transforms Lecture 4 .

The word wavelet refers to the function ψ(t) that generates a basis for the orthogonal complement of V0 in V1 . In this case. 7 June.Today’s Schedule Building the Haar Matrix Coding the Haar Transform 2D Haar Transform Iterating In the Classroom Why the Word Wavelet? Building the Haar Matrix Why the Word Wavelet? We can get the Haar filter coefficients from the dilation equation. 2006 Discrete Haar Wavelet Transforms Lecture 4 . the wavelet function is ψ(t) = 1 0≤t < 1 2 −1 1 ≤ t < 1 2 Wednesday.

2006 Discrete Haar Wavelet Transforms Lecture 4 . can be read from this Wednesday.Today’s Schedule Building the Haar Matrix Coding the Haar Transform 2D Haar Transform Iterating In the Classroom Why the Word Wavelet? Building the Haar Matrix Why the Word Wavelet? Note that ψ(t) ∈ V1 and √ ψ(t) = φ(t) = 2 √ √ 2 2 φ(2t) − φ(2t − 1) 2 2 √ √ 2 2 2 .− 2 so that the highpass filter g = dilation equation. 7 June.

but too much for sophomores and juniors. 7 June. Wednesday. I believe it’s better to give them a practical introduction to Fourier series and convolution.Today’s Schedule Building the Haar Matrix Coding the Haar Transform 2D Haar Transform Iterating In the Classroom Why the Word Wavelet? Building the Haar Matrix Why the Word Wavelet? I opted to stay away from the classical approach to wavelets. It is beautiful theory. and then derive the the discrete wavelet transform by using a lowpass/highpass filter pair and downsampling. 2006 Discrete Haar Wavelet Transforms Lecture 4 .

I believe it’s better to give them a practical introduction to Fourier series and convolution. and then derive the the discrete wavelet transform by using a lowpass/highpass filter pair and downsampling.Today’s Schedule Building the Haar Matrix Coding the Haar Transform 2D Haar Transform Iterating In the Classroom Why the Word Wavelet? Building the Haar Matrix Why the Word Wavelet? I opted to stay away from the classical approach to wavelets. but too much for sophomores and juniors. Wednesday. It is beautiful theory. 7 June. 2006 Discrete Haar Wavelet Transforms Lecture 4 .

but too much for sophomores and juniors. I believe it’s better to give them a practical introduction to Fourier series and convolution. 2006 Discrete Haar Wavelet Transforms Lecture 4 . 7 June. It is beautiful theory. and then derive the the discrete wavelet transform by using a lowpass/highpass filter pair and downsampling.Today’s Schedule Building the Haar Matrix Coding the Haar Transform 2D Haar Transform Iterating In the Classroom Why the Word Wavelet? Building the Haar Matrix Why the Word Wavelet? I opted to stay away from the classical approach to wavelets. Wednesday.

It is beautiful theory. Wednesday. 2006 Discrete Haar Wavelet Transforms Lecture 4 . but too much for sophomores and juniors. 7 June.Today’s Schedule Building the Haar Matrix Coding the Haar Transform 2D Haar Transform Iterating In the Classroom Why the Word Wavelet? Building the Haar Matrix Why the Word Wavelet? I opted to stay away from the classical approach to wavelets. I believe it’s better to give them a practical introduction to Fourier series and convolution. and then derive the the discrete wavelet transform by using a lowpass/highpass filter pair and downsampling.

2006 Discrete Haar Wavelet Transforms Lecture 4 . 7 June.Today’s Schedule Building the Haar Matrix Coding the Haar Transform 2D Haar Transform Iterating In the Classroom Examples Building the Haar Matrix Examples Let’s have a look at the Mathematica notebook HaarTransforms1D.nb for a bit more on Haar Transforms. Wednesday.

2006 Discrete Haar Wavelet Transforms Lecture 4 . Wednesday. This bogs down in Mathematica and is also difficult to generalize when we consider longer filters.Today’s Schedule Building the Haar Matrix Coding the Haar Transform 2D Haar Transform Iterating In the Classroom Implementing WN Coding the Haar Transform Implementing WN The natural inclination when coding the DHWT is to simply write a loop and compute the lowpass portion and the highpass portion in the same loop. 7 June. Hv. If we look at the lowpass portion of the transform. we can see a better way to code things.

This bogs down in Mathematica and is also difficult to generalize when we consider longer filters. we can see a better way to code things. If we look at the lowpass portion of the transform. Wednesday. 2006 Discrete Haar Wavelet Transforms Lecture 4 . Hv.Today’s Schedule Building the Haar Matrix Coding the Haar Transform 2D Haar Transform Iterating In the Classroom Implementing WN Coding the Haar Transform Implementing WN The natural inclination when coding the DHWT is to simply write a loop and compute the lowpass portion and the highpass portion in the same loop. 7 June.

7 June. 2006 Discrete Haar Wavelet Transforms Lecture 4 . This bogs down in Mathematica and is also difficult to generalize when we consider longer filters. Wednesday. Hv. we can see a better way to code things.Today’s Schedule Building the Haar Matrix Coding the Haar Transform 2D Haar Transform Iterating In the Classroom Implementing WN Coding the Haar Transform Implementing WN The natural inclination when coding the DHWT is to simply write a loop and compute the lowpass portion and the highpass portion in the same loop. If we look at the lowpass portion of the transform.

7 June. If we look at the lowpass portion of the transform. we can see a better way to code things. This bogs down in Mathematica and is also difficult to generalize when we consider longer filters. 2006 Discrete Haar Wavelet Transforms Lecture 4 .Today’s Schedule Building the Haar Matrix Coding the Haar Transform 2D Haar Transform Iterating In the Classroom Implementing WN Coding the Haar Transform Implementing WN The natural inclination when coding the DHWT is to simply write a loop and compute the lowpass portion and the highpass portion in the same loop. Hv. Wednesday.

2006 Discrete Haar Wavelet Transforms Lecture 4 . 7 June.Today’s Schedule Building the Haar Matrix Coding the Haar Transform 2D Haar Transform Iterating In the Classroom Implementing WN Coding the Haar Transform Implementing WN Consider Hv when v ∈ R8 . We have  v1 + v2 √ 2  v3 + v4  Hv = 2  v5 + v6 v7 + v8     Wednesday.

7 June. we have    v1 + v2 √ 2  v3 + v4    = Hv = 2  v5 + v6   v7 + v8 v1 v3 v5 v7  v2 v4  · v6  v8 2 2 √ 2 2 √ = Vh Wednesday. 2006 Discrete Haar Wavelet Transforms Lecture 4 .Today’s Schedule Building the Haar Matrix Coding the Haar Transform 2D Haar Transform Iterating In the Classroom Implementing WN Coding the Haar Transform Implementing WN If we rewrite this.

and join to the two blocks together! Wednesday. 2006 Discrete Haar Wavelet Transforms Lecture 4 . 7 June.Today’s Schedule Building the Haar Matrix Coding the Haar Transform 2D Haar Transform Iterating In the Classroom Implementing WN Coding the Haar Transform Implementing WN In a similar way we see that Gv = V g So all we need to do to compute Wn v is to create V . multiply it with h and g.

V=Partition[v.hp].{1.lp. hp=V. 2006 Discrete Haar Wavelet Transforms Lecture 4 . Return[Sqrt[2]*y/2].Today’s Schedule Building the Haar Matrix Coding the Haar Transform 2D Haar Transform Iterating In the Classroom Implementing WN Coding the Haar Transform Implementing WN Here is some Mathematica code to do it: DHWT[v_]:=Module[{V.2]. ].y}.2.-1}. Wednesday.{1.hp. y=Join[lp. lp=V.1}. 7 June.

2006 Discrete Haar Wavelet Transforms Lecture 4 . Now the computation is T WN v = H T GT v Let’s again look at a vector v ∈ R8 and consider the T product W8 v: Wednesday.Today’s Schedule Building the Haar Matrix Coding the Haar Transform 2D Haar Transform Iterating In the Classroom T Implementing WN Coding the Haar Transform T Implementing WN Writing the code for the inverse transform is a bit trickier. 7 June.

Today’s Schedule

Building the Haar Matrix

Coding the Haar Transform

2D Haar Transform

Iterating

In the Classroom

T Implementing WN

Coding the Haar Transform
T Implementing WN

Writing the code for the inverse transform is a bit trickier. Now the computation is
T WN v = H T GT v

Let’s again look at a vector v ∈ R8 and consider the T product W8 v:

Wednesday, 7 June, 2006 Discrete Haar Wavelet Transforms

Lecture 4

Today’s Schedule

Building the Haar Matrix

Coding the Haar Transform

2D Haar Transform

Iterating

In the Classroom

T Implementing WN

Coding the Haar Transform
T Implementing WN

Writing the code for the inverse transform is a bit trickier. Now the computation is
T WN v = H T GT v

Let’s again look at a vector v ∈ R8 and consider the T product W8 v:

Wednesday, 7 June, 2006 Discrete Haar Wavelet Transforms

Lecture 4

Today’s Schedule

Building the Haar Matrix

Coding the Haar Transform

2D Haar Transform

Iterating

In the Classroom

T Implementing WN

Coding the Haar Transform
T Implementing WN

Writing the code for the inverse transform is a bit trickier. Now the computation is
T WN v = H T GT v

Let’s again look at a vector v ∈ R8 and consider the T product W8 v:

Wednesday, 7 June, 2006 Discrete Haar Wavelet Transforms

Lecture 4

2006 Discrete Haar Wavelet Transforms Lecture 4 .Today’s Schedule Building the Haar Matrix Coding the Haar Transform 2D Haar Transform Iterating In the Classroom T Implementing WN Coding the Haar Transform T Implementing WN     √  2 T  W8 v = 2      1 1 0 0 0 0 0 0 0 0 1 1 0 0 0 0 0 0 0 0 1 1 0 0 0 −1 0 0 0 0 1 0 0 0 0 0 −1 0 0 0 0 1 0 0 0 0 0 −1 0 0 0 0 1 0 1 0 0 0 −1 1 0 0 0 1             ·           v1 v2 v3 v4 v5 v6 v7 v8             Wednesday. 7 June.

2006 Discrete Haar Wavelet Transforms Lecture 4 .Today’s Schedule Building the Haar Matrix Coding the Haar Transform 2D Haar Transform Iterating In the Classroom T Implementing WN Coding the Haar Transform T Implementing WN or     √  2 T  W8 v = 2      v1 − v5 v1 + v5 v2 − v6 v2 + v6 v3 − v7 v3 + v7 v4 − v8 v4 + v8             Wednesday. 7 June.

2006 Discrete Haar Wavelet Transforms Lecture 4 . Wednesday.Today’s Schedule Building the Haar Matrix Coding the Haar Transform 2D Haar Transform Iterating In the Classroom T Implementing WN Coding the Haar Transform T Implementing WN The matrix V takes a bit different shape this time. 7 June. Now V is v1  v2 V =  v3 v4   v5 v6   v7  v8 We need to dot V with both h and g but then intertwine the results.

Now V is v1  v2 V =  v3 v4   v5 v6   v7  v8 We need to dot V with both h and g but then intertwine the results.Today’s Schedule Building the Haar Matrix Coding the Haar Transform 2D Haar Transform Iterating In the Classroom T Implementing WN Coding the Haar Transform T Implementing WN The matrix V takes a bit different shape this time. Wednesday. 2006 Discrete Haar Wavelet Transforms Lecture 4 . 7 June.

Now V is v1  v2 V =  v3 v4   v5 v6   v7  v8 We need to dot V with both h and g but then intertwine the results. Wednesday. 7 June.Today’s Schedule Building the Haar Matrix Coding the Haar Transform 2D Haar Transform Iterating In the Classroom T Implementing WN Coding the Haar Transform T Implementing WN The matrix V takes a bit different shape this time. 2006 Discrete Haar Wavelet Transforms Lecture 4 .

2006 Discrete Haar Wavelet Transforms Lecture 4 . Wednesday. 7 June.Today’s Schedule Building the Haar Matrix Coding the Haar Transform 2D Haar Transform Iterating In the Classroom T Implementing WN Coding the Haar Transform T Implementing WN The matrix V takes a bit different shape this time. Now V is v1  v2 V =  v3 v4   v5 v6   v7  v8 We need to dot V with both h and g but then intertwine the results.

Today’s Schedule Building the Haar Matrix Coding the Haar Transform 2D Haar Transform Iterating In the Classroom T Implementing WN Coding the Haar Transform T Implementing WN Let’s return to the Mathematica notebook HaarTransforms1D. Wednesday. 7 June.nb to see how to code the inverse. 2006 Discrete Haar Wavelet Transforms Lecture 4 .

we are simply applying the DHWT to each column of A: Wednesday. 2006 Discrete Haar Wavelet Transforms Lecture 4 . 7 June.Today’s Schedule Building the Haar Matrix Coding the Haar Transform 2D Haar Transform Iterating In the Classroom Building the 2D Transform 2D Haar Transform Building the 2D Transform Let’s now assume A is an N × N image with N even. How do we transform A? If we compute WN A.

2006 Discrete Haar Wavelet Transforms Lecture 4 .Today’s Schedule Building the Haar Matrix Coding the Haar Transform 2D Haar Transform Iterating In the Classroom Building the 2D Transform 2D Haar Transform Building the 2D Transform Let’s now assume A is an N × N image with N even. we are simply applying the DHWT to each column of A: Wednesday. 7 June. How do we transform A? If we compute WN A.

2006 Discrete Haar Wavelet Transforms Lecture 4 . we are simply applying the DHWT to each column of A: Wednesday. 7 June. How do we transform A? If we compute WN A.Today’s Schedule Building the Haar Matrix Coding the Haar Transform 2D Haar Transform Iterating In the Classroom Building the 2D Transform 2D Haar Transform Building the 2D Transform Let’s now assume A is an N × N image with N even.

Today’s Schedule

Building the Haar Matrix

Coding the Haar Transform

2D Haar Transform

Iterating

In the Classroom

Building the 2D Transform

2D Haar Transform
Building the 2D Transform

Let’s now assume A is an N × N image with N even. How do we transform A? If we compute WN A, we are simply applying the DHWT to each column of A:

Wednesday, 7 June, 2006 Discrete Haar Wavelet Transforms

Lecture 4

Today’s Schedule

Building the Haar Matrix

Coding the Haar Transform

2D Haar Transform

Iterating

In the Classroom

Building the 2D Transform

2D Haar Transform
Building the 2D Transform

A

WN A

Wednesday, 7 June, 2006 Discrete Haar Wavelet Transforms

Lecture 4

Today’s Schedule

Building the Haar Matrix

Coding the Haar Transform

2D Haar Transform

Iterating

In the Classroom

Building the 2D Transform

2D Haar Transform
Building the 2D Transform

We’ve processed the columns of A - what should we do to process the rows of A as well?
T Answer: Compute WN AWN .

Wednesday, 7 June, 2006 Discrete Haar Wavelet Transforms

Lecture 4

7 June.Today’s Schedule Building the Haar Matrix Coding the Haar Transform 2D Haar Transform Iterating In the Classroom Building the 2D Transform 2D Haar Transform Building the 2D Transform We’ve processed the columns of A . Wednesday. 2006 Discrete Haar Wavelet Transforms Lecture 4 .what should we do to process the rows of A as well? T Answer: Compute WN AWN .

Wednesday. 7 June.Today’s Schedule Building the Haar Matrix Coding the Haar Transform 2D Haar Transform Iterating In the Classroom Building the 2D Transform 2D Haar Transform Building the 2D Transform We’ve processed the columns of A .what should we do to process the rows of A as well? T Answer: Compute WN AWN . 2006 Discrete Haar Wavelet Transforms Lecture 4 .

2006 Discrete Haar Wavelet Transforms Lecture 4 .Today’s Schedule Building the Haar Matrix Coding the Haar Transform 2D Haar Transform Iterating In the Classroom Building the 2D Transform 2D Haar Transform Building the 2D Transform A T WN AWN Wednesday. 7 June.

we can get a better idea what’s going on.Today’s Schedule Building the Haar Matrix Coding the Haar Transform 2D Haar Transform Iterating In the Classroom Building the 2D Transform 2D Haar Transform Building the 2D Transform T If we look at WN AWN in block format. 7 June. 2006 Discrete Haar Wavelet Transforms Lecture 4 . T WN AWN = H G A H G T = HA GA HT GT = HAH T GAH T B H V D HAGT GAGT = Wednesday.

T WN AWN = H G A H G T = HA GA HT GT = HAH T GAH T B H V D HAGT GAGT = Wednesday. we can get a better idea what’s going on.Today’s Schedule Building the Haar Matrix Coding the Haar Transform 2D Haar Transform Iterating In the Classroom Building the 2D Transform 2D Haar Transform Building the 2D Transform T If we look at WN AWN in block format. 7 June. 2006 Discrete Haar Wavelet Transforms Lecture 4 .

7 June.Today’s Schedule Building the Haar Matrix Coding the Haar Transform 2D Haar Transform Iterating In the Classroom Building the 2D Transform 2D Haar Transform Building the 2D Transform T If we look at WN AWN in block format. T WN AWN = H G A H G T = HA GA HT GT = HAH T GAH T B H V D HAGT GAGT = Wednesday. we can get a better idea what’s going on. 2006 Discrete Haar Wavelet Transforms Lecture 4 .

2006 Discrete Haar Wavelet Transforms Lecture 4 . This will produce an approximation (or blur) B of A. Wednesday. This will produce vertical differences V between B and A. 7 June. HAGT averages along the columns of A and then differences along the rows of HA.Today’s Schedule Building the Haar Matrix Coding the Haar Transform 2D Haar Transform Iterating In the Classroom Building the 2D Transform 2D Haar Transform Building the 2D Transform HAH T averages along the columns of A and then along the rows of HA.

HAGT averages along the columns of A and then differences along the rows of HA. This will produce vertical differences V between B and A. 7 June.Today’s Schedule Building the Haar Matrix Coding the Haar Transform 2D Haar Transform Iterating In the Classroom Building the 2D Transform 2D Haar Transform Building the 2D Transform HAH T averages along the columns of A and then along the rows of HA. Wednesday. 2006 Discrete Haar Wavelet Transforms Lecture 4 . This will produce an approximation (or blur) B of A.

HAGT averages along the columns of A and then differences along the rows of HA. Wednesday. 2006 Discrete Haar Wavelet Transforms Lecture 4 .Today’s Schedule Building the Haar Matrix Coding the Haar Transform 2D Haar Transform Iterating In the Classroom Building the 2D Transform 2D Haar Transform Building the 2D Transform HAH T averages along the columns of A and then along the rows of HA. 7 June. This will produce vertical differences V between B and A. This will produce an approximation (or blur) B of A.

This will produce horizontal differences H between B and A. 7 June. GAGT differences along the columns of A and then differences along the rows of GA. 2006 Discrete Haar Wavelet Transforms Lecture 4 . This will produce diagonal differences V between B and A. Wednesday.Today’s Schedule Building the Haar Matrix Coding the Haar Transform 2D Haar Transform Iterating In the Classroom Building the 2D Transform 2D Haar Transform Building the 2D Transform GAH T differences along the columns of A and then averages along the rows of GA.

7 June. GAGT differences along the columns of A and then differences along the rows of GA. This will produce horizontal differences H between B and A. Wednesday. 2006 Discrete Haar Wavelet Transforms Lecture 4 . This will produce diagonal differences V between B and A.Today’s Schedule Building the Haar Matrix Coding the Haar Transform 2D Haar Transform Iterating In the Classroom Building the 2D Transform 2D Haar Transform Building the 2D Transform GAH T differences along the columns of A and then averages along the rows of GA.

7 June.Today’s Schedule Building the Haar Matrix Coding the Haar Transform 2D Haar Transform Iterating In the Classroom Building the 2D Transform 2D Haar Transform Building the 2D Transform GAH T differences along the columns of A and then averages along the rows of GA. This will produce horizontal differences H between B and A. Wednesday. This will produce diagonal differences V between B and A. 2006 Discrete Haar Wavelet Transforms Lecture 4 . GAGT differences along the columns of A and then differences along the rows of GA.

let’s look at the Mathematica notebook HaarTransforms2D.nb Wednesday. 7 June.Today’s Schedule Building the Haar Matrix Coding the Haar Transform 2D Haar Transform Iterating In the Classroom Building the 2D Transform 2D Haar Transform Building the 2D Transform To better understand these block forms. 2006 Discrete Haar Wavelet Transforms Lecture 4 .

T T Our goal is to compute B = WN AWN = CWN . . so we can easily write a routine to compute C = WN A.Today’s Schedule Building the Haar Matrix Coding the Haar Transform 2D Haar Transform Iterating In the Classroom Coding the 2D Transform 2D Haar Transform Coding the 2D Transform Coding the 2D Haar transform is easy . 2006 Discrete Haar Wavelet Transforms Lecture 4 . . Let’s call this routine W. but if we use some linear algebra . T It turns out that writing code for CWN is a bit tedious.we already have a routine that will apply the DHWT to each column of A. Wednesday. 7 June.

7 June.we already have a routine that will apply the DHWT to each column of A. . 2006 Discrete Haar Wavelet Transforms Lecture 4 . Wednesday.Today’s Schedule Building the Haar Matrix Coding the Haar Transform 2D Haar Transform Iterating In the Classroom Coding the 2D Transform 2D Haar Transform Coding the 2D Transform Coding the 2D Haar transform is easy . Let’s call this routine W. but if we use some linear algebra . . T It turns out that writing code for CWN is a bit tedious. so we can easily write a routine to compute C = WN A. T T Our goal is to compute B = WN AWN = CWN .

T T Our goal is to compute B = WN AWN = CWN . 7 June.we already have a routine that will apply the DHWT to each column of A.Today’s Schedule Building the Haar Matrix Coding the Haar Transform 2D Haar Transform Iterating In the Classroom Coding the 2D Transform 2D Haar Transform Coding the 2D Transform Coding the 2D Haar transform is easy . Let’s call this routine W. 2006 Discrete Haar Wavelet Transforms Lecture 4 . so we can easily write a routine to compute C = WN A. but if we use some linear algebra . . . Wednesday. T It turns out that writing code for CWN is a bit tedious.

we already have a routine that will apply the DHWT to each column of A. . 2006 Discrete Haar Wavelet Transforms Lecture 4 . Let’s call this routine W. . T It turns out that writing code for CWN is a bit tedious. 7 June.Today’s Schedule Building the Haar Matrix Coding the Haar Transform 2D Haar Transform Iterating In the Classroom Coding the 2D Transform 2D Haar Transform Coding the 2D Transform Coding the 2D Haar transform is easy . so we can easily write a routine to compute C = WN A. T T Our goal is to compute B = WN AWN = CWN . but if we use some linear algebra . Wednesday.

we already have a routine that will apply the DHWT to each column of A. but if we use some linear algebra . T T Our goal is to compute B = WN AWN = CWN . Wednesday. . . T It turns out that writing code for CWN is a bit tedious. 7 June. Let’s call this routine W. so we can easily write a routine to compute C = WN A.Today’s Schedule Building the Haar Matrix Coding the Haar Transform 2D Haar Transform Iterating In the Classroom Coding the 2D Transform 2D Haar Transform Coding the 2D Transform Coding the 2D Haar transform is easy . 2006 Discrete Haar Wavelet Transforms Lecture 4 .

Let’s return to HaarTransforms2D. 2006 Discrete Haar Wavelet Transforms Lecture 4 . we have B T = WN C T So we can simply apply W to C T and transpose the result.Today’s Schedule Building the Haar Matrix Coding the Haar Transform 2D Haar Transform Iterating In the Classroom Coding the 2D Transform 2D Haar Transform Coding the 2D Transform T If we transpose both sides of B = CWN . . Wednesday. One student wasn’t so sure about this . 7 June. .nb to write some code for the 2D Haar Wavelet Transform.

nb to write some code for the 2D Haar Wavelet Transform. 2006 Discrete Haar Wavelet Transforms Lecture 4 . Let’s return to HaarTransforms2D. Wednesday. . we have B T = WN C T So we can simply apply W to C T and transpose the result.Today’s Schedule Building the Haar Matrix Coding the Haar Transform 2D Haar Transform Iterating In the Classroom Coding the 2D Transform 2D Haar Transform Coding the 2D Transform T If we transpose both sides of B = CWN . . 7 June. One student wasn’t so sure about this .

7 June. Wednesday. we have B T = WN C T So we can simply apply W to C T and transpose the result. Let’s return to HaarTransforms2D.nb to write some code for the 2D Haar Wavelet Transform. 2006 Discrete Haar Wavelet Transforms Lecture 4 .Today’s Schedule Building the Haar Matrix Coding the Haar Transform 2D Haar Transform Iterating In the Classroom Coding the 2D Transform 2D Haar Transform Coding the 2D Transform T If we transpose both sides of B = CWN . One student wasn’t so sure about this . . .

2006 Discrete Haar Wavelet Transforms Lecture 4 . . we have B T = WN C T So we can simply apply W to C T and transpose the result. Wednesday.nb to write some code for the 2D Haar Wavelet Transform. .Today’s Schedule Building the Haar Matrix Coding the Haar Transform 2D Haar Transform Iterating In the Classroom Coding the 2D Transform 2D Haar Transform Coding the 2D Transform T If we transpose both sides of B = CWN . Let’s return to HaarTransforms2D. 7 June. One student wasn’t so sure about this .

Today’s Schedule

Building the Haar Matrix

Coding the Haar Transform

2D Haar Transform

Iterating

In the Classroom

Coding the 2D Transform

2D Haar Transform
Coding the 2D Transform

T If we transpose both sides of B = CWN , we have

B T = WN C T So we can simply apply W to C T and transpose the result. One student wasn’t so sure about this . . . Let’s return to HaarTransforms2D.nb to write some code for the 2D Haar Wavelet Transform.

Wednesday, 7 June, 2006 Discrete Haar Wavelet Transforms

Lecture 4

Today’s Schedule

Building the Haar Matrix

Coding the Haar Transform

2D Haar Transform

Iterating

In the Classroom

2D Haar Transform
Iterating

It’s time to explain the NumIterations directive you have seen in the Mathematica notebooks. We can motivate the idea by looking at the cumulative energy of an image A and its wavelet transform.

Wednesday, 7 June, 2006 Discrete Haar Wavelet Transforms

Lecture 4

Today’s Schedule

Building the Haar Matrix

Coding the Haar Transform

2D Haar Transform

Iterating

In the Classroom

2D Haar Transform
Iterating

It’s time to explain the NumIterations directive you have seen in the Mathematica notebooks. We can motivate the idea by looking at the cumulative energy of an image A and its wavelet transform.

Wednesday, 7 June, 2006 Discrete Haar Wavelet Transforms

Lecture 4

Wednesday. 2006 Discrete Haar Wavelet Transforms Lecture 4 . 7 June.Today’s Schedule Building the Haar Matrix Coding the Haar Transform 2D Haar Transform Iterating In the Classroom 2D Haar Transform Iterating It’s time to explain the NumIterations directive you have seen in the Mathematica notebooks. We can motivate the idea by looking at the cumulative energy of an image A and its wavelet transform.

Today’s Schedule Building the Haar Matrix Coding the Haar Transform 2D Haar Transform Iterating In the Classroom 2D Haar Transform Iterating Here is a 200 × 200 image and it’s transform: A T WN AWN Wednesday. 7 June. 2006 Discrete Haar Wavelet Transforms Lecture 4 .

Today’s Schedule Building the Haar Matrix Coding the Haar Transform 2D Haar Transform Iterating In the Classroom 2D Haar Transform Iterating Here are the cumulative energies for both A (red) and its transform (brown): Wednesday. 7 June. 2006 Discrete Haar Wavelet Transforms Lecture 4 .

The wavelet transform is totally invertible. 7 June. so if we were to Huffman encode the transform. the largest 10000 elements in A make up about 36.5% of the energy in A while the first 10000 elements in the transform comprise about 99. 2006 Discrete Haar Wavelet Transforms Lecture 4 .5% of the energy in the transform. the bit stream should be markedly smaller. Wednesday.Today’s Schedule Building the Haar Matrix Coding the Haar Transform 2D Haar Transform Iterating In the Classroom 2D Haar Transform Iterating To give you an idea.

the largest 10000 elements in A make up about 36.5% of the energy in A while the first 10000 elements in the transform comprise about 99.Today’s Schedule Building the Haar Matrix Coding the Haar Transform 2D Haar Transform Iterating In the Classroom 2D Haar Transform Iterating To give you an idea. The wavelet transform is totally invertible.5% of the energy in the transform. so if we were to Huffman encode the transform. 7 June. 2006 Discrete Haar Wavelet Transforms Lecture 4 . the bit stream should be markedly smaller. Wednesday.

The wavelet transform is totally invertible. 7 June. the bit stream should be markedly smaller.5% of the energy in A while the first 10000 elements in the transform comprise about 99.5% of the energy in the transform. so if we were to Huffman encode the transform. 2006 Discrete Haar Wavelet Transforms Lecture 4 .Today’s Schedule Building the Haar Matrix Coding the Haar Transform 2D Haar Transform Iterating In the Classroom 2D Haar Transform Iterating To give you an idea. the largest 10000 elements in A make up about 36. Wednesday.

7 June. after computing the wavelet transform of A. Wednesday. That is. we extract the blur and compute a wavelet transform of it. We could repeat this process p times if the dimensions of A are divisible by 2p . 2006 Discrete Haar Wavelet Transforms Lecture 4 .Today’s Schedule Building the Haar Matrix Coding the Haar Transform 2D Haar Transform Iterating In the Classroom 2D Haar Transform Iterating We can get even more concentration of the energy if we iterate the wavelet transform.

we extract the blur and compute a wavelet transform of it. 7 June. after computing the wavelet transform of A.Today’s Schedule Building the Haar Matrix Coding the Haar Transform 2D Haar Transform Iterating In the Classroom 2D Haar Transform Iterating We can get even more concentration of the energy if we iterate the wavelet transform. We could repeat this process p times if the dimensions of A are divisible by 2p . That is. Wednesday. 2006 Discrete Haar Wavelet Transforms Lecture 4 .

That is. We could repeat this process p times if the dimensions of A are divisible by 2p . 2006 Discrete Haar Wavelet Transforms Lecture 4 . we extract the blur and compute a wavelet transform of it. 7 June. Wednesday. after computing the wavelet transform of A.Today’s Schedule Building the Haar Matrix Coding the Haar Transform 2D Haar Transform Iterating In the Classroom 2D Haar Transform Iterating We can get even more concentration of the energy if we iterate the wavelet transform.

2006 Discrete Haar Wavelet Transforms Lecture 4 . 7 June.Today’s Schedule Building the Haar Matrix Coding the Haar Transform 2D Haar Transform Iterating In the Classroom 2D Haar Transform Iterating Now suppose we iterate 2 times: Wednesday.

7 June. 2006 Discrete Haar Wavelet Transforms Lecture 4 .Today’s Schedule Building the Haar Matrix Coding the Haar Transform 2D Haar Transform Iterating In the Classroom 2D Haar Transform Iterating or 3 times: Wednesday.

Today’s Schedule Building the Haar Matrix Coding the Haar Transform 2D Haar Transform Iterating In the Classroom 2D Haar Transform Iterating Here are the cumulative energy vectors for 1 iteration (brown). and 3 iterations (gray): Wednesday. 2 iterations (blue). 7 June. 2006 Discrete Haar Wavelet Transforms Lecture 4 .

Today’s Schedule Building the Haar Matrix Coding the Haar Transform 2D Haar Transform Iterating In the Classroom Teaching Ideas In the Classroom Teaching Ideas The students really enjoy the material in this chapter. It is quite straightforward and ties together everything new we’ve done to date. Wednesday. I have them look at the entropy of particular vectors when processed by the Haar transform. This gives them some idea of the potential for wavelet-based compression. 7 June. 2006 Discrete Haar Wavelet Transforms Lecture 4 .

Wednesday. This gives them some idea of the potential for wavelet-based compression. It is quite straightforward and ties together everything new we’ve done to date. 7 June. 2006 Discrete Haar Wavelet Transforms Lecture 4 .Today’s Schedule Building the Haar Matrix Coding the Haar Transform 2D Haar Transform Iterating In the Classroom Teaching Ideas In the Classroom Teaching Ideas The students really enjoy the material in this chapter. I have them look at the entropy of particular vectors when processed by the Haar transform.

2006 Discrete Haar Wavelet Transforms Lecture 4 . Wednesday. This gives them some idea of the potential for wavelet-based compression. It is quite straightforward and ties together everything new we’ve done to date. I have them look at the entropy of particular vectors when processed by the Haar transform. 7 June.Today’s Schedule Building the Haar Matrix Coding the Haar Transform 2D Haar Transform Iterating In the Classroom Teaching Ideas In the Classroom Teaching Ideas The students really enjoy the material in this chapter.

They can get pretty frustrated with Mathematica at this point . 2006 Discrete Haar Wavelet Transforms Lecture 4 . Wednesday. I let the students work in pairs and they write code for the Haar transform and its inverse (1D and 2D) as well as iterated versions. 7 June. we do lots of coding in this chapter.it is good to show them some simple debugging techniques.Today’s Schedule Building the Haar Matrix Coding the Haar Transform 2D Haar Transform Iterating In the Classroom Computer Usage In the Classroom Computer Usage As you might imagine.

I let the students work in pairs and they write code for the Haar transform and its inverse (1D and 2D) as well as iterated versions. 7 June. 2006 Discrete Haar Wavelet Transforms Lecture 4 . we do lots of coding in this chapter.Today’s Schedule Building the Haar Matrix Coding the Haar Transform 2D Haar Transform Iterating In the Classroom Computer Usage In the Classroom Computer Usage As you might imagine.it is good to show them some simple debugging techniques. Wednesday. They can get pretty frustrated with Mathematica at this point .

I let the students work in pairs and they write code for the Haar transform and its inverse (1D and 2D) as well as iterated versions. They can get pretty frustrated with Mathematica at this point .it is good to show them some simple debugging techniques. 7 June. we do lots of coding in this chapter. 2006 Discrete Haar Wavelet Transforms Lecture 4 .Today’s Schedule Building the Haar Matrix Coding the Haar Transform 2D Haar Transform Iterating In the Classroom Computer Usage In the Classroom Computer Usage As you might imagine. Wednesday.

7 June. They can get pretty frustrated with Mathematica at this point .it is good to show them some simple debugging techniques. Wednesday.Today’s Schedule Building the Haar Matrix Coding the Haar Transform 2D Haar Transform Iterating In the Classroom Computer Usage In the Classroom Computer Usage As you might imagine. 2006 Discrete Haar Wavelet Transforms Lecture 4 . I let the students work in pairs and they write code for the Haar transform and its inverse (1D and 2D) as well as iterated versions. we do lots of coding in this chapter.

2006 Discrete Haar Wavelet Transforms Lecture 4 . 7 June. and then apply their inverse to guess the movie clip.Today’s Schedule Building the Haar Matrix Coding the Haar Transform 2D Haar Transform Iterating In the Classroom Computer Usage In the Classroom Computer Usage I let them use their own images/audio files (sometimes dangerous). To test their iterated 1D inverse. guess at p. they must download an audio clip from my website that has been transformed p times. Wednesday.

Today’s Schedule Building the Haar Matrix Coding the Haar Transform 2D Haar Transform Iterating In the Classroom Computer Usage In the Classroom Computer Usage I let them use their own images/audio files (sometimes dangerous). and then apply their inverse to guess the movie clip. Wednesday. they must download an audio clip from my website that has been transformed p times. guess at p. 2006 Discrete Haar Wavelet Transforms Lecture 4 . To test their iterated 1D inverse. 7 June.

To test their iterated 1D inverse. 2006 Discrete Haar Wavelet Transforms Lecture 4 . and then apply their inverse to guess the movie clip. they must download an audio clip from my website that has been transformed p times. guess at p.Today’s Schedule Building the Haar Matrix Coding the Haar Transform 2D Haar Transform Iterating In the Classroom Computer Usage In the Classroom Computer Usage I let them use their own images/audio files (sometimes dangerous). Wednesday. 7 June.

2006 Discrete Haar Wavelet Transforms Lecture 4 . and Huffman Codes 12:00-1:00 Lunch (Cafeteria) 1:30-2:45 Lecture Three: Fourier Series.Today’s Schedule Building the Haar Matrix Coding the Haar Transform 2D Haar Transform Iterating In the Classroom Today’s Schedule 9:00-10:15 Lecture One: Why Wavelets? 10:15-10:30 Coffee Break (OSS 235) 10:30-11:45 Lecture Two: Digital Images. 7 June. Convolution and Filters 2:45-3:00 Coffee Break (OSS 235) 3:00-4:15 Lecture Four: 1D and 2D Haar Transforms 5:30-6:30 ⇒Dinner (Cafeteria) Wednesday. Measures.

Sign up to vote on this title
UsefulNot useful