Crowding Optimization Method to Improve Fractal Image Compressions Based Iterated Function Systems

Fractals are geometric patterns generated by Iterated Function System theory. A popular technique known as fractal image compression is based on this theory, which assumes that redundancy in an image can be exploited by block-wise selfsimilarity and that the original image can be approximated by a finite iteration of fractal codes. This technique offers high compression ratio among other image compression techniques. However, it presents several drawbacks, such as the inverse proportionality between image quality and computational cost. Numerous approaches have been proposed to find a compromise between quality and cost. As an efficient optimization approach, genetic algorithm is used for this purpose. In this paper, a crowding method, an improved genetic algorithm, is used to optimize the search space in the target image by good approximation to the global optimum in a single run. The experimental results for the proposed method show good efficiency by decreasing the encoding time while retaining a high quality image compared with the classical method of fractal image compression. Keywords—Fractal; Iterated Function System (IFS); Genetic algorithm (GA); Crowding method; Fractal Image Compression (FIC)


INTRODUCTION
Fractal image compression (FIC) is produced from Barnsley's research IFS system [1] and the fractal image block coding suggested by Jacquin [2].In 1988, Barnsley [3] used FIC based on the theoretical IFS system to represent computer graphics and compress the aerial image.Using this approach, Barnsley obtained a compression ratio of 1000:1, but the approach requires manual interference.Thereafter, Jacquin suggested a new FIC method that depends on image block and can behave automatically without manual interference.This method has become a perfect representation for this research direction, in which FIC theory is realized.At present, FIC has obtained extensive interest from the research community, because of its novel concept, high compression ratio, independent resolution, and fast image decoding.This technique is based on the fractal inverse problem and aims to find an IFS, in which the attractor is close to a query image.
The emerging technique for image compression that based on fractal theory is fully different form traditional image compression techniques.It is focused on two main problems: the first one is how to find the IFS mappings and the second is finding of an efficient algorithm to find those mappings, such that, they can approximate the original image.Toward solving these problems, Jacquin [2] proposed an efficient technique by partitioning of a given image M into non-overlapping range blocks and an overlapping domain blocks, the IFS parameters is achieved by finding the best corresponding domain block for each range block.Therefore, as a result of this encoding process, we obtain a different transformation for each range block.If we composed all the transformations of all range blocks and iterated starting with the initial image, the attractor (fractal) that approximate the original image is produced, it is also called the fixed point of the transformations.This type of representation is called partitioned IFS [4] or local IFS [5].
Many researchers have emphasized on overlapping of an efficient and reliable image compression technique based on fractal.It is firstly presented by Barnsley and Sloan [6] in 1988, when they introduced of finding an IFS, whose attractor approximate the given image and the IFS is sent instead of sending the image itself over the channel.In 1992, A. Jacquin [7] Barnsley's student improved IFS theory and introduced the concept of local IFS through presenting the concept of fractal image coding.In 1994, Y. Fisher [4] made many improvements on Barnsley's algorithm.He combined his idea in a very famous book in this field.Since Jacquine's publication of the original fractal coding scheme, several papers try to popularize his work both in practical and theoretical [8], among others, however none of these attempts in general have been proven to be efficient.Therefore, many efforts are highlighted towards employing of evaluative algorithms.Numerus optimization models have been proposed to represent a normal evolution mechanism [9].Genetic algorithms [10,11] is one of these models.In these algorithms, the population represents as an IFS models and it is responsible of making adjustments toward the optimum through a random process that used for selection of genetic operators called crossover and mutation.
GAs that are used to address an optimization problem are required to solve multimodal and multidimensional problems, through which a large search space with different optima can be obtained.These problems do not have deterministic algorithms to obtain the global optimum; if they do exist, however, the algorithm is an inclusive search along the www.ijacsa.thesai.orgsolution space that, in turn, leads to exponential time and machine resources using algorithms of this kinds in solving the problem described above.Therefore, the algorithms used to solve various complex problems can show their respective capacities.The GAs work with population of individuals that are iteratively adjusted towards the optimum by means of a random operation of selection restructure and mutation [11].
Meanwhile, crowding is a technique that is applied in GAs to maintain variety in the population and prohibit early convergence to local optima.This technique involves the combination of both the offspring and the identical individual from the present population in this process, which is called coupling phase; determining which of the two will remain in the population is a process called alternation phase [12].The current work depends on the alternation phase of crowding, which is applied by using one of the following three approaches: deterministic [12,13], probabilistic [14,15], and simulated annealing [16].In our work, we used an improved crowding method to achieve the aim with a shorter time and good quality.We achieved our goal by selecting the chromosome for a maximum of three times to prevent repetitive selection and provide an opportunity to check another chromosome that may obtain a better result.
The rest of the paper is presented as follows; section 2 presents the theoretical background of fractal, fractal inverse problem, and PIFS.The detailed explanations on the fractal image compression, collage theorem, and Jacquin approach for fractal image coding are discussed in sections 3. The GA and its relationship with the fractal image compression in introduced in section 4. Crowding method and its improved version is introduced in section 5.The implementation and the analysis of the results is discussed in section 6.Finally, the work is concluded in section 7.

