The Haar transform: rectangles with a shrinking footprint
Like Walsh–Hadamard, the Haar transform is built from rectangular ±-valued basis functions — but it's generated by a different rule, one indexed by a scale and a position rather than a single index:
sets the scale — how wide the function's support is — and slides that support along the interval. As grows, shrinks the active window, so higher-scale basis functions cover a smaller and smaller slice of the domain instead of oscillating across the whole thing.
Basis images
8 × 8 Haar basis images
What makes Haar different: locality
Look closely at the grid above next to the Hadamard grid from the last lesson. Every Hadamard basis image has structure spread across the entire tile — sign changes reach from edge to edge. Most Haar basis images, by contrast, are flat gray almost everywhere, with all the "action" compressed into one small block.
Why this matters
A transform whose basis functions are spread across the whole image (Fourier, DCT, Hadamard) is good at describing global patterns — overall brightness gradients, repeating textures. A transform whose basis functions are concentrated in small regions is good at describing local ones — a sharp edge in one corner, a small bright spot — without smearing that information across every coefficient. That locality is exactly the property later generalized into wavelets, which is why the Haar transform is usually taught as "the simplest wavelet transform" rather than just another basis swap.
Review: four transforms, one formula
Every transform in this unit is an instance of the same idea from two lessons ago — for some orthonormal kernel — just with a different family of basis vectors packed into :
- Fourier — complex exponentials; smooth, global, but complex-valued.
- Discrete Cosine — real cosines; smooth, global, and strongly energy-compacting (JPEG).
- Walsh–Hadamard — real ±1 rectangles; global, cheap to compute, ranked by sequency.
- Haar — real ±1 rectangles that shrink in support with scale; local, the ancestor of wavelets.
Same input image, four different lenses — each one making a different kind of structure easy to see, and easy to throw away without losing much.
Check your understanding
An algorithm needs to detect a small, sharp defect in one corner of an image without disturbing the representation of the rest of the image. Which transform's basis functions are best suited to that, and why?
Check your understanding
Which property specifically explains why JPEG can discard most DCT coefficients with little visible loss?