Abstract

With many observations, we find that there exists a logarithmic relationship between the average collage error (ACER) and the PSNR quality of decoded images. By making use of ACER in the encoding process, the curve fitting result can help us to predict the PSNR quality of decoded images. Then, in order to reduce the computational complexity further, an accelerated version of the prediction method is proposed. Firstly, a low limit of percentage of accumulated collage error (LLPACE) is proposed to evaluate the actual percentage of accumulated collage error (APACE). If LLPACE reaches a large value, such as 90%, the corresponding APACE can be proved to be limited in a small range (90%–100%) and the APACE can be estimated approximately. Thus, the remaining range blocks can be neglected and the corresponding computations can be saved. With the approximated APACE and the logarithmic relationship, the quality of decoded images can be predicted directly. Experiments show that, for four fractal coding methods, the quality of decoded images can be predicted accurately. Furthermore, the accelerated prediction method can provide competitive performance and reduce about one-third of total computations in the encoding process. Finally, the application of the proposed method is also discussed and analyzed.

1. Introduction

Fractal image coding was firstly proposed by Barnsley; then, Jacquin introduced the first practical fractal coding method [13]. Since then, it has attracted much attention of the researchers worldwide. In the early years, fractal coding was mainly considered as an image compression method. The researchers worldwide showed great interest in it and many aspects of fractal coding have been explored comprehensively such as the mathematical background concerning its limits and prospects, relationship with vector quantization, encoding of video sequences, and compressing ECG signals [4]. Moreover, many excellent characteristics, such as its novel idea, independence of resolution, fast decoding, and potential of high compression ratio, have been gradually found [5]. Although fractal coding has many advantages, the high computational complexity in fractal encoding is a main obstacle for its practical applications. Many fast fractal coding methods have been proposed and they can be mainly divided into three categories: classification techniques, feature vector techniques, and the no-search based fractal coding methods. For the former ones, the range blocks and domain blocks are first divided into different categories and the block matching is only carried out within the same category [6, 7]. For the secondary ones, the block matching process is carried out in the feature space [810]. Due to the lower dimension of features and more effective searching strategies, such as kd-tree method [11], the fractal encoding process can be finished in a short time. Finally, no-search fractal coding method is another way to provide faster fractal encoding and higher compression ratio at the expense of poor quality of the decoded image [1215]. Furthermore, during the past two decades, it has been successfully applied in many other image processing applications such as image denoising [16, 17], image magnification [1820], image retrieval [21, 22], and digital watermarking [2325].

Since the fractal coding method aims to reduce the redundancy existing among different local parts of the input image, only the images with good self-similarity can get high quality of decoded images and the quality of decoded images is determined by the self-similarity of input images. This provides the possibility of predicting the quality of decoded images for us. In our research, we introduce the average collage error (ACER) to represent the self-similarity of the input image. By many observations, we find that there exists a logarithmic relationship between the ACER and the PSNR quality of the decoded image. Thus, we can predict the quality of decoded images by making use of ACER in the encoding process. The proposed method stated above does not need the fractal decoding process, but all the encoding process is necessary to compute the ACER. In order to accelerate the prediction method, on one hand, we propose a low limit of percentage of accumulated collage error (LLPACE) which provides an effective way to estimate the percentage of the accumulated collage error (ACE) in the encoding process. When LLPACE reaches a large value, such as 90%, the corresponding ACE can be limited in a small range (90%–100%). That is to say, the ACE can be estimated approximately. On the other hand, by theoretical derivations and analyses, we find that the collage error mainly comes from the range blocks with large variances. We firstly sort the range blocks by their variances from largest to smallest. Then, the range blocks are encoded one by one subject to the same order. When the LLPACE reaches a threshold (90%), we can get the approximated ACE and predict the quality of decoded images directly by the above logarithmic relationship. Thus, the remaining range blocks can be neglected and the corresponding computations can be saved. Finally, we assume the practical application for our proposed method. For example, the quality of decoded images is demanded to be above a certain value, such as 30 dB. If fractal coding method can satisfy this practical demand, without the decoding process, only the encoding process is needed to predict this result. If not, our prediction method can get the final result only with a small part of encoding process and much time-consumption can be saved. Experiments show that, for the basic fractal coding and the other three fast fractal coding methods, the quality of decoded images can be predicted accurately by making use of the proposed logarithmic relationship. Moreover, the accelerated prediction method can provide competitive performance and reduce about one-third of total computations in the fractal encoding. For their practical applications, the conditions of setting different practical demands are simulated. In particular, when the threshold of the practical demand is set to be a large value, only a small number of range blocks are needed to be encoded to judge whether fractal coding can satisfy the practical requirements.

