Another method is to simply prepend the Huffman tree, bit by bit, to the output stream. For example, assuming that the value of 0 represents a parent node and 1 a leaf node, whenever the latter is encountered the tree building routine simply reads the next 8 bits to determine the character value of that particular leaf. The process continues recursively until the last leaf node is reached; at that point, the Huffman tree will thus be faithfully reconstructed. The overhead using such a method ranges from roughly 2 to bytes assuming an 8-bit alphabet.

Author:Kisho Sakinos
Language:English (Spanish)
Published (Last):20 April 2007
PDF File Size:16.90 Mb
ePub File Size:18.2 Mb
Price:Free* [*Free Regsitration Required]

The Fast Lifting Wavelet Transform 1. Shapiro [Sha93]. The reason for this is that I have never come across a good explanation of this technique, yet many researchers claim that they have implemented it. Since I think that the approach of EZW encoding is a fruitful one see for instance [Cre97] I have decided to present the details here.

This might save others some work in the future. This text expects some understanding of wavelet transforms. An EZW encoder is an encoder specially designed to use with wavelet transforms, which explains why it has the word wavelet in its name. The EZW encoder was originally designed to operate on images 2D-signals but it can also be used on other dimensional signals.

The EZW encoder is based on progressive encoding to compress an image into a bit stream with increasing accuracy. This means that when more bits are added to the stream, the decoded image will contain more detail, a property similar to JPEG encoded images. It is also similar to the representation of a number like pi. Every digit we add increases the accuracy of the number, but we can stop at any accuracy we like. Progressive encoding is also known as embedded encoding, which explains the E in EZW.

This leaves us with the Z. This letter is a bit more complicated to explain, but I will give it a try in the next paragraph. Coding an image using the EZW scheme, together with some optimizations results in a remarkably effective image compressor with the property that 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 an EZW encoder, but of course with less spectacular results. The zerotree The EZW encoder is based on two important observations: Natural images in general have a low pass spectrum. When an image is wavelet transformed the energy in the subbands decreases as the scale decreases low scale means high resolution , so the wavelet coefficients will, on average, be smaller in the higher subbands than in the lower subbands.

This shows that progressive encoding is a very natural choice for compressing wavelet transformed images, since the higher subbands only add detail; Large wavelet coefficients are more important than small wavelet coefficients.

These two observations are exploited by encoding the wavelet coefficients in decreasing order, in several passes. For every pass a threshold is chosen against which all the wavelet coefficients are measured. If a wavelet coefficient is larger than the threshold it is encoded and removed from the image, if it is smaller it is left for the next pass.

When all the wavelet coefficients have been visited the threshold is lowered and the image is scanned again to add more detail to the already encoded image. This process is repeated until all the wavelet coefficients have been encoded completely or another criterion has been satisfied maximum bit rate for instance.

The trick is now to use the dependency between the wavelet coefficients across different scales to efficiently encode large parts of the image which are below the current threshold. It is here where the zerotree enters. So, let me now add some detail to the foregoing. As most explanations, this explanation is a progressive one. A wavelet transform transforms a signal from the time domain to the joint time-scale domain. This means that the wavelet coefficients are two-dimensional.

If we want to compress the transformed signal we have to code not only the coefficient values, but also their position in time. When the signal is an image then the position in time is better expressed as the position in space. After wavelet transforming an image we can represent it using trees because of the subsampling that is performed in the transform.

A coefficient in a low subband can be thought of as having four descendants in the next higher subband see figure 1. The four descendants each also have four descendants in the next higher subband and we see a quad-tree emerge: every root has four leafs. Figure 1. The relations between wavelet coefficients in different subbands as quad-trees.

We can now give a definition of the zerotree. A zerotree is a quad-tree of which all nodes are equal to or smaller than the root. The tree is coded with a single symbol and reconstructed by the decoder as a quad-tree filled with zeroes. To clutter this definition we have to add that the root has to be smaller than the threshold against which the wavelet coefficients are currently being measured.

The EZW encoder exploits the zerotree based on the observation that wavelet coefficients decrease with scale. It assumes that there will be a very high probability that all the coefficients in a quad tree will be smaller than a certain threshold if the root is smaller than this threshold. If this is the case then the whole tree can be coded with a single zerotree symbol.

Now if the image is scanned in a predefined order, going from high scale to low, implicitly many positions are coded through the use of zerotree symbols. Of course the zerotree rule will be violated often, but as it turns out in practice, the probability is still very high in general. The price to pay is the addition of the zerotree symbol to our code alphabet. How does it work?

Now that we have all the terms defined we can start compressing. A very direct approach is to simply transmit the values of the coefficients in decreasing order, but this is not very efficient. This way a lot of bits are spend on the coefficient values and we do not use the fact that we know that the coefficients are in decreasing order.

A better approach is to use a threshold and only signal to the decoder if the values are larger or smaller than the threshold. If we also transmit the threshold to the decoder, it can reconstruct already quite a lot. To arrive at a perfect reconstruction we repeat the process after lowering the threshold, until the threshold has become smaller than the smallest coefficient we wanted to transmit. We can make this process much more efficient by subtracting the threshold from the values that were larger than the threshold.

