Sie sind auf Seite 1von 14

LOW MEMORY COLOR IMAGE ZERO TREE CODING

ABSTRACT:

This paper presents a zero tree coding method for color

images that uses no lists during encoding and decoding,

permitting the omission of the lists requirement in Said

and Pearlman’s Set Partitioning In Hierarchical Trees

(SPIHT) algorithm [3]. Without the lists, the memory

requirement in a VLSI implementation is reduced

significantly. This coding algorithm is also developed to

reduce the circuit complexity of an implementation. Our

experimental results show only a minor reduction of

PSNR values when compared with the PSNR values

obtained by the SPIHT codec illustrating well the trade-off

between memory requirement and hardware simplicity.


Introduction

Since being introduced by Shapiro [4], the zerotree wavelet image coding

has been a well-recognized image coding method and based on the

zerotree theory several coding algorithms have be developed. SPIHT is

the most significant algorithm because it demonstrates a very sim-ple

and efficient way to code a discrete wavelet transformed (DWT) image.

However, a SPIHT codec needs to main-tain three lists during coding

and decoding to store the co-ordinates of significance coefficients and

subset trees in the sorting order. The three lists become drawbacks for a

hard-ware implementation because a large amount of memory is needed

to maintain these lists. For color image coding the memory demand

increases significantly. For example, for a 512x512 color image, one

single entry of the list needs 18 bits of memory to store the row and

column coordinates. Given that the total number of list entries of a single

color element is approximately twice the total number of coeffi-cients,

the total memory required is 3.375 MBytes 1 and the required memory

will increase if the bit rate increases.


This 118(bits)x512(pixels)x512(lines)x3(colors)x2/8bits/1K/1K =

3.375MB high memory requirement makes SPIHT not a cost effective

compression algorithm for VLSI implementation.In this paper we present

a zerotree coding algorithm for color image coding called Listless

Zerotree Coding (LZC). The advantage of LZC over SPIHT is that no

lists are needed during coding and decoding. Instead, a color co-efficient

only needs a 3-bit flag if the coefficient is in the first wavelet transform

level and a 6-bit flag if it is in any other transform level. Consequently,

the amount of memory that required by a LZC codec is only a fraction of

the amount needed by a SPIHT codec. In common with SPIHT, LZC is a

progressive coding algorithm. The color compo-nents are coded in the

sequence of Y tree, V tree, then U tree, and the coding can stop at any

point to give a precise bit-rate control.

The coding algorithm of LZC is presented in section 2. Advantages of

LZC over other coding algorithms are dis-cussed in section 3. Our

experiments are shown in section 4. Finally, we will conclude this paper

in section 5.

Coding Algorithm

LZC coding algorithm and SPIHT are quite alike. How-ever, since the

usage of lists had been abandoned by LZC, different tree structure and

coding procedure were developed for LZC. The tree symbols of LZC

zero tree are ex-plained as follow.


_ C(i,j) wavelet coefficient at the coordinate (i,j);

_ O(i,j) set of child coefficients of C(i,j), ie. Coefficients

at coordinates (2i,2j), (2i,2j+1), (2i+1,2j), (2i+1,2j+1);

except at the finest transform level (ie. Level 1);

_ D(i,j) set of descendant coefficients of C(i,j), ie. all offsprings of C(i,j);

_ F C (i,j) significant map of coefficient C(i,j);

_ F D (i,j) significant map of set D(i,j);

_ R(i,j) set of root coefficients at LL band.

_ LZC’s zerotree relations adopt Shapiro’s zerotree relation as shown in

Figure 1(a). The positions of significant pixels are encoded by symbol

Cand symbol D. The maps used to indicate the significance of C C and D

D (ie. storing temporary zerotree structure) arefd map and fcfC map, re-

spectively, as shown in Figure 1(b). The size of Fc map is same size as

the image. Whereas the size of FD map is only a quarter of the image

because coefficients in level 1 do not have any descendants. Therefore,

for a 512x512 color image, the total memory required to store zerotree

structure is only 120KBytes (2) for all bit rates. Comparing to the 3.375

MBytes memory requirement for SPIHT, memory requirement for LZC

has been reduced significantly.

LZC algorithm is summarized into two coding proce-dures:

main coding procedure and tree coding procedure.


In both procedures, the function Sn() which is used to iden-tify

significant coefficients or significant sets is defined in following

equation.

Sn(T(I,j))=1 ifany |C(I,j)| E T>=2^n


