Cellular Automata Based Encoding Technique for ... - Springer Link

3 downloads 0 Views 266KB Size Report
Shibpur, Howrah, India, 711103 [email protected]. Abstract. This paper reports cellular automata (CA) based efficient encoding technique for wavelet ...
Cellular Automata Based Encoding Technique for Wavelet Transformed Data Targeting Still Image Compression Chandrama Shaw1 , Sukanta Das1 , and Biplab K. Sikdar2 1

Dept. of Information Technology, Bengal Engineering & Sc. University, Shibpur, Howrah, India, 711103 {cshaw, sukanta}@it.becs.ac.in 2 Dept. of Computer Sc. & Technology, Bengal Engineering & Sc. University, Shibpur, Howrah, India, 711103 [email protected]

Abstract. This paper reports cellular automata (CA) based efficient encoding technique for wavelet transformed data of still image. The encoding technique handles wavelet coefficients, in transformed domain, and then simulates different classes of transforms with the introduction of CA framework. It ideally suits for low cost implementation of the compression technology for still images. Reported experimental results establish the effectiveness of the proposed scheme.

1

Introduction

The standard methods of lossy compression for still images in frequency domain employ Discrete Cosine Transform [2] and Karhunen-Loeve Transform. Other notable schemes are the Wavelet Transform [3], Pyramid Decomposition and Iterated Function System. Different classes of Cellular Automata (CA) transforms have also been proposed. However, such transforms [6] are highly complex in nature and are obtained through experimentations. The above scenarios motivate us to design a CA based Vector Quantization (VQ) [5] model for still image compression. The images are taken from the specific domains such as human face, brain MRI, etc. The proposed scheme employs Wavelet Transform and subsequently generates codebook with the help of a CA based clustering model. It ensures effective implementation and searching of codebook. The scheme can also be effective for video telephony to facilitate on-line applications. The basics of CA technology are introduced next.

2

Cellular Automata

An 1-dimensional Cellular Automaton (CA) consists of a number of cells [4]. In 3neighborhood, the next state of ith cell is assumed to be qi (t+1)= f (qi−1 (t), qi (t), 

This work is supported by the sponsored CA Research Projects, Department of CST, Bengal Engineering & Science University, Shibpur, India.

S. El Yacoubi, B. Chopard, and S. Bandini (Eds.): ACRI 2006, LNCS 4173, pp. 141–146, 2006. c Springer-Verlag Berlin Heidelberg 2006 

142

C. Shaw, S. Das, and B.K. Sikdar 10001

01001

10010

10011

10000

11000

01000

01010

11011

01011

00001

00000

11001

00010

00011

11010

(0) 10100

(3) 10101

10110

01100

11100

01101

00101

00100

11101

(4)

10111

01110

11111

01111

00110

00111

11110

(7)

Fig. 1. State transition diagram of a 5-cell MACA < 102, 60, 204, 204, 170 >

qi+1 (t)), where qi (t) represents the state of the ith cell at tth instant of time. ‘f ’ is the next state function - that is, the rule Ri of the automata [1]. An n-cell CA is designated by the R =< R1 , R2 , · · · , Ri , · · · , Rn >. The proposed CA based model for VQ employs Multiple Attractor Cellular Automata (MACA) [4]. The state transition graph of an MACA consists of cyclic and non-cyclic states. The non-cyclic states form trees rooted at the cyclic states (attractors). The 5-cell MACA of Fig.1 having four attractors {00000(0), 00011(3), 00100(4), 00111(7)}. The states rooted at α forms the α-basin (attractor basin). Theorem 1. In an n-cell MACA with k = 2m attractors, there exists m-bit positions at which the attractors generate pseudo-exhaustive 2m patterns [4]. The modulo-2 sum of two states is a predecessor of 0-state (pattern with all 0s) iff the two states lie in the same attractor basin. Let consider the two states {01010, 01011} of 00011-basin (Fig.1). The module-2 sum of the two states is {00001}∈ ˜ falls 0-basin. Hence, if P & P˜ belong to the same basin, the pattern P  (= P ⊕ P) ˜ The distribution in the 0-basin. P  is the hamming distance (HD) of P & P. of patterns shows that the 0-basin has a definite bias for patterns with lesser weight (the presence of number of 1s in them) [8]. Fig.2 depicts the Expected Occurrence (EO) of a pattern, with weight (w), in the 0-basin. It establishes that (i) the value of EO decreases monotonically with the weight, (ii) a basin contains patterns with low HD, and (iii) pattern pairs with low HD have the high probability of getting covered by a few number of attractor basins. These properties of MACA are exploited in the current design.