2. Review of Fractal Image Coding

The theoretical basis of fractal encoding method is the collage theorem which can be described as follows: let (, ) denote a metric space with a given metric . For any , we try to find a contractive transform that makes the collage distance as small as possible, thereby making the approximation error small:where and denote the contractivity factor and fixed point of , respectively. For the practical fractal coding method, the aim of fractal encoding process is to construct a set of transformations whose fixed point can approximate the original image well [3].

Following Jacquin’s method, the input image is first partitioned uniformly into nonoverlapping range blocks; generally, the size of domain blocks is two times larger in each direction than that of the range blocks. The domain blocks can be obtained by sliding a window over the original image with a search step . Then, a domain block pool can be established by contracting domain blocks to the same size of range blocks. Furthermore, the domain block pool is extended by eight isometric transformations. For partial Lena image, Figure 1 illustrates the eight isometric transformations. In order to make the domain block match the range block better, an affine transformation is also needed and the best matched domain block can be obtained by searching the domain block pool and minimizing the following matching error function:where denotes a matrix whose elements are all ones. and denote the scaling coefficient and offset coefficient for the affine transformation, respectively. is the collage error for the range block . denotes the contracted domain block. Figure 2 illustrates the fractal encoding process. The red block and green block indicate the range block and domain block, respectively. The yellow arrow shows that, after contractive, isometric, and affine transformations, the best matched domain block can be obtained by searching the domain block pool.

At the fractal decoding phase, the same transformations as the encoding process are recursively performed on arbitrary initial image. After about ten iterations, the decoding process will converge to the decoded image. While the black image is selected as the initial image, Figure 3 illustrates the first eight iterations for partial Lena image.

3. Prediction of the Decoded Image Quality

For real world images with different extent of self-similarity, the decoded image quality of fractal image coding is different. Figures 4(a) and 4(c) illustrate two input images. Figures 4(b) and 4(d) are their decoded images, respectively. In this paper, we characterize the quality of decoded images in terms of the Peak Signal-to-Noise Ratio (PSNR) and compute it as follows:where and are the height and width of the input image. and denote the original image and the decoded image, respectively. The PSNRs of the two decoded images are 35.95 dB and 27.73 dB, respectively.

From Section 2 and Figure 2, we know that fractal coding method aims to reduce the redundancy existing among different local parts of the input image and the quality of decoded images is determined by the self-similarity of input images. Moreover, self-similarity could be measured by histogram of collage error distributions [26]. From Figures 4(e) and 4(f), we can see that, compared with Figure 4(c), the collage error distribution of Figure 4(a) demonstrates noticeable peaking which is closer to zero and this implies that Figure 4(a) can be considered to be more self-similar. This can be also verified by the PSNR comparison between Figures 4(b) and 4(d). In our research, in order to measure the self-similarity quantitatively, the average collage error (ACER) is proposed to represent the self-similarity of the input image and can be represented as follows: where is the collage error of range block and Num denotes the total number of range blocks.

In order to reveal the relationship between the ACERs and PSNRs of decoded images, ninety-seven images in the USC-SIPI database and one hundred images in the Vision Texture database are used and all the test images are encoded and decoded by fractal coding method [27, 28]. In the experiment, each input image is partitioned uniformly into the range blocks whose sizes are 4 × 4, 8 × 8, and 16 × 16, respectively. The sizes of domain blocks and search step are both two times larger than that of range blocks. Figure 5(a) illustrates the PSNR versus ACER for all the tests. We can observe that there exists a fixed relationship between ACERs and PSNRs of decoded images and we can use (4) to represent the relationship between ACERs and PSNRs of decoded images:where and denote the ACER and the PSNR of the decoded image, respectively. and are the coefficients needed to be determined.

For the th image, let and , , denote the corresponding ACER and PSNR of the decoded image, respectively; is the total number of data points. Based on the above representations, we can get the system of equations as follows:Assumewhere denotes the transpose operation. Then, we can express (6) as

