Chapter 20 Interactive Lab

Haar Wavelets: Local Change at Many Scales

Explore how a signal can be rewritten as averages and differences. Fourier asks which frequencies are present. Haar asks where the signal changes and at what scale.

1. Two numbers: average and difference

The first Haar coefficient measures shared level. The second measures local contrast. Large difference coefficients often indicate edges.

2. Multiscale Haar transform of a length-16 signal

The coefficient plot shows where the signal has energy in the Haar language. Coarse coefficients describe broad changes; fine coefficients describe local jumps.

3. Compression: keep only the largest Haar coefficients

Because the Haar matrix is orthonormal, the reconstruction error is exactly controlled by the discarded coefficients.

4. Threshold denoising

Small noisy wiggles often become small Haar coefficients. Removing them can reveal the larger piecewise structure.

5. Tiny image: edges through row and column Haar transforms

A 2D Haar transform uses C = H X H^T. It separates coarse brightness from horizontal, vertical, and diagonal changes.