II. BASIC CONCEPTS OF FRACTAL IMAGE CODING
The theory of self-affine transformation and self-similarity is the bases that fractal image coding depends on.In this section, we introduce the theoretical basis for fractal image compression, such as the IFS, contraction mapping, and fixed point theorem.

A. Self-similarity Property
One of the base properties of fractal image is selfsimilarity.A typical image is said to be self-similar if the image looks "almost" the same on any scale.However, all images do not contain this kind of self-similarity found in fractals and actually contains different sort of similar parts (Distasi et al. [17], Truongx et al. [18]).Figure 1 shows an example of this fractal image.
Self-similar parts in the Lena image are shown in Figure 2, as can be seen in part of her shoulder and the reflection in the mirror with her hat [19].In this type of image, only a portion of an image is self-similar, whereas, in Figure 1, the whole image is self-similar.Readers that are interested in greater detail can refer to [3,20].
) where , and are real numbers.This transformation is called a (two-dimensional) affine transformation.The following equivalent notations have been used: matrix, and l is the column vector ( ), such as ( ) .
The matrix A can always be written as follows: Definition 2: let ( ) be a metric space, a transformation is called contractive mapping if (( ) ( )) ( ) for all  , where is called contractivity factor of .www.ijacsa.thesai.orgDefinition 3: Let be a transformation on a metric space (X, d), a point such that ( ) is called the fixed point of the transformation .The fixed point is highly important; it represents that the part of the shape in which we are interested that is not affected by the transformation.
The Hausdorff metric is an important concept in fractal theory.Therefore, many mathematicians have discussed and proven basic concepts and results of this space [21,22].The Hausdorff metric is known as the space of fractals and is denoted by ( ) It is generated from the complete metric space comprising elements that are the compact sets in .The distance that is defined in ( ) is given as follows.
Definition 4: Let (X, d) be a complete metric space, for the space of fractal ( ) , The Hausdorff distance is defined on this space as follows:- for any points and  ( ) ) The IFS is the most important concept of fractal theory.The IFS was developed by Hutchison (1981), and then by Barnsley and other researchers [1,6].These systems of mapping have been widely discussed and used in many applications, such as image compression.The general formula for IFS is introduced as follows.

III. FRACTAL IMAGE COMPRESSION
The FIC approach is an important search area with many possible application fields.This approach is focused on finding fractal code that generates given objects.Barnsley [3] introduced this concept with the well-known collage theorem.When the object is considered as an image, FIC is often involved, which is also known as fractal image coding.The foundation for FIC is the IFS.This problem has been studied by many authors, and a method has been proposed by Jacquine [7] to solve this type of inverse problem.The major problem of standard fractal image coding is its time consumption compared with other image coding methods.Some time is spent in searching for a similar domain block.Therefore, new techniques to solve this problem and accelerate this method are in great demand.
The problem of finding IFS's that used to generate fractal is called an inverse problem.However, if the given set is selfsimilar, then the required construction is almost straightforward.The IFS can easily be found by conducting mathematical translation of the property of self-similarity.This solution is verified in the collage theorem, which is the first step towards solving the inverse problem.