The least squares solution of (8) can be obtained by solving the system of equations of , where is the coefficient estimation of (4). In Figure 5(a), the fitting curve is plotted with a red color. For all the test images, 92% of the deviations between the PSNRs and their corresponding values on the fitting curve are within the range of −0.5 dB to 0.5 dB. With the fitting curve and ACER, we can predict the PSNR of the decoded image directly. Similar to PSNR versus ACER, we can easily derive that there will exist a linear relationship between mean squared error (MSE) and ACER which is also illustrated in Figure 5(b).

4. Accelerated Version of the Prediction Method

According to the above statements, we know that although the fractal decoding is not needed, we need to perform the entire fractal encoding to get the ACER. In order to accelerate the method in Section 3, one way is to get the majority of collage errors with fewest range blocks encoded. In order to facilitate the exposition, we firstly derive the following inequality. In order to minimize the matching error function (2), we set the derivatives of (2) with respect to and to zeros as follows:

By solving the above system of equations, we can obtain the optimal coefficientswhere denotes the inner product over vectors that are obtained from the -pixel range and contracted domain blocks by rearranging them as vectors. and are the mean values of the contracted domain block and the range block, respectively. By substituting (10) back into (2), (2) can be simplified as from (11), we see that the collage error is smaller than its variance. In addition, we can also understand (11) as follows: The variance is the squared collage error obtained in the special case when one sets the fractal parameter ; that is, one finds the best constant approximation of the range block . This, of course, is the mean value of the range block. In other words, when , . Since only one fractal parameter is used, one expects the collage error to be equal to or higher than when two fractal parameters are used [26].

From (11), we know that the variances of range blocks provide an upper limit for collage errors and the range blocks with large collage errors should have corresponding large variances. Only the range blocks with large variances may have corresponding large collage errors. If the range blocks with large collage errors can contribute to the majority of total collage errors, the remaining range blocks with few collage errors can be neglected and the corresponding computational cost can be saved.

Based on the above statements, ahead of the fractal encoding procedures, the range blocks are sorted by their variances from largest to smallest and a range block sequence is established. Then, each range block in the sequence is encoded in order one by one and we can get the accumulated variance (AV) and accumulated collage error (ACE). By (11), we know that AV is larger than ACE. In order to estimate the percentage of ACE in the encoding process, we propose the following inequality:where denotes the accumulated collage errors of the remaining range blocks except for the range blocks encoded. Thus, represents the total collage errors and the right part of (12) represents the actual percentage ACE; we call it APACE. belongs to the same range blocks as . Since each range block’s variance is larger than its corresponding collage error, is smaller than and the right part of the inequality will be always larger than the left part. Since it provides the lower limit of the percentage of ACE, we call it LLPACE.

In the practical encoding process, if we want to get the majority of total collage errors, we only need to guarantee that LLPACE is a large value, such as 90%; by (12), we can know that the corresponding APACE will account for more than 90% of total collage errors. Then, we can get the approximated ACER as follows: where Num denotes the total number of range blocks. Since the APACE is within the range of , the denominator of (13) is used to estimate the percentage of ACE. Here dividing Num aims to convert the partial ACE to the partial ACER. By making use of the approximated ACER and (5), the PSNR of the decoded image can be predicted directly.

We take four 256 × 256 images, Lena, Bridge, Zelda, and Bird, for example, to illustrate the above proposed method. In the encoder, firstly, the variances of range blocks are computed and sorted from the largest to smallest. As the number of range blocks encoded, proportional to the area encoded, increases, the corresponding LLPACE and APACE are plotted in Figure 6. In order to make the above procedures intuitive, Figure 7 illustrates the corresponding range blocks encoded in white boxes. We can observe the following key points:(i)Generally, while the range blocks with large variances account for a small proportion of total area, their corresponding LLPACE and APACE account for a large proportion.(ii)In accordance with (12), LLPACE is always smaller than APACE. In particular, while LLPACE reaches 90%, the corresponding APACE will be limited in a small dynamic range, that is, 90%–100%.

(i) shows us that we can get the majority of collage errors with only part of the range blocks encoded. (ii) tells us that LLPACE provides us with an effective way to estimate APACE. Thus, if some range blocks reach a large LLPACE, the corresponding APACE will be limited in a small dynamic range. For example, while some range blocks with large variances satisfy LLPACE = 90%, by (12), their corresponding ACE will account for 90%–100% of the total collage errors. By making use of the majority of total collage errors and (13), we can predict the quality of the decoded image by (5) directly. Simultaneously, if the range blocks only account for a relatively small area, the prediction method in Section 3 can be accelerated.