This results in a bit stream with increasing accuracy and which can be perfectly reconstructed by the decoder. If we use a predetermined sequence of thresholds then we do not have to transmit them to the decoder and thus save us some bandwidth. If the predetermined sequence is a sequence of powers of two it is called bitplane coding since the thresholds in this case correspond to the bits in the binary representation of the coefficients. EZW encoding as described in [Sha93] uses this type of coefficient value encoding.

One important thing is however still missing: the transmission of the coefficient positions. Indeed, without this information the decoder will not be able to reconstruct the encoded signal although it can perfectly reconstruct the transmitted bit stream.

It is in the encoding of the positions where the efficient encoders are separated from the inefficient ones. As mentioned before, EZW encoding uses a predefined scan order to encode the position of the wavelet coefficients see figure 2.

Through the use of zerotrees many positions are encoded implicitly. Several scan orders are possible see figure 3 , as long as the lower subbands are completely scanned before going on to the higher subbands. In [Sha93] a raster scan order is used, while in [Alg95] some other scan orders are mentioned. The scan order seems to be of some influence of the final compression result.

Figure 2. The relations between wavelet coefficients in different subbands left , how to scan them upper right and the result of using zerotree lower right symbols T in the coding process. An H means that the coefficient is higher than the threshold and an L means that it is below the threshold. Now that we know how the EZW scheme codes coefficient values and positions we can go on to the algorithm.

The algorithm The EZW output stream will have to start with some information to synchronize the decoder. The minimum information required by the decoder is the number of wavelet transform levels used and the initial threshold, if we assume that always the same wavelet transform will be used. Additionally we can send the image dimensions and the image mean. Sending the image mean is useful if we remove it from the image before coding.

After imperfect reconstruction the decoder can then replace the imperfect mean by the original mean. This can increase the PSNR significantly. The first step in the EZW coding algorithm is to determine the initial threshold. If we adopt bitplane coding then our initial threshold t0 will be Here MAX. In the first pass, the dominant pass, the image is scanned and a symbol is outputted for every coefficient. If the coefficient is larger than the threshold a P positive is coded, if the coefficient is smaller than minus the threshold an N negative is coded.

If the coefficient is the root of a zerotree then a T zerotree is coded and finally, if the coefficient is smaller than the threshold but it is not the root of a zerotree, then a Z isolated zero is coded. This happens when there is a coefficient larger than the threshold in the subtree. The effect of using the N and P codes is that when a coefficient is found to be larger than the threshold in absolute value or magnitude its two most significant bits are outputted if we forget about sign extension.

Note that in order to determine if a coefficient is the root of a zerotree or an isolated zero, we will have to scan the whole quad-tree. Clearly this will take time. Also, to prevent outputting codes for coefficients in already identified zerotrees we will have to keep track of them. This means memory for book keeping. Finally, 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. The second pass, the subordinate pass, is the refinement pass. In [Sha93] this gives rise to some juggling with uncertainty intervals, but it boils down to outputting the next most significant bit of all the coefficients on the subordinate list.

In [Sha93] this list is ordered in such a way that the decoder can do the same so that the largest coefficients are again transmitted first.

Based on [Alg95] we have not implemented this sorting here since the gain seems to be very small but the costs very high. The main loop ends when the threshold reaches a minimum value. For integer coefficients this minimum value equals zero and the divide by two can be replaced by a shift right operation.

If we add another ending condition based on the number of outputted bits by the arithmetic coder then we can meet any target bit rate exactly without doing too much work.


Embedded Zerotrees of Wavelet transforms

Resources and Help Embedded image coding using zerotrees of wavelet coefficients Abstract: The embedded zerotree wavelet algorithm EZW is a simple, yet remarkably effective, image compression algorithm, having the property that the bits in the bit stream are generated in order of importance, yielding a fully embedded code. The embedded code represents a sequence of binary decisions that distinguish an image from the "null" image. Using an embedded coding algorithm, an encoder can terminate the encoding at any point thereby allowing a target rate or target distortion metric to be met exactly. Also, given a bit stream, the decoder can cease decoding at any point in the bit stream and still produce exactly the same image that would have been encoded at the bit rate corresponding to the truncated bit stream. In addition to producing a fully embedded bit stream, the EZW consistently produces compression results that are competitive with virtually all known compression algorithms on standard test images. Yet this performance is achieved with a technique that requires absolutely no training, no pre-stored tables or codebooks, and requires no prior knowledge of the image source.

FAX L250_EUM_122 31 41 PDF

EZW Encoding

Mauzuru The compression algorithm consists of a number of iterations through a dominant pass and a subordinate passthe threshold is updated reduced by a factor of two after each iteration. Using this scanning on EZW transform is to perform scanning the coefficients in such way that no child node is scanned before its parent node. The children of a coefficient are only scanned if the coefficient was found to be significant, or if the coefficient was an isolated zero. This method will code a bit for each coefficient that is not yet be seen as significant. The symbols may be thus represented by two binary bits. Shapiro inenables scalable image transmission and decoding.

Related Articles