<?xml version="1.0" encoding="utf-8" standalone="no"?>
<!DOCTYPE document PUBLIC "-//CNX//DTD CNXML 0.5 plus MathML//EN" "http://cnx.rice.edu/cnxml/0.5/DTD/cnxml_mathml.dtd">
<document xmlns="http://cnx.rice.edu/cnxml" xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" id="m11089">
  
  <name xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">The Multi-level Haar Transform</name>
  
  <metadata xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">
  <md:version xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">2.3</md:version>
  <md:created xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">2003/03/26</md:created>
  <md:revised xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">2003/04/28</md:revised>
  <md:authorlist xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">
      <md:author xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" id="ngk">
      <md:firstname xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">Nick</md:firstname>
      
      <md:surname xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">Kingsbury</md:surname>
      <md:email xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">ngk10@cam.ac.uk</md:email>
    </md:author>
  </md:authorlist>

  <md:maintainerlist xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">
    <md:maintainer xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" id="liqun">
      <md:firstname xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">Liqun</md:firstname>
      
      <md:surname xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">Wang</md:surname>
      <md:email xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">liqun@rice.edu</md:email>
    </md:maintainer>
    <md:maintainer xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" id="ngk">
      <md:firstname xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">Nick</md:firstname>
      
      <md:surname xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">Kingsbury</md:surname>
      <md:email xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">ngk10@cam.ac.uk</md:email>
    </md:maintainer>
  </md:maintainerlist>
  
  <md:keywordlist xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">
    <md:keyword xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">Haar Transform</md:keyword>
    <md:keyword xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">Multi-level</md:keyword>
  </md:keywordlist>

  <md:abstract xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">This module introduces the multi-level Haar transform.</md:abstract>