5. Applications of Our Proposed Method

In some practical applications, such as the production of videos with high quality, the PSNRs of decoded images are required to be above a certain value . Given one input image, we want to know whether fractal coding can satisfy people’s demand. Generally speaking, we need to perform the encoding and decoding process entirely to determine whether fractal coding is suitable for it. In our research, we propose a more effective method to achieve this target. If the decoded image quality is required to be above a threshold , such as 30 dB, firstly, we need to get the threshold of ACER by (14) which is the inverse function of (5). The corresponding threshold of ACE can be obtained by . Here Num also denotes the total number of range blocks. Then, in the fractal encoding process, after one range block is encoded, we compute the ACE and LLPACE. The ACE just exceeding the threshold or LLPACE reaching 90% is considered as the terminating position. If the ACE exceeds the , we know that fractal coding can not satisfy the practical demand. If the ACE is smaller than , but the LLPACE reaches 90%, we can estimate the ACER with (13) and predict the final PSNR. We can also know whether fractal coding method is suitable in this case. In order to shorten the encoding process, the range blocks are sorted by their variances from largest to smallest and the range blocks are encoded one by one following this order. Note that the fractal decoding process is always not needed for our proposed method. The flow chart of our proposed method is shown in Figure 8:

Figure 9 illustrates the above steps for a 256 × 256 Lena image. While the size of range blocks is set to be 8 × 8, the actual PSNR of the decoded image is 25.54 dB. When is set to be 30 dB, the right part in Figure 9 illustrates the procedures from to . By performing the encoding process in Figure 8, the left part of Figure 9 shows us the range blocks we need to encode. Only 5.27% of the total range blocks are needed to determine that fractal coding is not suitable for Lena image in this condition. Moreover, the fractal decoding process is not needed.

6. Experiment

In this section, five 512 × 512 images, Lena, Barbara, Boat, Peppers, and Baboon, are used. The sizes of domain blocks and search step are all set to be two times larger in each direction than that of the range blocks. The coefficients, and , are quantized by 5 and 7 bits, respectively. The experiments are carried out on a Pentium Dual-Core 2.93 GHz PC and programmed using MATLAB software. We will use Jacquin’s method and the other three fast fractal coding algorithms to assess the performance of our proposed method.

6.1. Predict the Quality of Decoded Images by Making Use of the Relationship between ACER and PSNR of the Decoded Image

In this part, besides Jacquin’s fractal coding method [1], we also use Lai’s [8], He’s [9], and Wang’s [10] fast fractal coding method to assess the accuracy of the method in Section 3. The detailed procedures can be described as follows.

Step 1. For one input image, perform Jacquin’s method and Lai’s, He’s, and Wang’s fast fractal coding method on it and get the actual PSNRs of the decoded images, respectively.

Step 2. In the above encoding processes, compute the ACER and predict the PSNR of the decoded image by (5).

Step 3. Compare the predicted PSNR with the actual PSNR of the decoded image.

Following the above steps, in the case of 4 × 4 and 8 × 8 range blocks, Tables 1 and 2 show the experimental results for four fractal coding methods, respectively. For each method, the first row to the fourth row list the predicted PSNRs, the actual PSNRs, their corresponding deviations, and the encoding times, respectively. In Table 1, for Jacquin’s method, the average deviation is 0.23 dB. For the other three fast fractal coding methods, their average deviations are 0.15 dB, 0.24 dB, and 0.24 dB, respectively. In Table 2, the corresponding average deviations for the four methods are 0.15 dB, 0.05 dB, 0.08 dB, and 0.11 dB, respectively. They are all below 0.3 dB.

6.2. Assess the Performance of the Accelerated Prediction Method

In this part, we will compare the performance of the prediction method with its accelerated version. Based on the statements in Section 4, the corresponding experimental procedures can be described as follows.

Step 1. For one input image, perform Jacquin’s method and Lai’s, He’s, and Wang’s fast fractal coding method on it and get the actual PSNRs of the decoded images, respectively.

Step 2. Partition the input image uniformly into range blocks and compute the variances of the range blocks. Sort the range blocks by their variances from largest to smallest.