=0 otherwise
111
lev1 lev2 lev3

The pseudo code of LZC main coding procedure which controls the

coding flows is presented in Figure 2 . The initial value of n

represents the numbers of bits of the largest coefficient among Y, U, and

V components. The initial threshold for LZC coding is then chosen to be

2^n-2 n .In the first run, LZC codec encodes the magnitude, sign, and

position information of coefficients in the range of 2^n-1. To 2^n-2 n .

After that, the number is decreased by one giving threshold 2^n and the

LZC codec then encodes the coefficients in the range of 2 n to 2^n-1 to

2^n , etc. The coding sequences of color components are Y, U, and V.

This is because Y component contains more original image’s information

than U and V do. Also, because most of energy of YUV components is

packed into the lowest frequency subbands (LL bands), coefficients in LL


bands are encoded first before other branch coefficients. The pseudo code

of LZC tree-coding procedure is shown in Figure3. This coding

procedure performs two tasks: coding individual coefficients and coding

zerotree sets. During coding process the codec checks whether a

coefficient.

C(i; j) has been encoded as a significant coefficient or not in the previous

run according to flag map Fc(I,j)C(i; j).If C(i; j) is significant

ie.Fc(I,j)=1) from the previous run, then a refinement bit is output.

Otherwise the codec compares C(i; j) with the current threshold. If C(I,j)

is significant then codec outputs the most significant bit (MSB) and sign

bit of C(i; j) and set the flag map Fc(I,j) to –l. Furthermore, the codec

checks the significance of C(I,j)’s descendant setD(I,j). If map Fd at the

position (I,j)is set to –l- ie.D(i; j) is significant in previous run, then the

LZC codec codes the tree branches in set D(i; j) directly. On the other

hand, if the descendant set Fd(I,j) ) is not significant in the previous run,

the LZC codec then checks the significance of D(I,j) which j) is

significant, then LZC codec sets the mapFd(I,j) ) to -l- partitions D(I,j)

into different tree branches, and codes the partitioned trees. Otherwise the

coding procedure of the current tree branch is accomplished.

Advantages of LZC:

Although Su and Wu’s Embedded Recursive Zerotree (ERZ) coding

scheme [5] was the first algorithm to demonstrate the use of flag maps to
reduce the memory requirement for DWT image coding, there are still

some aspects of ERZ that make it more complicated for hardware

implementation than LZC. Firstly, the representation of ERZ zero tree

symbols is not efficient. At coordinates (i,j) the tree structure of ERZ

algorithm is represented by a tree root C(i,j) and its descendant set

D(i,j).The root C and the set D are further grouped together to form a

spatial tree T(i,j). This tree structure is good only at a very low bit-rate

when C and D are likely to be insignificant so the insignificant tree can

just be coded by a single symbol T. However, at a moderate bit-rate when

C and D are likely to be significant, the symbol T then becomes

redundant. Hence, the bit budget will be wasted in coding the symbol T.

For LZC, the tree only consists of the tree root C and its descendant

set D, as shown previously in Figure 1(a). As a result, this two-symbol

tree representation allows more coefficients to be coded at a higher bit-

rate. In addition, the reduction in the size of the set of tree symbols makes

LZC a simpler coding algorithm so that the hardware implementation of

a LZC codec is simpler than an EZR codec. Secondly, the zero tree

relation of ERZ is not well assigned. In ERZ algorithm, coefficients in

the LL quadrant are considered as isolated tree roots and do not have any

descendant in high frequency bands. Therefore, for a good coding result

the ERZ algorithm requires as few coefficients as possible in the LL

band. This requires the image being coded by ERZ algorithm to be


wavelet transformed to the highest possible dyadic transform level. In

consequence, a more complicated discrete wavelet transform circuit is

needed for high wavelet transform levels. Also, depending on the image

size, there might be few dyadic wavelet transform levels available with

the result that many coefficients may remain in the LL band, resulting in

poor coding results.

By contrast, the LZC algorithm adopts Shapiro’s zero tree relation. That

is, a coefficient in the LL band has one child in each of the high requency

bands, ie. LH, HL and HH. Moreover, a coefficient in a high frequency

band has four children in the same spatial location of the finer trans-form

level. By using this tree relation in LZC, the image can be wavelet

transformed to several levels, leaving many coefficients in LL band, but

the coding results can still be good. Hence, LZC is a better algorithm

than ERZ for im-ages that have relatively few dyadic wavelet transform