</metadata>

  <content xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">
    <para xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" id="para1">
      (a) of <cnxn xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" target="figure7" strength="7"/> shows the result of
      applying the Haar transform to the Lo-Lo subimage of this previous <cnxn xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" document="m11087" target="figure1b" strength="7">figure</cnxn> and <cnxn xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" target="figure8" strength="7"/> shows the probabilities 
      <m:math>
	<m:ci>
	  <m:msub><m:mi>p</m:mi><m:mi>i</m:mi></m:msub>
	</m:ci>
      </m:math> and entropies 
      <m:math>
	<m:ci>
	  <m:msub><m:mi>h</m:mi><m:mi>i</m:mi></m:msub>
	</m:ci>
      </m:math> for the 4 new subimages.
    </para>

    <para xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" id="para2">
      The level 2 column of the figure <cnxn xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" document="m11088" target="figure6" strength="7">Cumulative Entropies of Subimages for Qstep=15</cnxn> shows how the total bit rate can be reduced by
      transforming the level 1 Lo-Lo subimage into four level 2
      subimages. The process can be repeated by transforming the final
      Lo-Lo subimage again and again, giving the subimages in (b) of
      <cnxn xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" target="figure7" strength="7"/> and (c) of <cnxn xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" target="figure7" strength="7"/> and the histograms in <cnxn xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" target="figure9" strength="7"/> and <cnxn xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" target="figure10" strength="7"/>. The levels 3 and 4 columns of  the figure <cnxn xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" document="m11088" target="figure6" strength="7">Cumulative Entropies of Subimages for Qstep=15</cnxn>  show that little
      is gained by transforming to more than 4 levels.
    </para>

    <para xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" id="para3">
      <emphasis xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">However a total compression ratio of 4 bit/pel : 1.61
      bit/pel = 2.45 : 1 has been achieved (in theory).</emphasis>
    </para>

    <figure xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" id="figure7">
      <media xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" type="image/png" src="figure7.png"/>
      <caption xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">
	Levels 2(a), 3(b), and 4(c) Haar transforms of Lenna; and at
	all of levels 1 to 4(d).
      </caption>
    </figure>

    <figure xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" id="figure8">
      <media xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" type="image/png" src="figure8.png"/>
      <caption xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">
	The probabilities 
	<m:math>
	  <m:ci>
	    <m:msub><m:mi>p</m:mi><m:mi>i</m:mi></m:msub>
	  </m:ci>
	</m:math> and entropies 
	<m:math>
	  <m:ci>
	    <m:msub><m:mi>h</m:mi><m:mi>i</m:mi></m:msub>
	  </m:ci>
	</m:math> for the 4 subimages at level 2.
      </caption>
    </figure>
    
    <figure xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" id="figure9">
      <media xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" type="image/png" src="figure9.png"/>
      <caption xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">
	The probabilities 
	<m:math>
	  <m:ci>
	    <m:msub><m:mi>p</m:mi><m:mi>i</m:mi></m:msub>
	  </m:ci>
	</m:math> and entropies 
	<m:math>
	  <m:ci>
	    <m:msub><m:mi>h</m:mi><m:mi>i</m:mi></m:msub>
	  </m:ci>
	</m:math> for the 4 subimages at level 3.
      </caption>
    </figure>

     <figure xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" id="figure10">
      <media xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" type="image/png" src="figure10.png"/>
      <caption xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">
	The probabilities 
	<m:math>
	  <m:ci>
	    <m:msub><m:mi>p</m:mi><m:mi>i</m:mi></m:msub>
	  </m:ci>
	</m:math> and entropies 
	<m:math>
	  <m:ci>
	    <m:msub><m:mi>h</m:mi><m:mi>i</m:mi></m:msub>
	  </m:ci>
	</m:math> for the 4 subimages at level 4.
      </caption>
    </figure>

    <figure xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" id="figure11">
      <media xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" type="image/png" src="figure11.png"/>
      <caption xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">
	Images reconstructed from (a) the original Lenna, and (b) the
	4-level Haar transform, each quantised with 
	<m:math>
	  <m:apply>
	    <m:eq/>
	    <m:ci>
	      <m:msub><m:mi>Q</m:mi><m:mi>step</m:mi></m:msub>
	    </m:ci>
	    <m:cn>15</m:cn>
	  </m:apply>
	</m:math>. The rms error of (a) = 4.3513, and of (b) = 3.5343.
      </caption>
    </figure>

    <para xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" id="para6">
      Note the following features of the 4-level Haar transform:

      <list xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" id="list1">
	<item xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">
	  (d) of <cnxn xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" target="figure7" strength="7"/> shows the
	  subimages from all 4 levels of the transform and illustrates
	  the transform's <emphasis xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">multi-scale</emphasis> nature. It
	  also shows that all the subimages occupy the same total area
	  as the original and hence that the total number of transform
	  output samples (coefficients) equals the number of input
	  pels - there is <emphasis xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">no redundancy</emphasis>.
	</item>

	<item xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">
	  From the Lo-Lo subimage histograms of the figure 
	  <cnxn xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" document="m11088" target="figure5" strength="7">Haar Transform, Level 1 energies, and entropies for Qstep=15</cnxn>, 
	  <cnxn xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" target="figure8" strength="7"/>,
	  <cnxn xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" target="figure9" strength="7"/> and 
	  <cnxn xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" target="figure10" strength="7"/>, we see the
	  magnitudes of the Lo-Lo subimage samples increasing with
	  transform level. This is because energy is being conserved
	  and most of it is being concentrated in fewer and fewer
	  Lo-Lo samples. (The DC gain of the Lo-Lo filter of this previous <cnxn xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" document="m11087" target="eq4a" strength="7">equation</cnxn> is 2.)
	</item>

	<item xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">
	  We may reconstruct the image from the transform samples ((d)
	  of <cnxn xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" target="figure7" strength="7"/>), quantised to 
	  <m:math>
	    <m:apply>
	      <m:eq/>
	      <m:ci>
		<m:msub><m:mi>Q</m:mi><m:mi>step</m:mi></m:msub>
	      </m:ci>
	      <m:cn>15</m:cn>
	    </m:apply>
	  </m:math>, by inverting the transform, using the right hand part of this
	  <cnxn xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" document="m11087" target="eq4b" strength="7">equation</cnxn>. We then get
	  the image in (b) of <cnxn xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" target="figure11" strength="7"/>. Contrast this with (a) of <cnxn xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" target="figure11" strength="7"/>, obtained by quantising the pels of the
	  original directly to 
	  <m:math>
	    <m:apply>
	      <m:eq/>
	      <m:ci>
		<m:msub><m:mi>Q</m:mi><m:mi>step</m:mi></m:msub>
	      </m:ci>
	      <m:cn>15</m:cn>
	    </m:apply>
	  </m:math>, in which contour artifacts are much more
	  visible. Thus the transform provides improved subjective
	  quality as well as significant data compression. The
	  improved quality arises mainly from the high amplitude of
	  the low frequency transform samples, which means that they
	  are quantised to many more levels than the basic pels would
	  be for a given 
	  <m:math>
	    <m:ci>
	      <m:msub><m:mi>Q</m:mi><m:mi>step</m:mi></m:msub>
	    </m:ci>
	  </m:math>.
	</item>
	
	<item xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">
	  If 
	  <m:math>
	    <m:ci>
	      <m:msub><m:mi>Q</m:mi><m:mi>step</m:mi></m:msub>
	    </m:ci>
	  </m:math> is doubled to 30, then the entropies of all the
	  subimages are reduced as shown in <cnxn xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" target="figure12" strength="7"/> (compare this with the figure, <cnxn xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" document="m11088" target="figure6" strength="7">Cumulative Entropies of Subimages for Qstep=15</cnxn> in which 
	  <m:math>
	    <m:apply>
	      <m:eq/>
	      <m:ci>
		<m:msub><m:mi>Q</m:mi><m:mi>step</m:mi></m:msub>
	      </m:ci>
	      <m:cn>15</m:cn>
	    </m:apply>
	  </m:math>). The mean bit rate with the 4-level Haar
	  transform drops from 1.61 to 0.97 bit/pel. However the
	  reconstructed image quality drops to that shown in (b) of
	  <cnxn xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" target="figure13" strength="7"/>. For comparison, (a)
	  of <cnxn xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" target="figure13" strength="7"/> shows the quality
	  if <m:math><m:ci>x</m:ci></m:math> is directly quantised
	  with 
	  <m:math>
	    <m:apply>
	      <m:eq/>
	      <m:ci>
		<m:msub><m:mi>Q</m:mi><m:mi>step</m:mi></m:msub>
	      </m:ci>
	      <m:cn>30</m:cn>
	    </m:apply>
	  </m:math>.
	</item>
      </list>
    </para>
    
    <figure xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" id="figure12">
      <media xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" type="image/png" src="figure12.png"/>
      <caption xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">
	Mean bit rate for the original Lenna image and for the Haar
	transforms of the image after 1 to 4 levels, using a quantiser
	step size 
	<m:math>
	  <m:apply>
	    <m:eq/>
	    <m:ci>
	      <m:msub><m:mi>Q</m:mi><m:mi>step</m:mi></m:msub>
	    </m:ci>
	    <m:cn>30</m:cn>
	  </m:apply>
	</m:math>. 
      </caption>
    </figure>
    
    <figure xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" id="figure13">
      <media xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" type="image/png" src="figure13.png"/>
      <caption xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/">
	Images reconstructed from (a) the original Lenna, and (b) the
	4-level Haar transform, each quantised with 
	<m:math>
	  <m:apply>
	    <m:eq/>
	    <m:ci>
	      <m:msub><m:mi>Q</m:mi><m:mi>step</m:mi></m:msub>
	    </m:ci>
	    <m:cn>30</m:cn>
	  </m:apply>
	</m:math>. The rms error of (a) = 8.6219, and of (b) = 5.8781.
      </caption>
    </figure>


  </content>
  
</document>
