34
INTERNATIONAL JOURNAL OF COMPUTATIONAL COGNITION (HTTP://WWW.IJCC.US), VOL. 6, NO. 4, DECEMBER 2008
Iteration Free Hybrid Fractal Wavelet Image Coder Ramyachitra Duraisamy, L. Valarmathi and Jeyalakshmi Ayyappan
Abstract— Fractal image compression is a technique to store images in a small amount of space. This technique is used to compress images that contain affine redundancy, or subsections that look similar. The advantages of fractal compression are that it can be used to create very small files that decompose very quickly. The disadvantage is that it is computation intensive and time consuming as it involves pixel-to-pixel comparison between the image blocks. This paper proposes the use of wavelet transform with fractal compression that results in a much less compression time compare to the normal fractal compression method. Iteration Free Fractal Image Coding is applied to the low pass subband of wavelet transformed image and Set Partitioning in Hierarchical Trees coding is applied to the remaining coefficients. The proposed method results in high reduction in encoding and decoding time compared to the existing c 2008 Yang’s Scientific Research Institute, methods. Copyright ° LLC. All rights reserved. Index Terms— Block Average, Domain Pool, Fractals, Iteration Free, Wavelet transforms, QPIFS.
I. I NTRODUCTION
F
RACTAL image compression is a good scheme for image compression with high compression ratio and good image quality [9]. Fractal coding consists of representing the image blocks through the contractive transformation coefficients, using the self similarity concept [9] [5]. This type of compression provides an excellent image quality, but results in an exhaustive processing time. Generally, many attempts were made to speed up the fractal encoding by modifying the following aspects : the composition of the domain pool, search type used in block matching and quantization of the transform parameters [17], the type of the image partition [8], refining the block transformation [10], reduction of the complexity of the encoding process [6], speeding up the iterative decoding process [7]. In [12], the best match search process is reduced to a nearest neighbor search in a suitable metric space. In [14], a nearest neighbor search based on orthogonal projection and prequantization of fractal transform parameters is presented. Hsuan T.Chang and Chung J.Kuo in [2] used the non-iterative function system to speed up the image. Yuzo Iano [4] used wavelets in the fractal coding to speed the encoding process. Manuscript received June 13, 2008; revised July 09, 2008. Ramyachitra Duraisamy, Lecturer, Computer Science Department, Bharathiar University, Coimbatore-641046, Tamil Nadu, India. Email:
[email protected]. L. Valarmathi, Computer Science and Engineering Department, Government College of Technology, Coimbatore, TamilNadu, India. Jeyalakshmi Ayyappan, Sr. Lecturer, MCA Department, Sri Ramakrishna Engineering College, Coimbatore-641022, Tamil Nadu, India. Email: ramya
[email protected]. Publisher Item Identifier S 1542-5908(08)10401-8/$20.00 c Copyright °2008 Yang’s Scientific Research Institute, LLC. All rights reserved. The online version posted on February 17, 2009 at http://www.YangSky.com/ijcc/ijcc64.htm
In most of the papers [16], where fractal and wavelets are used, wavelet transform is first applied to the image and to the resultant coefficients, fractal coding is performed. This is due to the fact that most of the energy is concentrated on the approximation subband, so fractal technique can be applied to them. There is a problem concerning the application of the fractal image compression to a wavelet-transformed image [4]. This problem occurs due to the fact that there is not always enough information in detail subimages for fractal algorithm to latch onto. In order to solve the problem of encoding and decoding time taken by the traditional fractal method, this work involves an iteration free hybrid coder that applies a iteration free fractal method to approximation subband of wavelet transformed coefficients, and to the remaining coefficients, modified Set Partitioning in Hierarchical Trees coding is used. The remaining part of the paper is as follows: Section II and section III include Fractal Image Coding and Wavelet based Fractal Image Coding. Section IV includes SPIHT algorithm. Section V includes the Hybrid Fractal – Wavelet Image Coder. Section VI explains the proposed Iteration – Free Hybrid Fractal Image Coder. Section VII includes Experimental Results and finally, Section VIII includes conclusion. II. F RACTAL I MAGE C ODING In conventional fractal coding schemes, an image is portioned into non overlapping range blocks. The larger domain blocks are selected from the same image and can overlap. A grayscale image is encoded by mapping the domain block. D to the range block R with the contractive affine transformation. Then the parameters describing the contractive affine transformation that has the minimum matching error between the original range block R and the coded range R’ are transmitted or stored. The matching process consists of minimization min d(Ri , sPd + o1) = min ||Ri − sPd − o1||2
s,o,Pd
(1)
However, generally, it is not possible to find a perfect matching. Thus, the reconstructed image will be only an approximation of the original image. The closeness between the attractor and the original image is measured by the collage theorem. This theorem guarantees that the lower the error, the closer to the attractor Xf this image is [5]. d(x, Xf ) ≤ (1/(1 − s))d(x, f (x))
(2)
Because of all comparisons between range-domain blocks, the matching process is responsible for the exhaustive processing time of fractal encoding. In order to reduce this exhaustive time, several methods have been proposed. One such method is iteration free fractal coding method that uses block averaging
DURAISAMY, VALARMATHI & AYYAPPAN, ITERATION FREE HYBRID FRACTAL WAVELET IMAGE CODER
and has proven a good image quality with a high reduction in processing time. The method is as follows. In order to obtain the same domain blocks in both the encoder and decoder without using an off-line transmission, the information of the domain blocks are hidden in the fractal codes. The input M × M image is partitioned into the nonoverlapping range blocks of size B × B .The mean and variance of each range block is measured first. After all the means of the range blocks are obtained, a mean image of size with each pixel corresponding to the block mean is generated. If the variance of the range block X V ar{R} = (ri, j − µR )2 /B 2 (3) where ri, j denotes the (i, j)th pixel in the range block, is smaller than the threshold value, then the range block is coded by the mean. Otherwise, the range block will be coded by the contractive affine transformation. Note that, in this case, the size of the mean image should be much larger than that of the domain block, i.e., otherwise, it will not be easy to find a good mapping between the domain and range blocks because only a few domain blocks can be taken from the mean image. The size of the domain block is the same as that of the range block and thus the contraction procedure in conventional fractal coding schemes is eliminated. After testing all the blocks with the transformations the fractal code is determined while the coded block has the minimum distortion from the original range block. The distortion between the original and coded range blocks is represented by the mean-squarederror (M SE). N 1 X M SE = (xi − yi )2 N i=1
(4)
where N is the number of pixels, xi is the pixel of the original image, yi is the pixel of the reconstructed image. The header for each range block is attached to denote its coding status (either coded by the mean or affine transformation). Therefore, the decoder can correctly reconstruct each coded range block according to the header. In the decoding process, fractal code received is used to determine whether or not the range block is coded by the mean from its header. The mean image is reconstructed with the mean information in the fractal codes. Note that this mean image is identical to the mean image used in the encoder since both are constructed by the same block means. Therefore, the domain blocks generated from both mean images are also the same. If the block is coded by the mean, the value of each pixel in the decoded block is equal to the mean value. Otherwise, affine transformation is performed to reconstruct the coded range block. The decoding process ends when the last range block is reconstructed. At this point, no iterations are required and thus no convergence criterion and divergence problem for the decoded image to be concerned with. The fixed mean image that can be reconstructed from the received fractal codes is required in this iteration-free scheme. Hence the required memory size in this method is much smaller than that in the fractal image decoder. On the other hand, having no iterations means that the range blocks can be
35
decoded in parallel. Therefore, this decoder is very suitable for the hardware implementation and high-speed applications [2]. So, this iteration free fractal coding is used in the proposed method. III. WAVELET BASED F RACTAL I MAGE C ODING A wavelet is a waveform bounded in both frequency and duration. The most common waveforms are the sine and cosine functions. Most information in a signal occurs in just a few frequencies. By discarding the non-significant frequencies, data can be bounded in frequency without significant, and in some cases, any loss of data. The wavelet transform is a two parameter expansion of a signal in terms of a particular wavelet basis functions or wavelets. Let ψ(t) represent the mother wavelet. All other wavelets are obtained by simple scaling and translation of ψ(t) as follows √ ψa,T (t) = (1/ a)ψ[(t − T )/a] (5) In the most common formulation the scaling is discrete and dynamic, a = 2−j . The transition is discretized with respect to each scaled by using T = k2−j T 0 . In this case, the wavelet basis functions are obtained by ψj,k (t) = 2j/2 ψ(2j t − kT 0 )
(6)
For different integer values of j and k. Integer k represents translation of the wavelet function and is an indication of time or space in wavelet transform. Integer j however is an indication of the wavelet frequency or spectrum shift and generally referred to as scale [13]. With reference to [15], the two parameter wavelet expansion for signal x(t) is given by the following decomposition series in which the scaling and wavelet functions are utilized. x(t) = ck φj,k (t) + dj,k ψj,k (t)
(7)
Relations of the wavelet coefficients to the original signal , for real and orthogonal wavelets, are given by the following two equations. dj,k = x(t)ψj,k (t)dt ck = x(t)φj,h (t)dt
(8) (9)
Efficient calculation of DWT coefficients is generally formulated in terms of a particular set of multirate filters. Filters used for calculation of the inverse transform are referred to as synthesis filters. The coefficients of these filters , which are generally FIR, are obtained from the knowledge of the mother wavelet and scaling functions [1]. Wavelet transform has been widely used in signal processing, research, particularly in image compression. In many applications, wavelet based schemes achieve better performance than other coding schemes. Wavelets can split a signal into 2 components. One of these components, called smooth contains the large scale information, and looks like the signal. The other component called the detail, contains the local noise, and will be almost zero for a sufficiently continuous or smooth signal In the fractal coding schemes [5], pixel to pixel comparison is made between the range block and transformed domain
36
INTERNATIONAL JOURNAL OF COMPUTATIONAL COGNITION (HTTP://WWW.IJCC.US), VOL. 6, NO. 4, DECEMBER 2008
block which takes a lot of time. To reduce the time taken, wavelet coefficients are used [11] in the fractal coding for comparing the range block and the domain block which results in considerable reduction in time. IV. SPIHT C ODING The Set Partitioning in Hierarchical Tree algorithm is unique in that it does not directly transmit the contents of the sets, the pixel values, or the pixel coordinates. It transmits only the decisions made in each step of the progression of the trees that define the structure of the tree. The advantage to this is that the decoder can have an identical algorithm to be able to identify with each of the decisions and create identical sets along with the encoder. The part of the SPIHT that designates the pixel values is the comparison of each pixel value to 2n ≤ |ci,j | < 2n+1 with each pass of the algorithm having a decreasing value of n. In this way, the decoding algorithm will not be passed the pixel values of the sets but can get that bit value from a single value of n per bit depth level. This is also the way in which the magnitude of the compression can be controlled. By having an adequate number for n, there will be many loops of information being passed but the error will be small, and likewise if n is small, the more variation in pixel value will be tolerated for a given final pixel value. A pixel value that is 2n ≤ |ci,j | is said to be significant for that pass. By sorting through the pixel values, certain coordinates can be tagged at “significant” or “insignificant” and then set into partitions of sets. The trouble with traversing through all pixel values multiple times to decide on the contents of each set is an idea that is inefficient and would take a large amount of time. Therefore the SPIHT algorithm is able to make judgements by simulating a tree sort and by being able to only traverse into the tree as much as needed on each pass. This works exceptionally well because the wavelet transform produces an image with properties that this algorithm can take advantage of. The following are the lists that will be used to keep track of important pixels: LIS: List of Insignificant Sets; LIP: List of Insignificant Pixels; LSP: List of Significant Pixels. V. H YBRID F RACTAL WAVELET I MAGE C ODER One possible method to demonish the number of fractal matching comparisons is to reduce the domain pool size. In order to achieve this, one possible procedure is to reduce the original image size and then to apply fractal encoding to this smaller version. The hybrid coder reduces the domain pool size in a smaller manner, since the fractal part of the hybrid coder is only applied to the approximation subband. However, the approximation subband will be decoded at the same size of the original approximation subband, and the details will be preserved using SPIHT. The wavelet transform decomposes the original image into different resolution subbands. At each decomposition level, approximation subband and detail subbands are produced.
In this method, Fractal Coding is applied only to the approximation subband, and a SPIHT coding is applied to the detail subbands of wavelet-transformed image. So, Fractal encoding time of the original image is reduced compared to traditional fractal coding used in [9] and the details that would be last without using DWT are preserved in the subbands. This detail information, encoded by modified SPIHT, is sent to the decoder, improving the reconstructed image quality. The original SPIHT algorithm has been modified in the LIP initialization to be inserted in the hybrid coded. Originally, LIP would contain all approximation subband coefficients. However, this scheme encodes this subband by using fractal technique, the LIP must be initialized as an empty subset. The LSP and LIS lists have not been modified, since LSP is originally empty and since LIS contains only the approximation subband offspring. Also, at the initial SPIHT threshold computation, the approximation subband coefficients values have been excluded, in order to achieve a better detail subbands encoding [4]. VI. P ROPOSED I TERATION F REE H YBRID F RACTAL WAVELET I MAGE C ODER The hybrid coder proposed in this paper reduces the domain pool size in a similar manner as in [4], since the fractal part of the hybrid coder is only applied to the approximation subband. In the proposed hybrid coder, iteration free fractal coding is applied only to the approximation subband, and a SPIHT coding is applied to the detail subbands of the wavelet transformed image.The Block-Averaging method used in [2] is used in this method where mean image is used to generate the domain block. In the fractal coding part of this method, the mean block is scaled and in the affine transformation, the entire block is shifted along with the pixels shifting. This results in more number of combinations in the domain pool to search for. As the mean of the domain blocks are added in the file, fractal decoding time of the original image is most significantly reduced compared to fractal coding used in [4] and the details that would be lost without using DWT, are preserved in the subbands. This detail information encoded by modified SPIHT is sent to the decoder, improving the reconstructed image quality. Use of Wavelet Synopsis: In [3], the use of wavelet synopsis is discussed in the application of wavelets. A wavelet synopsis is a subset of wavelet coefficients whose magnitudes are above a chosen threshold values. The other coefficients are taken zero. It is assured in [3] that the use of wavelet synopsis results in minimization with respect to overall rms error of data compression. Hence in this paper, a study of use of wavelet synopsis for comparison of range and domain blocks has been carried out. The results are shown in Table 4. VII. E XPERIMENTAL R ESULTS The iteration free hybrid coder results have been compared with hybrid coder [4] ,fractal coding and wavelet based fractal coding techniques. The performance of the decoded image
DURAISAMY, VALARMATHI & AYYAPPAN, ITERATION FREE HYBRID FRACTAL WAVELET IMAGE CODER
quality is evaluated by the peak signal-to-noise-ratio (P SN R) and the bit rate (the required bits per pixel). In this proposed method, an image is partitioned into range blocks with the single size 4 × 4. The P SN R is calculated using the formula √ P SN R = 20 log10 255/ M SE (10) where M SE is the mean-squared-error and is given in the Eq. (4). The bit rate is calculated by (Nµ + Naf ) + (Ih + Iµ ) + Naf (Iα + Ii + IP D ) 5122 bit/pixel (11) 5122 for a single block size, where B1 =
Iµ required bits for the block mean; Iα contrast scaling; Ii isometry; IP D position of the domain pool; Nµ number of the blocks coded by the mean; Naf affine transform.
TABLE I: Numeric results of the image Lena of 512 × 512 pixels. Bit Rate (bpp)
Compression Ratio (%)
0.2
45
0.35
30
Method Fractal Wavelet based Fractal Hybrid Iteration Free Hybrid Fractal Wavelet based Fractal Hybrid Iteration Free Hybrid
P N SR (dB) 26.78 25.61 28.75 29.06 27.12 26.85 30.13 30.85
37
TABLE IV: Numeric results of the image Mandrill of 128 × 128 pixels. Bit Rate (bpp)
Compression Ratio (%)
0.21
43
0.37
29
Compression Ratio (%)
0.22
44
0.36
28
Method Fractal Wavelet based Fractal Hybrid Iteration Free Hybrid Fractal Wavelet based Fractal Hybrid Iteration Free Hybrid
P N SR (dB) 20.15 16.85 17.57 24.18 21.36 17.13 19.47 25.57
Fractal Wavelet based Fractal Hybrid Iteration Free Hybrid Fractal Wavelet based Fractal Hybrid Iteration Free Hybrid
P N SR (dB) 22.18 20.75 21.57 23.21 21.75 22.42 22.75 23.53
TABLE V: Numeric results of the image Golden Hill of 512 × 512 pixels. Bit Rate (bpp)
Compression Ratio (%)
0.20
46
0.35
29
Method Fractal Wavelet based Fractal Hybrid Iteration Free Hybrid Fractal Wavelet based Fractal Hybrid Iteration Free Hybrid
P N SR (dB) 24.12 24.36 24.92 25.37 27.01 26.15 26.78 27.53
TABLE VI: Numeric results of the image Golden Hill of 128 × 128 pixels. Bit Rate (bpp)
Compression Ratio (%)
0.21
42
0.37
30
TABLE II: Numeric results of the image Lena of 128 × 128 pixels. Bit Rate (bpp)
Method
Method Fractal Wavelet based Fractal Hybrid Iteration Free Hybrid Fractal Wavelet based Fractal Hybrid Iteration Free Hybrid
P N SR (dB) 21.18 19.85 20.47 22.11 22.05 21.36 21.95 22.85
Bit Rate Vs PSNR for Golden Hill 28 Fractal
TABLE III: Numeric results of the image Mandrill of 512 × 512 pixels. Bit Rate (bpp)
Compression Ratio (%)
0.20
45
0.35
30
Method Fractal Wavelet based Fractal Hybrid Fractal Wavelet based Fractal Hybrid Iteration Free Hybrid
P N SR (dB) 25.32 25.61 26.72 28.01 27.83 28.78 27.37
PSNR(db)
27 26
Wavelet based Fractal
25 24
Hybrid
23 22 0.2
0.35
Iteration free Hybrid
Bit Rate
Fig. 1: P SN R curves for Golden Hill image.
38
INTERNATIONAL JOURNAL OF COMPUTATIONAL COGNITION (HTTP://WWW.IJCC.US), VOL. 6, NO. 4, DECEMBER 2008
Tables I, II and III show the P SN R, Bit Rate and Compression Ratio values for the images Lena, Mandrill and Golden Hill of size 512 × 512 pixels and 128 × 128 pixels for Fractal Coder, Wavelet Based Fractal Coder, Hybrid Coder and Iteration Free Hybrid Coder methods. It is seen from the table that the P SN R values of Iteration Free Hybrid method are always better than all the other methods. It is seen from the table VII that using a wavelet synopsis consisting of only 4 coefficients yields almost same image quality but with reduction in time of 33%. However the extreme case of using only one coefficient results in the degradation of the picture quality, though it gives a reduction of about 48%. Hence, it may therefore be concluded that a wavelet synopsis may be adopted in the use of wavelet based fractal image compression. Figure 1 shows the Bit rate Vs P SN R for Golden Hill Image. Figures 2, 3 and 4 show the original Lena and Mandril images of size 512 × 512 pixels and the images obtained after applying fractal, wavelet based fractal, hybrid and iteration free hybrid method. From the figure, it is seen that the image obtained in the proposed method is better compared to other methods. VIII. C ONCLUSIONS This paper combines the speed of the wavelet transform and iteration free fractal compression to reduce the coding time. The block averaging method of the iteration free fractal coder is employed to design an efficient domain pool. Simulation results show that there is a significant improvement on the coding performance. Compared with the existing fractal coding schemes, the proposed iteration free hybrid scheme, utilizing the block averaging method for the domain pool design, achieves a superior performance. Therefore, based on the proposed domain pool design, the iteration free hybrid scheme shows its characteristics of high coding speed with better visual quality. This paper further demonstrates that a wavelet synopsis may be used to achieve still further reduction in the compression time with almost imperceptible change in the image quality. Therefore, based on the proposed method of using wavelet coefficients, this method shows its characteristics of high encoding speed with little reduction in image quality. R EFERENCES [1] C. S. Burrus, R. A. Gopinath, and H. Guo. Introduction to Wavelets and Wavelet Transforms: A Primer. Prentice Hall Inc., 1998. [2] Hsuan T. Chang and Chung J. Kuo. Iteration free fractal image coding based on efficient domain pool design. IEEE Trans. On Image Process, 9(3):329–339, Mar. 2000. [3] Minos Gavofalakis and Philip B. Gibbons. Probabilistic wavelet synopsis. ACM Trans. in Database Systems, 29(1):43–90, Mar. 2004. [4] Yuzo Iano, Fernando Silvestre da Silva, and Ana Lucia Mendes Cruz. A fast and efficient hybrid fractal-wavelet image coder. IEEE Trans. On Image Process, 15(1), Jan. 2006. [5] Arnaud E Jacquin. Image coding based on a fractal theory of iterated contractive image transformations. IEEE Trans. On Image Process, 1(1), Jan. 1992. [6] H. Kuroda, D. Popescu, and H. Yan. Fast block matching method for image data compression based on fractal methods. Proc. SPIE, 2501:1257–1266. [7] S. Lepsoy, G. Oien, and T. Ramstad. Attractor image compression with a fast non-iterative decoding algorithm. In Int. Conf. Acoustics, Speech, Signal Processing, volume 5, pages 337–340. IEEE, April 1993.
[8] G. Lu and T. L. Yew. Image compression using quadtree partitioned iterated function systems. Electron, 30:23–24, Jan. 1994. [9] N. Lu. Fractal Imaging. Academic, New York, 1997. [10] D. Popescu, A. Dimca, and H. Yan. A non-linear model for fractal image coding. IEEE Trans. On Image Processing, 6:373–382, Mar. 1997. [11] D. Ramyachitra and K. Anbumani. Wavelet based fractal image compression. In National Conference on Mulitimedia Technologies and Applications, Karunya University, India, July 2004. [12] D. Saupe. Accelerating fractal image compression by multi dimensional nearest- neighbour search. Proc. DCC ’95, Mar. 1995. [13] Khalid Sayood. Introduction to Data Compression. Morgan Kaufmann, 1996. [14] C. S. Tong and M. Wong. Adaptive approximate nearest neighbor search for fractal image compression. IEEE Trans. On Image Process, 11(6):605–615, Jun. 2002. [15] Axel Van De Walle. Merging fractal image compression and wavelet transform method. Aug. 1995. [16] S. Welstead. Fractal and Wavelet Image Compression Techniques. WA: SPIE, Bellingham, 1999. [17] B. Wohlberg and G. Jager. A review of the fractal image coding literature. IEEE Trans. On Image Process, 8(12):1716–1729, Dec. 1999.
DURAISAMY, VALARMATHI & AYYAPPAN, ITERATION FREE HYBRID FRACTAL WAVELET IMAGE CODER
39
TABLE VII: Comparison of P SN R and Compression Time using Wavelet Synopsis. Image Lena Golden Hill Mandril
All the coeff(7 coeff) P SN R(dB) Comp. Time(ms) 26.15 10083 27.05 9095 27.18 9010
(a)
Few coeff(4 coeff) P SN R(dB) Comp. Time(ms) 25.56 6722 26.39 6033 26.58 6010
(b)
(d)
One coeff P SN R(dB) Comp. Time(ms) 22.84 096 23.81 527 25.60 510
(c)
(e)
Fig. 2: Comparison of reconstructed Lena Images. (a) Original. (b) Fractal. (c) Wavelet Based Fractal. (d) Hybrid. (e) Iteration Free Hybrid.
(a)
(d)
(b)
(c)
(e)
Fig. 3: Comparison of reconstructed Mandril Images. (a) Original. (b) Fractal. (c) Wavelet Based Fractal. (d) Hybrid. (e) Iteration Free Hybrid.
40
INTERNATIONAL JOURNAL OF COMPUTATIONAL COGNITION (HTTP://WWW.IJCC.US), VOL. 6, NO. 4, DECEMBER 2008
(a)
(d)
(b)
(c)
(e)
Fig. 4: Comparison of reconstructed Golden Hill Images. (a) Original. (b) Fractal. (c) Wavelet Based Fractal. (d) Hybrid. (e) Iteration Free Hybrid.