A. The Collage Theorem
This theorem states the process of obtaining the set of transformations that represent an accurate approximation of a fixed image.It is stated as follows.

Let (
) be a complete metric space.let be an IFS with contractivity factor s, and let be a closed subset of such that for some , and h is the Hausdorff distance.Then where is the attractor of the IFSs B. Jacquin Approach for Fractal Image Compression FIC depends on the self-similarity property in an image.The main idea comes from the partitioned iterated function system (PIFS), which is an expansion of IFS theory.The difference between the two concepts appears in the application domain.Thus, the main difference is that instead of dealing with the whole image, a specific part is used to obtain the PIFS parameters.
For an original image M of size mm, it is partitioned into (m/n) 2 blocks which are non-overlapping to form a set of range blocks each of them is of size mm.To comply with the contractive point theorem, the domain block is twice the size of the range block.Hence, a set of (m-2n+1) 2 elements, each of them is a block of size 2n2n is constructed from M and known as domain blocks.In this case, the partitioned is overlapping.In each search for similarity between the range and domain blocks, two types of blocks emerge from the same image, as shown in Figure 3.As an example, for M of size 128128 if the size of the each range block is 88, then we have (128/8) 2 = 256 range blocks and (128-28+1) 2 = 12,769 domain blocks of size 1616.The image is equally partitioned by the range blocks, which resulted that each pixel of the image is included in one of the range blocks.However, since the domain block is overlapping, this may cause losing of some pixels.The aim of www.ijacsa.thesai.orgthis process is to find an approximate domain block for each range block.
By the PIFS technique, the third dimension is appeared that represent the pixel z. after shrinking the domain block to the size of the range block, the eight transformation is applied to resulted in eight different blocks z k , k =0, 1,…, 7.These transformations , k =0, 1,…, 7 can be represented in (2).
T 1 and T 2 correspond to the flips of z along the horizontal and vertical lines, respectively.The flip of z along the horizontal and the vertical lines is denoted by T 3 , whereas, an additional flip along the line of the main diagonal is performed by the transformations T 4 , T 5 , T 6 , and T 7 which are correspond to T 0 , T 1 , T 2 , and T 3 .Finally T 0 (z) = z.
In fractal coding, a contrast scaling s and a brightness offset o on the transformed blocks occur, so the fractal affine transformation becomes three-dimensional as shown in (3).
We let and be two squares containing pixel from and , respectively.Here, we minimize the quantity of and between of the coded range block X D and its corresponding coordinates of the domain block Y D , such as; where the minimum distance between R i and D i is found by the RMS such that; When this error is less than the predefined threshold, the search will be finished.
The execution time of fractal compression implementation is the main problem that most standard algorithms.Fisher's algorithm [4], involves a classification pattern that has been greatly accelerated; however, the resulting image quality is extremely poor because of the search space reduction from the classification used by Fisher.To overcome these problems, some evolutionary algorithms is used to serve in solving these problems, its methodology is introduced in the following section.
IV. GENETIC ALGORITHM Using a GA is important for obtaining solutions to complicated search problem.In this section, we discuss the relationship between the processing of GA and its operation when dealing with the fractal inverse problem.Holland's 1975 book [10] introduced GAs as a summary of biological evolution and showed the theoretical structure of GAs.

A. Genetic Algorithm for Fractal Image Compression
Searching processes begin after dividing the image into range and domain blocks as in standard Jacquine approach image compression.For each range block, the domain block and identical transformations that best cover the range block is specific.In general, for best correspondence, transformation codes are set, including contrast and brightness.Searching succeeds when the domain block is appropriate for the suitable range block.Eventually, mapping data are stored.Then, we use GAs to attain the intended outcome via fractal compression.Usually, GAs are employed to find the near optimal solution, and thus the GA for fractal compression of images is shown below [10].

1) Chromosomes
Given that, the GA works on the chromosomes, producing chromosomes from the range and domain blocks is a crucial step in using the GA for FIC.The transformation parameters obtained for each block are coded on a set of a fixed number of bits.These parameters are then stored as chromosomes.By encoding the parameters of an image, a chromosome comprises N genes that are equal to the number of the noncoded parts of an image.These genes are generated from parameters X D and Y D , which refer to the coordinates of the domain block, and the flip, refers to the transformation isometrics.Figure 4

