Image & Video Compression · Wavelets
Discrete Wavelet Transform
Step through a 2D Haar decomposition of the demo image: start with the original, split horizontally, decompose vertically, and refine the low-pass branch twice.
How to read each panel
- Left regions show low-pass content; right regions show detail bands.
- After each split, the newest subband is highlighted in the top-left quadrant.
- All bands are contrast-stretched so small details stay visible.
Decomposition steps
Original image
Reference demo frame (grayscale).
Click through the steps to see how the 2D Haar transform peels away horizontal, vertical, and nested low-pass information.
What’s happening?
1. Horizontal
Rows are filtered with h = [1, 1]/√2 and g = [1, -1]/√2, then downsampled. The left half is smooth (LL), the right half captures horizontal detail (HL).
2. Vertical
Both halves are filtered column-wise, producing four quadrants: LL, LH, HL, and HH. Darker regions highlight where energy concentrates.
3. Refine LL
The LL quadrant is decomposed horizontally into an even smoother LLL block and a gentle LLH detail band.
4. Refine again
LLL is finally split vertically, exposing the most compact low-pass core (LLLL) and a faint vertical detail (LLLH).
Successive reconstruction
See how subbands add back detail
Drag the slider to reveal how each subband contributes to the demo frame. The newest band glows while completed bands stay shaded.
-
1. LL-2
Start from the coarsest approximation; it carries the broad luminance structure.
-
2. LH-2
Add vertical edges from the second-level low-pass band.
-
3. HL-2
Blend in horizontal edges at the same coarse scale.
-
4. HH-2
Introduce diagonal detail to complete the level-2 block.
-
5. LH-1
Layer in medium-scale vertical contrast from the next level up.
-
6. HL-1
Restore medium-scale horizontal contrast.
-
7. HH-1
Finish with diagonal detail to reach the full-resolution reconstruction order.