3

CA Based Model of Vector Quantization

A vector quantizer Q of dimension l and size M is a mapping from Rl into a finite set C containing M reproduction points, called the code vectors. That is, Q : Rl → C, where C = {c1 , · · · , cM }, c1 · · · , cM ∈ Rl . The set C is called the codebook. For the current application, a codebook is generated from the transformed data obtained after Wavelet transformation. We employ the MACA based clustering model for designing such a codebook. Each code vector can be viewed as the centroid or representative of a cluster.

CA Based Encoding Technique for Wavelet Transformed Data

143

Fig. 2. Expected distribution of patterns in 0-basin of an MACA with n =30

A VQ method consists of an encoder and a decoder [9]. The CA based model [9] addresses the difficulties of generating the codebook from the training set and the high processing overhead at encoding stage. Rather than developing general compression scheme, we concentrate on developing codebook for a specific class of data, that is, still image data on human face. To reduce processing overhead, we introduce MACA based hierarchical clustering algorithm [5]. Design of training set: The bands (LL, LH, HL, HH) of Wavelet coefficients [3] for the input image form the training set. The steps are: Algorithm 1. Training Set Generation Input: Set of n images Output: The training set for different bands Step 1: Transform input image with Wavelet transform at single level that generates four bands of coefficients LL, LH, HL, HH. Step 2: Segment each band of Wavelet coefficients into 4 × 4 blocks. Step 3: The set of segments, from each band, is the training set for that band. Codebook design: Separate codebooks are generated for each band with the training set resulted from Algorithm 1. The property of MACA is exploited to identify the clusters among the training set with HD as the metric. An n-bit MACA with k-attractors acts as a natural cluster (Section 2). The MACA of Fig.1 can be employed to classify patterns into two clusters, (say [I]= {00011, 00100 and 00111} and [II] = {00000}). The pseudo-exhaustive field yields the address of the memory that stores the cluster information (Theorem 1). Therefore, Cluster I attractors yield the memory addresses {01, 10, 11}. MACA based hierarchical clustering model for codebook: For each node of the binary VQ tree, we genetically evolve an MACA to split the cluster into two sub-clusters with an objective to maximize the self-similarity within a sub-cluster. A leaf node of the MACA tree represents cluster of elements.

144

C. Shaw, S. Das, and B.K. Sikdar MACA_CODEBOOK C0 S0 C1 S0

S1

S2

S3

0

MACA0 1 C2

S1

MACA1

S2

S3

MACA2

0

1

0

1

S0

S1

S2

S3

Clusters

Fig. 3. Structure of MACA based hierarchical clustering scheme

Fig.3 illustrates the design. Suppose, four clusters S0 , S1 , S2 and S3 are to be generated from the training set C0 = {{S0 }, {S1 }, {S2 }, {S3 }}. The MACA, at the first level (M ACA0 ), generates two clusters C 1 = {{S0 }, {S1 }} and C 2 = {{S2 }, {S3 }}. The similar process is repeated for C1 and C2 to generate the four clusters {S0 }, {S1 } and {S2 }, {S3 }, employing M ACA1 and M ACA2 . A leaf node Si is represented by the centroid Pi ∈ Si of the elements in Si . Pi can be viewed as a codeword in the codebook. Codebook searching: For a given test vector P´i , we need to identify the codebook entry (the codeword) closest to P´i . In reference to Fig.3, the M ACA0 is loaded with P´i and allowed to run. It returns the desired cluster C1 or C2 . The MACA (M ACA1 or M ACA2 ) is then loaded with P´i to output the desired cluster Si and its centroid. The path traversed represents the compressed data (00 for S0 ) for the P´i .

4

Encoding and Decoding Schemes

When an input vector P´i is compressed (encoded), it can either be identified as a cluster or non cluster element. A non cluster element is passed through an error analysis process. Definition 1. Let ci = be the ith code vector and V = be the input vector mapped to ci through hierarchical MACA tree, then the error vector Ei (V) = | ci − V | = , where eij = | xij − vj | for j = 1, ..., l l. The mean square error is defined as msei (V) = j=1 e2ij . Definition 2. Let λmse and λerror are the allowed threshold values for mean square error (mse) and the error value for an input vector V respectively and V maps to the code vector ci through the hierarchical MACA tree. V is said to be a cluster vector iff msei (V)≤ λmse and eij ≤ λerror for j = 1, ..., l; otherwise, V is said to be a stray (non cluster) vector. Algorithm 2. Error Analysis Step 1: Let V is mapped to the ith code vector ci . Compute msei (V) & Ei (V). Step 2: Carry out Step 3 and 4 if V is a non-cluster vector. Step 3: Perform DCT on Ei (V) and ci to obtain Ei ’(V) and ci ’ respectively. Step 4: Encode Ei ’(V) through entropy coding with respect to ci ’.