2) Fitness Function
Fitness function is a specific task for each chromosome, which refers to the capability of each chromosome to survive and proliferate.We denote fitness as the value of error between the coded range and domain blocks that are assigned by the transformation with analogous luminance and contrasting values.The error is computed using the root mean square equation (4).

3) Genetic Operators
Crossover and mutation are two basic operators that are used in all implementations of genetic algorithms.These operators are described as follows.
 Crossover Operator: The crossover operator selects two parents based on their fitness, and then attempts to produce a new child with the best possible quality.A high fitness value provides the crossover operator with a high probability of selection.The crossover operator changes the genes of the parent.Given that a random number a is produced in the interval [0, 1], the new coordinates are computed using the equation below.www.ijacsa.thesai.orgFirst offspring ( )  Mutation Operator: The mutation operator changes the value of one or more genes in the chromosome, thereby adding completely new gene values to the gene pool.
The GA may achieve a better solution using these new values.The mutation operator also introduces the verity in the chromosomes.The information changes randomly based on the mutation rate.

B. Genetic Algorithm for Fractal Image Compression
Fractal image compression algorithm 1. Decompose the input image M into blocks according to Jacquine's technique 2. Begin with FIC parameters, such as range block size, fitness function, error limit, and number of iterations; 3. Begin with GA parameters, such as mutation rate and crossover rate; 4. Set t = some tolerance level; 5. Partition image M into non-overlapping ranges R i 's and overlapping domain D i ;s; For each range block R i in the range, do -The transformations (a random population of chromosomes) is generated while number of populations is not the maximum and the optimal domain is not found, Do  The fitness value is computed for all individuals to be used for search for the optimal domain in the domain pool using the fitness function;  when the optimal domain block is found;  apply the crossover operator on individuals;  apply the mutation operator on individuals; and  generate the new population; end while The obtained transformation parameters from the search is written in the transformation W end for V. CROWDING METHOD De Jong [23] introduced crowding as a general technique for maintaining population variety and early convergence.Crowding is often used to determine survival of genetic algorithms in order to determine the individuals in the present population and identify the offspring that will pass to the next generation.It is divided into two principal phases, namely, coupling and alteration.In the coupling phase, the offspring individuals are coupled with individuals in the present population based on a likeness metric.Meanwhile, in the alteration phase, the pairs of offspring and individuals that will remain in the population are selected.The main crowding scheme of De Jong [23] involves the random selection of offspring individuals from the present population.The identical selected of individual is used to replace the selected offspring.Which makes crowding is an improved genetic algorithm is that; 1) In the crowding method, parent selection is not commonly used, therefore, the individuals are randomly paired in the present population.However, in the population, each individual becomes a parent.
2) In the crossover operator, for each pair (P 1 , P 2 ), the parents are recombined with probability P c .In the mutation operator, the two producing children (c 1 , c 2 ) are mutated with probability P m , where P c denotes crossover probability, P m denotes mutation probability, and M denotes population size [13].
3) The population of the next offspring includes one of the two parents that complete with each child.
4) The distance between two individuals i 1 , i 2 is denoted by p 1  win the emulation between p 1 and c 1 .p 2  win the emulation between p 2 and c 2 .Else p 1  win the emulation between p 1 and c 2 .p 2  win the emulation between p 2 and c 1 .For survival, each offspring oriented to fight with its most identical parent.Other variants exist when more than two parents and children are selected before applying the resemblance metric [26].This idea is the basis of several widely applied modern crowding approaches.The difference between these approaches is used to determine the winner in each competition.

