Optimization of Fractal Compression of 3d Images Using a Genetic Algorithm

3D image technologies are widely recognized as the next generation of visual presentation considering the achievement of more natural experiences. To produce such images, two cameras are placed in a bit different position. When we seek to compress such images, we need a procedure to compress two images synchronously. In this paper , a procedure is presented for a suitable compression based on fractal compression which shows that we obtain high compression rate with an appropriate image quality; however, since the proposed procedure has a low search speed, we used genetic algorithm to remove the case.


INTRODUCTION
The use of artificial intelligence techniques has been today developed in different applications of image processing science.Image compression has not been an exception to this rule and in this way, several procedures have already been provided.To produce such images, two cameras are placed in a bit different position [4].Embossed imaging is achieved by using two cameras regularly taking pictures from a zone with different positions.Common scenario of compression which is considered for such images includes saving an image called Reference Image plus a difference compensation, on the other hand, which is called Target Image.In this structure, the left image is called Reference Image and the right image is called Target Image [5].The procedure used to code 3D images includes omission of inter-space redundancy from both reference and target images.In general function of stereo coding, image data is evaluated considering the difference of the two images.Reference image and compensation image are coded and the images are coded and transmitted altogether [6].This procedure is based on this assumption that in an im-age, some parts of image can be observed in other areas of the image on a complete or transformed basis.The repeated points can be therefore used instead of stating all points of the image.There are several compression procedures, but fractal compression is a suitable procedure for coding an image which uses the existing self-similarity characteristics in the image to code it.Although fractal compression provides a high quality and a high compression rate, it has been less practically used, as compared to other compression algorithms, thanks to its relatively long coding time.The major time spent in fractal compression is for finding the best domain block for each border block.In this paper, a procedure is presented that uses genetic algorithm to search for the best block with a high speed.By using these procedures, the time for coding operation decreases while at the same time quality is preserved.
shows roughness of the world and its energy and dynamic transformations.This geometry was first introduced in 1980 by Benoit Mandelbrot.Foundation of fractal geometry is based on this assumption that natural shapes are self-similar and have been formed by the lawful repetition of an original block.Fractals are classified into two groups, namely artificial and natural fractals and in simple words, they have three general properties: 1) self-similar, 2) formation by repetition, 3) fractional dimension.
Fractals are used for image coding because of the following two hypotheses: 1) several natural landscapes contain these details in their detailed structure; 2) an Iterative Function system (IFS) can be found to generate a landscape with a close approximation and with the minimum transformation.
Fractal decoding of an image has an easier process.The most difficult work is to find the fractals during decoding process.All the work which is done during decoding includes interpretation of fractal codes and their translation into bit design image.During contractual transformation of bit design images into fractal data, two great advantages of that can be immediately understood.The first advantage is the capability to increase or decrease the size of each fractal image without any acquaintance with characteristics of the image or causing any defect in the details that occur in the bit design images.The second advantage includes this reality that the size of physical data used to store fractal codes is much smaller than that of main bit design data.Therefore, fractal compression is suitable to be used in database of images and CD Rom applications.Volume and resolution of reference bit design can have a significant effect on fractal compression.

COMPRESSION OF 3D IMAGES USING FRACTAL STRUCTURE
In this procedure, a series of transformations used to express self-similar sections of image is used to express an image.For this purpose, the input image is divided into non-overlapping blocks called Range with R×P dimensions and overlapping blocks called Domain with D×D dimensions.Then, a suitable block and w transformation is found from inside the series of domains for each range block in the manner that the error between the intended block and the corresponding transformed domain block is the minimum error.

Fig. 1. Transformations of range and domain
The transformation in which each pixel of domain block is changed to a range block is explained by equation ( 1) [1].
express self-similar sections of image is used to express an image.For this purpose, the input image is divided into non-overlapping blocks called Range with R * P dimensions and overlapping blocks called Domain with D * D dimensions.Then, a suitable block and w transformation is found from inside the series of domains for each range block in the manner that the error between the intended block and the corresponding transformed domain block is the minimum error.

