he 4th Worshop on Combinatorial Mathematics and Computation heor Contrast Prediction for Fractal Image Compression Shou-Cheng Hsiung and J. H. Jeng Department of Information Engineering I-Shou Universit, Kaohsiung Count, aiwan d94@stmail.isu.edu.tw, jjeng@isu.edu.tw Abstract In this paper, a fast encoding algorithm is developed for Fractal Image Compression. At each search entr in the domain pool, b using the predicted contrast coefficients, we simplif the calculations for the contrast and brightness parameters. he redundant computations of eight dihedral smmetries of the domain bloc are also eliminated in the new encoding algorithm. Experimental results show that the encoding time is about two times faster than that of the full search method with almost the same PSNR for the retrieved image. Introduction he idea of the Fractal image compression is based on the assumption that the image redundancies can be efficientl exploited b means of bloc self-affine transformations. Man authors [-] suggest that at a bloc level images contain a large amount of self-similarit, and that the Fractal transform coding can be used to tae advantage of this fact. he Fractal transform for image-data compression was introduced first b M. F. Barnsle and S. Demo [4]. However, the algorithm requires extensive computations [5]. he first practical Fractal image compression scheme was introduced b A. E. Jacquin [6], E. W. Jacobs, R. D. Boss and Y. Fisher [7] called the Jacquin-Fisher algorithm using bloc-based transformations and an exhaustive search strateg. heir approach was an improved version of the sstem patented b Barnsle [8,9]. he computational complexit was reduced b partitioning and classifing the image sub-blocs. here are two important issues which need to be improved in the Jacquin-Fisher algorithm. First, the cost of an exhaustive search of a pool of domain blocs is too high. Secondl, a good classification algorithm needs to be obtained. Such a classification algorithm must be able to reduce the search space and also to decrease the order of the Fractal function. he recent wor toward these efforts is reported in the boo []. he Quadtree Fractal-Encoding scheme, developed b Y. Fisher [], is a well-nown technique that uses the recursive partition of the image into non-overlapping ranges with tree structure and the quadrant classification of both domain and range blocs. hese techniques relate to a more general method called the classified vector quantization []: compute the first and second moments of the domain blocs and the orientation of their sub-blocs to find the visual distinction between blocs, to thereb reduce the domain-search space. For the methods mentioned above, there is a need to consider the eight orientations of the allocated domain blocs. hese are nown as the dihedral operations on the bloc. his group of eight operations involve extensive computations in order to realize the above encoding procedure. It is well nown [-4] that a fast transform method can be used to implement the DC, called the fast DC. B performing the MSE computations in the frequenc domain, after the proper arrangement, it follows that all of the redundant computations can be eliminated. Since most of the energ of a bloc is located in the low-band data, we develop a DC-lie transformation in spatial domain to acquire onl three coefficients to represent the bloc. his reduces the complexit of the inner product computations. Also, the eight operations of the Dihedral group can be directl obtained b changing the signs of the three DC-lie coefficients. herefore, the purpose of speedup can be achieved. Fractal coding Fractal image compression is an inverse problem, i.e., for the given set SW, find the IFS which has S W as its attractor. It should be noted that, when SW is a natural image, such IFS can hardl exist because most of the sub-images are not directl similar to the whole image. o solve this problem, the idea of local self-similarit is adopted to form the Partitioned Iterated Function Sstem (PIFS in which the contractive maps wi is defined onl on Di where D i X for i,...,n. For practical implementation, let f be a given -5-
he 4th Worshop on Combinatorial Mathematics and Computation heor 56 56 gra level image. he domain pool D is defined as the set of all possible blocs of size 66 of the image f, which maes up ( 56 6 (56 6 588 blocs. he range pool R is defined to be the set of all non-overlapping blocs of size 88, which maes up ( 56 /8 (56 / 8 4 blocs. For each bloc v from the range pool, the fractal transformation is constructed b searching in the domain pool D the most similar bloc. At each search entr, the domain bloc is sub-sampled such that it has the same size as the range bloc. hen, the sub-sampled bloc is transformed subject to the eight transformations in the Dihedral group on the pixel positions. Assuming the origin of the image bloc is located at the center, the eight transformations :,,7 can be represented b the following matrices:,,,, 4, 5, 6, 7 he transformations and correspond to the flips along the vertical and horizontal lines, respectivel. is the flip along both the vertical and horizontal lines. 4, 5, 6 and 7 are the transformations of,, and, respectivel, performed b an additional flip along the main diagonal line. Let u denote a sub-sampled domain bloc of the same size as v. he similarit of u and v is measured using Mean Square Error (MSE defined b 7 7 d u, v ( u ( i, j v( i, j ( 64 j i In another word, for each range bloc Ri, the fractal encoder searches from the set of domain blocs a domain bloc D i and a contractive mapping w i which minimizes d( Ri, wi ( Di where x a b x t x w i c d t. ( z p z q he transformations w i are also called the affine transformation. he parameters (a, b, c, d constitute the eight Dihedral transformations, ( t x, t is the position of the domain bloc, p is the contrast scale factor and q is the luminance offset. In the minimization process, p and q can be computed directl as N u, v u, v, p ( N u, u u, and q v p u (4 N where N 64 and. After the appropriate affine transformations was found for all range blocs, the parameters tx, t, p, q and the orientation of eight Dihedral transformations are stored, which are referred to as the fractal codes. In the decoding phase, one chooses an arbitrar initial image, and then uses the fractal codes to compute the attractor of each transformation wi. After appropriate times of iterations, the image can be reconstructed, which has some degree of loss corresponding to the original image. he proposed algorithm In equation (, the range bloc v and domain bloc u consist of 64 pixel values in spatial domain. Inspired from the fast DC algorithm, we develop a new simple transformation to spare the cost of DC computation. We first derived the mean values of the four sub-blocs, as shown in figure. B manipulating the four mean values, we can get three DC-lie coefficients. Figure. Mean values of the four sub-blocs. Let b be a given 8 8 image bloc. he DC-lie transform of b is a -dim vector bˆ (,, given b ( M M ( M M a c b d ( M M ( M M a b c d ( M a M d ( M b M c he DC-lie coefficients of b ˆ, where b,..7 are the Dihedral transformation of b, can be easil computed as b,,, b,,, ( (,, 4 (,, 6 (,, ( (,, 5 (,, 7 (,, b, b, b, b, b, b (5-6-
he 4th Worshop on Combinatorial Mathematics and Computation heor As a consequence, there is no need to separatel calculate the DC-lie coefficients of the 8 Dihedral transformations. Since these coefficients are the predicted values for the DC low-band data. Equations ( for the contrast parameter has changed to p vˆ, vˆ uˆ, vˆ (6 where vˆ and û, the transformed blocs, consist of onl three integers. he steps to construct the transformed blocs are given as follows. Step. Divide each 88 blocs. bloc into four Step. Compute the four mean values. Step. Derive the three frequenc-lie parameters. Step4. Form the transformed bloc. As shown previousl, the Dihedral transformed domain blocs needs onl the three coefficients. his reduces the complexit of inner product in equation (6. Consequentl, our fast encoding algorithm requires less computations than the original algorithm. 4 Experimental Results o emphasize the encoding speed with a constant qualit, the fast algorithm is compared to the baseline algorithm having the same compression ratio. he data is encoded using 8 bits for the translations t and t, respectivel, 7 x bits for the brightness q, 5 bits for the contrast p and bits for the dihedral transformation. A total of bits are needed for coding each range bloc. he PSNR given b PSNR log (55 / MSE is used to measure the qualit of the retrieved images. For the different algorithms, the retrieved image is obtained b the same number of iterations of the encoded affine transformation with the same initial image. he software simulation is done using C++ Builder 5 on a Pentium.4G, windows XP pc. he tested pattern is the gra level Lena and Peppers images of size 56 56. Figures -4 shows the decoded images b using the full search method and the proposed algorithm. able gives the encoding time for finding p and q. he proposed algorithm is about two times faster than that of the full search method with almost the same PSNR. able. he comparison of full search and proposed methods. ime(sec Method PSNR For p+q Lena Peppers Baboon Full Search 9.8 5 Proposed 8.99 7 Full Search 9.86 6 Proposed 9.7 75 Full Search.8 5 Proposed.7 7 (a (b Figure. (a Full search method decoded Lenna, PSNR=9.8 (b Proposed method decoded Lenna, PSNR=8.99-7-
he 4th Worshop on Combinatorial Mathematics and Computation heor (a (b Figure. (a Full search method decoded Peppers, PSNR=9.86 (b Proposed method decoded Peppers, PSNR=9.7 (a (b Figure 4. (a Full search method decoded Baboon, PSNR=.8 (b Proposed method decoded Baboon, PSNR=.7 References [] H. O. Peitgen, J. M. Henriques and L. F. Penedo, Fractals in the fundamental and applied sciences, Elsevier Science Publishing Compan Inc. New Yor, 99. [] A. J. Crill, R. A. Earnshaw and H. Jones, Fractals and Chaos, Springer-Verlag, New Yor Inc., 99. [] M. F. Barnsle and A. D. Sloan, A better wa to compress images, BYE magazine, pp5-, Jan. 988. [4] M. F. Barnsle and S. Demo, Iterated function sstems and the global construction of Fractals, Proc. Ro. Soc. London, Vol. A99, pp4-75, 985. [5] M. F. Barnsle and L. P. Hurd, Fractal image compression, AK-Peter, Ltd., Wellesle, MA, 99. [6] A. E. Jacquin, Image coding based on a fractal theor of iterated contractive image transformations, IEEE rans. on image processing, Vol., No., pp8-, Jan. 99. [7] E. W. Jacobs, Y. Fisher and R. D. Boss, Image compression: A stud of the iterated transform method, IEEE rans. on signal processing, Vol. 9, No., pp5-6, Dec. 99. [8] M. F. Barnsle, Methods and apparatus for image compression b iterated function sstems, US patent No. 4,94,9, Jul. 99. [9] S. Graf, Barnsle s scheme for the Fractal encoding of images, Journal of Complexit 8, pp7-78, 99. [] Y. Fisher, Fractal Image Compression, -8-
he 4th Worshop on Combinatorial Mathematics and Computation heor heor and Application, Springer-Verlag, New Yor, 994. [] B. Ramamurthi and A. Gersho, Classified vector quantization of images, IEEE trans. on communications, Vol. COM-4, No., pp5-5, Nov. 986. []. K. ruong, J. H. Jeng, I. S. Reed, P. C. Lee, and A. Q. Li, A fast encoding algorithm for fractal image compression using the DC inner product, IEEE rans. on image processing, Vol. 9, No. 4, pp. 59-55, Apr.. [] C. M. Lai, K. M. Lam and W. C. Siu, A fast fractal image coding base on ic-out and zero contrast conditions, IEEE rans. image processing, Vol., No., pp. 98-4, [4] C. C. Wang, L. C. Lin, and S. H. sai, Fast fractal encoding algorithm using the law of cosines, IEEE Inter. midwest smp. circuits and sstems, pp. I-I6, 4. -9-