lev-els.

In addition, for this tree relation, LZC is better than SPIHT because LZC

does not require the dimension of the frequency bands in the highest

wavelet transform level to be even, whereas SPIHT needs even size

frequency bands in the highest transform level. Therefore, when coding

QCIF (quarter common intermediate format) video frames, the


size of chrominance frames needs to be adjusted to allow even size

frequency bands in the highest transform level [2].As a result, additional

circuits are needed by a SPIHT codec for the image size adjustment.

Also, the coding procedure of SPIHT is divided into sort-ing pass and

refinement pass. The control flow of switching between these two passes

can be easily done by software, but not so easy for hardware

implementation. Therefore, in LZC the sorting pass and refinement pass

were merged into just one single pass which in turns results in a simpler

control flow implementation than SPIHT.

Procedure Main Encoding

Step 1:
for all Y, U, and V components
output n =|log (max(I,j)|C(I,j)|;
for all (i,j) set
C(i,j) = 0 and  D(i,j) = 0;
F F

Step 2:
for all Y, U, and V components
for all C(i,j)  R(i,j) do
2

if  C(i,j) = 1 then
F

output the nth significant of |C(i,j)|;
else
output  n(C(i,j));
S

if  n(C(i,j)) = 1 then
S

output the sign of C(i,j)
and set  C(i,j) = 1;
F

Step 3:
for all Y, U, and V components
for all D(i,j) E  R(i,j) do 2

if  D(i,j) = 1 then
F

for each C(k,l) E O(i,j)
EncodeTree(k,l,n,level);
!

else
output  n(D(i,j));
S

if  n(D(i,j)) = 1 then
S

set  D(i,j) = 1;
F

for each C(k,l) E O(i,j)
EncodeTree(k,l,n,level);
!

Step 4:
decrease n by 1;
go back to Step 2;
End
if  D(i,j) = 1 then
F

if  C(i,j) = 1 then
F

output the nth significant bit
of |C(i,j)|;
else
output  n(C(i,j));
S

if  n(C(i,j)) = 1 then
S

output the sign of C(i,j) and
set  C(i,j) = 1;
F

for each C(k,l) E O(i,j)
!EncodeTree(k,l,n,level­1);
else
if  C(i,j) = 1 then
F

output the nth significant bit
of |C(i,j)|;
output  n(D(i,j));
S

if  n(D(i,j)) = 1 then
S

set  D(i,j) = 1;
F

for each C(k,l)E O(i,j)
!EncodeTree(k,l,n,level­1);
else
output  n(C(i,j));
S

if  n(C(i,j)) = 1 then
S

output the sign of C(i,j) and
set  C(i,j) = 1;
F

for each C(k,l)E O(i,j)
!EncodeTree(k,l,n,level­1);
End
Experimental Results

Our test LZC codec was written in ANSI C. The wavelet filter used in the

test is the Daubechies’ 9/7 filter [1]. The color images are transformed to

YUV color space before coding. After LZC, the bit-stream is further

arithmetic coded using Witten, Neal and Cleary’s method [6].The wavelet

transform level varies from image to image, de-pending on their sizes.

The MSE is mean-square-error and is obtained the following equation.


In Equation 3, N is the lines of an image, and M is the number of pixels

per line. The function f and the function ~ f represent the original image

and the reconstructed image, respectively.

PSNR results are particularly lower than SPIHT’s, but for some images

the differences are getting closer as the bit-rate increasing. At high bit-

rates, in some cases LZC’s results are very close to SPIHT’s or even

better. The average difference of LZC’s results is about 0.7 db lower than

SPIHT’s.

The coding results might can be improved by some de-liberated color

coding sequences, instead of Y, U, and V sequence. For example, some

times V component appears to be more important than U component, but

since V is en-coded after U, important information maybe discarded at

the end of coding. Therefore, by adding additional operation into the

main coding procedure to decide the coding sequence of U and V

components, the LZC coding results might can be improved.


Conclusion

Although our LZC algorithms a very hardware oriented algorithm, the

PSNR values from software implementation are only slightly lower than

the SPIHT’s results, and in some case our results are slightly better than

SPIHT’s. Also, the visual quality of the LZC coded images is comparable

to SPIHT’s - that is, rather good for such a simple algorithm. This is the

trade off between slightly better PSNR values of coded images and the

reduced amount of memory and circuits in hardware implementation.

Das könnte Ihnen auch gefallen