PukiWiki contents have been moved into SONOTS Plugin (20070703)

Project: Jpeg2000-like wavelet based codec

Table of Contents


Wavelet-based image coding has gone through significant advancement since the DCT-based codec became the first JPEG standard. In this project, we explore the wavelet-based image coding and examine major factors the affect the coding performance. The Embedded Zero-Tree Wavelet (EZW) codec for image compression is implemented. In addition, Block-based EZW coding is implemented and comparison between different block sizes are performed,


  1. wavelet transform
  2. EZW coding
  3. huffman coding


  1. inverse wavelet transform
  2. EZW decoding
  3. huffman decoding
First Edition: April 2007. Last Modified: April 2007
Tag: Scientific ComputerVision Compression Matlab

Source Codes



matlabPyrTools library was used.


Compress - Decompress

Small Utilities

  • imgread.m - read an image as gray image
  • psnr.m - compute peak signal to noise ratio
  • bytes.m - obtain the number of bytes of an object

Experimental Result

EZW codec


Decoded image at fourth pass, bpp = 0.0387, PSNR = 21.2866 dB.(b) Decoded image at sixth pass, bpp = 0.3179, PSNR = 26.9341 dB .(c) Decoded image at eighth pass, bpp = 1.3424, PSNR = 34.6630 dB .

Block-based EZW codec

Block-EZW with block size 32.

(a) Decoded image at 1st pass, bpp = 0.0658, PSNR = 21.0563 dB .(b) Decoded image at 3rd pass, bpp = 0.4858, PSNR = 27.1965 dB .(c) Decoded image at 5th pass, bpp = 1.7988, PSNR = 34.3224 dB .

Comparison between different block sizes



This tells that EZW encoding is more efficient for larger block, that is, non-Block based default EZW encoding works best.

In the case of JPEG-like codec, it used the DCT transform. In that case, we use the block-based codec to compromise tradeoffs between the spatial resolution and the frequency resolution. However, in the case of wavelet transform, it originally provides an elegant framework in which both anomalies and trends, thus, block-based codec gives no benefit.