Step 3. Following the order established in Step , take one range block, encode it, and compute the LLPACE by (12). If LLPACE is smaller than the threshold , such as 90%, take the next range block and continue encoding it; if not, record the ACE and go to Step .

Step 4. Estimate the ACER by (13) and predict the PSNR of the decoded image by (5).

Step 5. Compare the predicted PSNR with the actual PSNR of the decoded image.

Similar to Tables 1 and 2, Tables 3 and 4 illustrate the experimental results of the accelerated prediction method for 4 × 4 and 8 × 8 range blocks, respectively. Moreover, the theoretical amounts of computations needed are also added in the fourth row for each method. With respect to the fourth row in Tables 1 and 2 and the fifth row in Tables 3 and 4, the percentage of computations needed in row four of Tables 3 and 4 can be verified by the actual encoding times, for example, for 4 × 4 range blocks, performing Jacquin’s method on Lena, , and for 8 × 8 range blocks, performing He’s method on Boat, . In Table 3, the average deviations of the four fractal coding methods are 0.18 dB, 0.09 dB, 0.14 dB, and 0.16 dB, respectively. They are also below 0.3 dB. Their average percentages of the computations needed are 66.76%, 62.29%, 63.63%, and 64.31%, respectively. In Table 4, the average deviations of the four fractal coding methods are 0.16 dB, 0.12 dB, 0.18 dB, and 0.21 dB, respectively. Their percentages of the computations needed are 56.06%, 54.66%, 55.25%, and 55.19%, respectively. As a summary, compared with the prediction method in Section 3, the accelerated prediction method can provide competitive performance and about one-third of the computations in fractal encoding can be saved.

6.3. Application of the Proposed Prediction Method

In this part, the size of range blocks is set to be 4 × 4. We take 512 × 512 Lena image as the test image, perform Jacquin’s method on it, and simulate the practical applications with different thresholds . The detailed procedures are listed as follows.

Step 1. According to the practical demands, set the threshold as the lower limit of the quality of decoded images, such as 30 dB.

Step 2. Corresponding to the threshold in Step , compute the by (14), multiply it by the total number of range blocks, and get the threshold . For arbitrary input image, partition it uniformly into range blocks, sort them from largest to smallest by their variances, and encode them one by one.

Step 3. Take out one range block, encode it, and add its collage error to the ACE. If the ACE is larger than , the decoded image quality will be smaller than 30 dB, and stop the encoding process. If not, go to Step .

Step 4. Compute the LLPACE. If LLPACE is smaller than 90%, return to Step and encode the next range block. If not, stop the encoding process and compute the corresponding ACER with (13) and predict the PSNR of the decoded image. Whether fractal coding method is suitable can be determined.

For Lena image, while varies from 35 dB to 41 dB, Figure 10 illustrates the corresponding percentages of the computations needed in fractal encoding. Since the actual PSNR of the decoded image for Lena image is 36.67 dB, if is equal to or smaller than 36 dB, the fractal coding method can satisfy the practical demand. According to Table 3, we know that we always need 69.73% of the computations in fractal encoding. If is set to be above 37 dB, the fractal coding method can not satisfy the practical demand. As increases, the percentage of the computations needed decreases. If is set to be 41 dB or larger, the percentage of the computations in fractal encoding approximates 0%. That is to say, in this case, if we want to know whether fractal coding method can satisfy the practical demand or not, we only need to encode a small number of range blocks.

7. Conclusion

Based on the logarithmic relationship between the ACER and PSNR of the decoded image, a prediction method is proposed to estimate the PSNR of the decoded image in fractal encoding process. Furthermore, by theoretical derivations and analyses, an accelerated version of the above prediction method is also introduced. Experiments show that the proposed method can predict the quality of decoded images accurately. The accelerated prediction method can provide competitive performance while about one-third of total computations in fractal encoding process can be saved. In addition, the proposed method can be also applied in practical applications and simulations verify its effectiveness.

In the future research, we will attempt to explore the relationship between the quality of decoded images and some unknown features of the input image, so that we can predict the quality of decoded image more accurately. It really has theoretical as well as practical meanings.

Conflict of Interests

The authors declare that they have no conflict of interests regarding the publication of this paper.

Acknowledgments

This work is partially supported by the Fundamental Research Funds for the Central Universities (Grant no. 3132014090) and the National 863 Program of China (Grant no. 2011AA110201).