Yesterday, my teacher taught us about the Haar transform (for pictures). We had to implement it in Python and when I finished I was wondering: what was the point? I can't explain the purpose of what I'm studying: what a shame !

Can someone explain me what is the main purpose of this algorithm for images ?

I would like to tell myself that I can explain everything I study to a random person.


I fully agree with your option: I consider that "to learn about something, you should teach it first". The Haar transform is important at several levels, here are a few ones:

  • As an orthogonal basis, it was thought to provide useful (in some strict mathematical sense) expansions of functions
  • As a 2D dimensional discrete operator, it emulates an oriented singularity detector, allowing to reveal horizontal and vertical orientations
  • As a regularity absorber, it deals well with locally linear variations
  • As a multiscale device, it provides an invertible way of looking at data in a multiresolution power-of-two scheme
  • As an algorithmic tool, it mostly requires adds and subtracts, hence it is very fast and cheap to compute.

On only one level, the result looks as below Haar wavelet decomposition

The original image is reversibly cast to a lower resolution version, and three panels exhibiting singularities. They are quite grayish, showing that locally, pixels don't vary that much, except around edges. And you can iterate this again and again.

For locally smooth images with edges, (opinion) it is the most natural idea to represent, detect and compress information at different levels, with very low cost.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.