Skip to content
All projects
EEL 5820 Image Processing2025

Fourier against Haar wavelets for compression

Two transforms, the same images, compression ratios from 2 to 50. A direct look at what a basis choice actually buys you.

MATLABFourierHaar waveletsMultiresolution

The question

Transform coding keeps the largest coefficients and discards the rest. Which coefficients are large depends entirely on the basis, and the two classical choices fail in visibly different ways.

Approach

Implemented both pipelines from scratch, including the Haar transform and its inverse at multiple decomposition levels, and compressed three standard images at ratios from 2 to 50 with SNR measured across the whole sweep.

Original against Fourier and Haar at 25 to 1 compression.
SNR across compression ratios.

Outcome

At the same ratio the two look nothing alike. Fourier smears error globally as ringing around edges, since a discarded sinusoid affects the entire image. Haar concentrates error locally into blocks, since its basis functions have compact support.

What it taught me

Where your error goes is a property of your basis, not of your compression ratio. This is the intuition I use now to think about why a continuous field and a voxel lattice fail differently on the same anatomy.

More output

The same sweep on a second image.