Figure 3.1) Transformations of range and domain
The transformation in which each pixel of domain block is changed to a range block is explained by equation 3.1 [1].Where, z specifies gray surface of pixel with (x, y) coordinates in the range, si and oi control brightness and brilliance changes and e, f expresses displacement extent of domain block as compared to range block.Moreover, a, b, c, d are used to specify one of the eight existing symmetries that include four rotations and four reflections.These eight symmetries include the block, 90°, 180° and 270° rotations, reflection around ys axes, reflection around xs axes, reflection around y = x axis and reflection around y = -x axis.Therefore, w transformation changes a domain block to a range block by applying transformation, rotation and change of brightness and brilliance.In general, image fractal compression algorithm has three steps as follows: 1) First, the input image is divided to range nonoverlapping blocks.These blocks are usually considered as fix sized square blocks.2) Input image is divided to range overlapping blocks.The size of blocks can be considered two times the size of domain blocks.3) All domain blocks and their isometrics are searched for each range block to find a suitable domain block.
First of all, one of the possible eight symmetries is applied on the domain block.The size of rotated domain block is then changed to be equal to the size of range block.After that, optimum amounts of s and o are calculated and finally the difference between range block and the changed domain is obtained.If this error is less than the predefined threshold, the search will be finished [1].

STAGES OF PROPOSED ALGORITHM
Searching operations start after dividing the image into a range and domain blocks, equalizing the sizes of domain and range blocks and calculating the specificity vector for domain blocks.Method of searching operations for each block is in the manner that specificity vector of range block is first compared with itself and each of the shifts of specificity vector of domain block, respectively.Where two vectors are equalized, searching is finished provided that the amount of calculated error is smaller than the level of considered threshold; otherwise, searching will be finished.Completion of searching means that the domain block is suitable for the intended range block.Finally, mapping data is stored.Then, we deal with genetic algorithm to achieve the intended result by using fractal compression.Genetic algorithm for fractal compression of images is as follows [3]: • Characteristic of Chromosomes.Considering encoding parameters of the areas, a chromosome is formed by N genes.N is equal to the number of non-coded areas of the image.Genes are formed by three parameters.XDom,YDom indicates the coordinates of domain block and Flip indicates transformation isometrics.These three parameters are integers.A representative of genes and chromosomes is displayed as below (Figs. 3 and 4).
• Genetic Operators.Combination and mutation of two are reliable for reproduction which is defined by considering the speci-fications of chromosomes in genetic actuators.
In the first stage, we combine chromosomes which are necessary for production of initial population that indicates the possible solution for the problem (Fig. 5).

Fig. 5. Combination actuator image
All chromosomes in combination actuator are selected randomly.In mutation actuator, a chromosome is selected randomly and its genes change randomly as well (Fig. 6).
• Fitness Function.Fitness function is a function specific for each chromosome which indicates the capability of each chromosome for survival and reproduction.We used PSNR function as fitness function:   After performing genetic algorithm, as we know, stereo images are constituted of stereo couples.All the works performed so far have been performed only on one image (left image).We perform the same operations for the second image as well.

RESULTS OF EVALUATION AND COMPARISON WITH OTHER PROCEDURES
In this section, the results of proposed algorithm are compared with those obtained from encoding procedures of images such as DCT,DWT.The proposed algorithm has been tested on the corridor image in MATLAB environment.In this test, the sizes of range blocks, domain blocks and search window were considered 16×16, 32×32 and 50 pixels, respectively.For the purpose of quality of results, signal to noise ratio is used in the images [7].Table 1 shows the results of DCT,DWT algorithms tests.As it is seen in the images (Figs.7-10) and Table 2, we see that fractal compression of images provides better results with a higher quality.Considering the optimization of image by genetic algorithm, we have achieved a shorter time.128

CONCLUSION
As it was seen above, there are several studies and achievements for image fractal compression.In this regard, we have achieved a high speed and a high compression rate.Achievement of higher rates is possible; however, it is not currently necessary.Now, the main problem is not how to increase compression level or to accelerate that.In fact, the main problem includes two points: 1) First, we should improve the quality of decompressed images.In this way, this procedure will be highly welcomed.
2) The second point is to find practical ways for more utilization of fractal compression in different fields.
The world around us consists of different fractals.Fractals are everywhere.We should only know how to benefit from them, whether in images or in other cases.

Figure 4 . 4 )
Figure 4.4) Mutation actuator image  Fitness Function Fitness function is a function specific for each chromosome which indicates the capability of each chromosome for survival and reproduction.We used PSNR function as fitness function.

Table 1 .
Results of simulation of proposed image and main image with different algorithms

Table 2 .
Image parameters by fractal compressionAdvances in Science and Technology Research Journal Vol. 9 (26) 2015