B. The Proposed Crowding Algorithm for FIC
The crowding method [23] is proposed to eliminate the selection process and introduce a preselecting process.This will cause in a very fast GA to be used for multidimensional optimization problem.By reducing the selection process, the individuals are mutate randomly with any other population individuals.During the replacement process the paining between the offspring and one of the parents is performed first.This operation is done with probability P c .This pairing process is happened according to the similarity between them.In the evaluation step, the fitness function which represented the least square error between the offspring and the parents is responsible for deciding about which individual of the population is allowed to stay.
In this section, we proposed an improved crowding method in order to be applied to improve FIC.With this method the diversity is preserved in the population with the opportunity for each individual to be a parent.What distinguish our proposed method from original crowding method [23] and Mahfoud method [13] is some technical differences in the main phases of the algorithm.The population set {T 1 ,T 2 ,…,T n } is constructed by finding all contruction mapping T i that resulted from the similarity measure between the range block and domain block of the query image.This set is calculated using Jacquine approach [7].Each individual T i is assigned a fitness value f(T i ) as its weight, where f i {f 1 ,f 2 ,…,f n } represents the minimum distance www.ijacsa.thesai.orgappropriate error for the affine transformation.The partitions of range blocks were calculated according to (m/n) 2 , while the partitions of domain blocks were calculated according to (m-2n+1) 2 .Table 3 illustrates the coding, decoding, time, and compression ratio of the selection images using the proposed technique, while Table 4 illustrates the peak signal-to-noise ratio (PSNR) and MSE of some selection images using the proposed technique.

B. Analysis
The results of the abovementioned algorithms in terms of compression ratio, quality, and implementation time (coding time) are compared for the genetic and crowding FIC algorithms with the standard FIC algorithm as shown in Tables 1-6.The comparison was performed on an image with a range pool containing 16384 range blocks of size 4×4 and a domain pool containing 255025 domain blocks of size 88.Table 5 presents the comparison results.
In the chosen images, the PSNR is inversely proportional to MSE, and the compression ratio is proportional to that value.A small range block size resulted in a higher compression ratio.The time for producing the image depends on how much error is allowed in the transformations.The employ of the image determines the required amount of compression and the image quality.The predefined number M is used as an indicator that determine the number of times for selecting the individual as a parent.This modification in the selection in new generation.This diversity in the population that achieved by the crowding method resulted in some advantages, which are:-1) Through the search, different local maxima can be achieved.
2) The diversity is maintained.
3) For different crowding factor, the subpopulation is almost stable.
The replacement process is responsible about picking the new individual to construct new population.
By applying the proposed crowding method the following results is obtained.Tables 1-6 represent the analysis of the results for some chosen images.

VII. CONCLUSIONS
Image compression technique is always in a continuous competition and challenge according to the fast developing of the technology fractal image compression is an emerging technology that based on the fast that most of real world images contain some redundant area that are similar to the other area in the same image.It is basic idea is how to express an image by a set of IFSs.The argumentative discussion about compromising between the compression ratio and the contracted image quality is motivation for new optimized technique towards this goal.Genetic algorithm is ….. to be appropriate used to solve of a multidimensional problem that have large search space with no exact solution exist.In this study, we improve this technique by omitting of the parent selection which resulted, each individual becomes a parent.However, the selection process is specified by a pre-defined value known as crowding factor that determine the number of selection of each individual.Therefore, each offspring is randomly selected from the population, and its most identical parent.Comparing the performance of the proposed technique is accomplished through some experiments which show best result over the standard fractal compression technique and standard genetic algorithm technique as shown in tables (6) and charts (1)(2)(3).From these figures are can see that RMS error is inversely proportional to the PRNS ratio.They show a good compromise value that resulted in good performances.

Definition 5 :Definition 6 :
Let (X, d) be a complete metric space.An IFS on l is a finite set of contractive self-mappings with respective contractivity factors for such that.IFS is based on the affine transformations given by In IFS, any compact subset (fixed point)  ( ) is called an attractor for IFS if ⋃ ( ).The fixed point observes existence and uniqueness based on the contraction mapping theorem.The iteration process of the IFS based on any starting image the attractor, which is fully known by the parameters of .

TABLE III .
CODING, DECODING TIME, AND COMPRESSION RATIO ON THE PROPOSED METHOD FOR DIFFERENT RANGE SIZE

TABLE II .
FRACTAL IMAGE COMPRESSION BASED ON GENETIC ALGORITHM