0% found this document useful (0 votes)
155 views3 pages

Haar Transform

The Haar transform is a simple energy compression process that transforms vectors into sums and differences of their elements. For a 2D image, it applies this transform to 2x2 pixel blocks, calculating average, horizontal/vertical gradient, and diagonal curvature components. This separates the image into subbands with high-frequency content like edges in some and low-frequency content like average values in others, compressing the visual information.

Uploaded by

Mai Hồng
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
155 views3 pages

Haar Transform

The Haar transform is a simple energy compression process that transforms vectors into sums and differences of their elements. For a 2D image, it applies this transform to 2x2 pixel blocks, calculating average, horizontal/vertical gradient, and diagonal curvature components. This separates the image into subbands with high-frequency content like edges in some and low-frequency content like average values in others, compressing the visual information.

Uploaded by

Mai Hồng
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 3

HAAR TRANSFORM

Probably the simplest useful energy compression process is the Haar transform.
 y  1 y  2 
T

In 1-dimension, this transforms a 2-element vector  x(1) x(2) 


T

into
using:
 y  1   x  1 
  T  (1)
 y  2   x  2 

1 1 1 
T  
where 2  1 1 . Thus y  1 and y  2  are simply the sum and difference of

1
x  1
and x  2  , scaled by 2 to preserve energy.
Note that T is an orthonormal matrix because its row are orthogonal to each other
(their dot products are zero) and they are normalised to unit magnitude. Therefore
T 1  T T (In this case T is symmetric so T T  T ). Hence we may recover x from y
using:
 x  1   y  1 
T 
T
  (2)
 x  2   y  2 

In 2-dimensions x and y become 2x2 matrices. We may transform first the colums
of x , by premultiplying by T , and then the rows of result by post multiplying by
T T . Hence:

y  TxT T (3)

and to invert:
x  T T yT (4)

To show more clearly what is happening:


If
a b 
x 
c d 

then
1a bc d abcd 
y  
2a bcd abcd 

These operations correspond to the following filtering processes


 Top left: a  b  c  d  4-point average or 2-D lowpass (Lo-Lo) filter
 Top right: a  b  c  d  Average horizontal gradient or horizontal highpass
and vertical lowpass (Hi-Lo) filter.
 Lower left: a  b  c  d  Average vertical gradient or horizontal lowpass and
vertical highpass (Lo-Hi) filter.
 Lower right: a  b  c  d  Diagonal curvature or 2-D highpass (Hi-Hi) filter.
To apply this transform to a complete image, we group the pels into 2x2 blocks
and apply (3) to each block. The result (after reordering) is show in Figure 1(b). To
view the result sensibly, we have grouped all the top left components of the 2x2
blocks in y together to form the top left subimage in Figure 1(b), and done the
same for the components in the other 3 positions to form the corresponding other 3
subimages.
It is clear from Figure 1(b) that most of the energy is contained in the top left (Lo-
Lo) subimage and the least energy is in the lower right (Hi-Hi) subimage. Note
how the top right (Hi-Lo) subimage contains the near vertical edges and the lower
left (Lo-Hi) subimage contains the near-horizontal edges.

You might also like