Embedded Zero Tree Wavelet Coding
Embedded Zero Tree Wavelet Coding
Overview
EZW
Definition Zero tree Coding of Wavelet Coefficients EZW Basic Concepts EZW Algorithms EZW Example Limitations Conclusion References Q & A
Two-fold problem
Obtaining best image quality for a given bit rate Accomplishing this task in an embedded fashion
A simple, yet remarkable effective, image compression algorithm, having the property that the bits in the bit stream are generated in order of importance, giving a fully embedded (progressive) code. The compressed data stream can have any bit rate desired. Any bit rate is only possible if there is information loss somewhere so that the compressor is lossy. However, lossless compression is also possible with less spectacular results.
E The EZW encoder is based on progressive encoding. Progressive encoding is also known as embedded encoding Z A data structure called zero-tree is used in EZW algorithm to encode the data W The EZW encoder is specially designed to use with wavelet transform. It was originally designed to operate on images (2-D signals)
frequency information
631 544 86 10 -7 29 55 -54 730 655 -13 30 -12 44 41 32 19 23 37 17 -4 13 -13 39 25 -49 32 -4 9 -23 -17 -35
32 -10 56 -22 -7 -25 40 -10 6 34 -44 4 13 -12 21 24 -12 -2 -8 -24 -42 9 -21 45
We can set a threshold T, if the wavelet coefficient is larger than T, then encode it as 1, otherwise we code it as 0. 1 will be reconstructed as T (or a number larger than T) and 0 will be reconstructed as 0. We then decrease T to a lower value, repeat 1 and 2. So we get finer and finer reconstructed data.
The actual implementation of EZA algorithm should consider : 1. What should we do to the sign of the coefficients. (positive or negative) ? answer: use POS and NEG 2. Can we code the 0s more efficiently? -- answer: zero-tree 3. How to decide the threshold T and how to reconstruct? answer: see the algorithm
The definition of the zero-tree: There are coefficients in different subbands that represent the same spatial location in the image and this spatial relation can be depicted by a quad tree except for the root node at top left corner representing the DC coeeficient which only has three children nodes. Zero-tree Hypothesis
If a wavelet coefficient c at a coarse scale is insignificant with respect to a given threshold T, i.e. |c|<T then all wavelet coefficients of the same orientation at finer scales are also likely to be insignificant with respect to T.
First
step: The DWT of the entire 2-D image will be computed by FWT Second step: Progressively EZW encodes the coefficients by decreasing the threshold Third step: Arithmetic coding is used to entropy code the symbols
In the dominant_pass
All the coefficients are scanned in a special order If the coefficient is a zero tree root, it will be encoded as ZTR. All its descendants dont need to be encoded they will be reconstructed as zero at this threshold level If the coefficient itself is insignificant but one of its descendants is significant, it is encoded as IZ (isolated zero). If the coefficient is significant then it is encoded as POS (positive) or NEG (negative) depends on its sign.
This encoding of the zero tree produces significant compression because gray level images resulting from natural sources typically result in DWTs with many ZTR symbols. Each ZTR indicates that no more bits are needed for encoding the descendants of the corresponding coefficient
all the coefficients that are in absolute value larger than the current threshold are extracted and placed without their sign on the subordinate list and their positions in the image are filled with zeroes. This will prevent them from being coded again. All the values in the subordinate list are refined. this gives rise to some juggling with uncertainty intervals and it outputs next most significant bit of all the coefficients in the subordinate list.
In the subordinate_pass
The initial threshold is 32 and the result from the dominant_pass is shown in the figure
63 POS -31 IZ 15 ZTR -9 ZTR --5 -34 NEG 23 ZTR 14 IZ -7 ZTR 9 49 POS 14 ZTR 3 10 ZTR -13 ZTR -12 7 IZ 3 IZ 5 13 IZ 4 IZ -7 -12 7
-1
-14
-2
-1 IZ -3 IZ 6
47 POS 2 IZ -4
-2
-2
-3
11
-4
The significant coefficients are put in a subordinate list and are refined. A one-bit symbol is output to the decoder.
63 1 56
sign 0
34 0 40
32 1 16 1 8 ? 4 ?
49 1 56
2 ? 1 ?
47 0 40
If T+.5T is less than data item take the average of 2T and 1.5T. So 63 will be reconstructed as the average of 48 and 64 which is 56. If it is more, put a 0 in the code and encode this as t+.5T+.25T. Thus, 34 is reconstructed as 40.
* -31 15 -9
* 23 14 -7
* 14 3 -14
10 -13 -12 8
7 3 5 4
13 4 -7 -2
-12 6 3 3
7 -1 9 2
--5
3 2 5
9
0 -3 11
-1
-3 6 5
*
2 -4 6
4
3 3 0
6
-2 6 3
-2
0 3 -4
2
4 6 4
After dominant_pass, the significant coefficients will be replaced by * or 0 Then the threshold is divided by 2, so we have 16 as current threshold
IZ, ZTR, NEG, POS, IZ,IZ, IZ, IZ, IZ, IZ, IZ, IZ
The significant coefficients are put in the subordinate list and all data in this list will be refined as:
63 1 60
34 0 36
49 0 52
47 1 44
31 1 28
23 0 20
The computatin is now extended with respect to the next significant bit. So 63 will be reconstructed as the average of 56 and 64 - 60!
21
bad
It is not possible to encode sub-images because the entire image must be transformed before the encoding can start. EZW algorithm is computational expensive
Properties
Producing a fully embedded bit stream Providing competitive compression performance
Features
Discrete wavelet transform Zerotree coding of wavelet coefficients Successive-approximation quantization (SAQ) Adaptive arithmetic coding
Advantages
Precise rate control No training of any kind required
1. E. H. Adelson, E. Simoncelli, and R. Hingorani, Orthogonal pyramid transforms for image coding, Proc. SPIE, vol.845, Cambridge, MA, Oct. 1987, pp. 50-58 2. S. Mallat, A theory for multiresolution signal decomposition: The wavelet representation, IEEE Trans. Pattern Anal. Mach. Intell., vol. 11, pp. 674-693, July 1989 3. I. H. Witten, R. Neal, and J. G. Cleary, Arithmetic coding for data compression, Comm. ACM, vol. 30, pp. 520-540, June 1987 4. J. Shapiro, Embedded image coding using zerotrees of wavelet coefficients, IEEE Trans. Signal Processing., vol. 41, pp. 3445-3462, Dec. 1993