CA Based Encoding Technique for Wavelet Transformed Data

145

It is found that for a given ith code vector (Wavelet transformed vector) ci = xi0 , xi1 , · · · , xil and error vector Ei = ei0 , ei1 , · · · , eil if the DCT of Ei and ci are ci = xi0 , xi1 , . . . , xil and Ei = ei0 , ei1 , . . . , eil respectively, then ei0 = - xi0 . Algorithm 3. Encoder Input: A 512 × 512 two dimensional Gray Image Output: Compressed image as a bit stream Step 1: Transform the input image by Wavelet filter into different bands Step 2: Segment the transformed image of each band into 4 × 4 blocks Step 3: For each block, through traversal of MACA tree, find code vector ci . Step 4: If the input vector is not a stray vector, then store the index of ci with flag bit set, to indicate that it is a cluster vector. Goto Step 7. Step 5: Analyze the error vector (Algorithm 2). Step 6: Store the encoded bit stream (Step 3) with flag bit reset. Step 7: Store the index in a buffer. Step 8: Repeat Step 3 to Step 7 until all the blocks are processed. The encoded data has been stored in a bit stream. A decoder check the flag bit and performs a reverse error analysis process on it while decompressing.

5

Experimental Results

The proposed compression technology is developed for human portrait. A large number of test cases are considered. A few of them are reported in Table 1. The results depict that the quality of decompressed image is comparable with

(a) The Original image

(a) The Original image

(b) The Decompressed image

(b) The Decompressed image

Fig. 4. Result1: compression 91%

Fig. 5. Result2: compression 91%

146

C. Shaw, S. Das, and B.K. Sikdar

that of JPEG 2000 [7] in terms of PSNR for a fixed compression ratio. However, the main achievement of the scheme is it performs faster compression [9]. Fig.4 and Fig.5 display the original and reconstructed images from our CA based compression/decompression scheme for comparison. Table 1. Comparison of results at 91% cmpression ratio Image PSNR PSNR File of CA Scheme of Jpeg2000 face1 42.59 42.09 face2 42.54 42.00 face3 43.04 43.20 face4 42.28 42.97 face5 43.60 43.14 face6 42.46 42.44

6

Conclusion

This paper presents a Cellular Automata (CA) based still image compression technology on transformed data. The CA based transforms have been employed for low cost on-line compression to support efficient data transmission with desired level of image quality.

References 1. S. Wolfram, “A New Kind Of Science,” World Scientific, 2002. 2. N. Ahmed, T. Natarajan, K. R. Rao, ”Discrete Cosine Transforms”, IEEE Trans. Comput. C-23, pp-90-93, Jan 1974. 3. I. Daubechies, ” The Wavelet Transform, Time Frequency Localization and Signal Analysis’, IEEE Trans. on IT, 36(5), pp 961-1005, Sep 90. 4. P. P. Chaudhuri, D. R. Chowdhury, S. Nandi, and S. Chatterjee, “Additive cellular automata, theory and applications, vol. 1,” IEEE Computer Society Press, Los Alamitos, California, no. ISBN-0-8186-7717-1, 1997. 5. Allen Gresho and Robert M. Gray, “Vector Quantization and Signal Compression”, Kluwer Academy Publishers. 6. O. Lafe, “Data Compression and Encryption Using Cellular Automata Transforms”, In Proc. of IJSIS, 1996. 7. D. Santa-Cruz, T. Ebrahimi, J. Askelf, M. Larsson and C. Christopoulos. “JPEG 2000 still image coding versus other standards.”, In Proc. of SPIE, vol 4472, pages 267-275, San Diego, California, Jul. 29-Aug. 3, 2001. 8. P. Maji, C. Shaw, N. Ganguly, B. K. Sikdar, and P. P. Chaudhuri, “Theory and Application of Cellular Automata For Pattern Classification,” Fundamenta Informaticae on Cellular Automata, 2004. 9. C. Shaw, P. Maji, S. Saha and B. K. Sikdar, “Cellular Automata Based Encompression Technology for Voice Data”, ACRI 2004, pages 258-267.