A FAST ENCODING FRACTAL IMAGE COMPRESSION USING QUANTIZED QUAD-TREE PARTITIONING TECHNIQUES Qu

— Fractal Image Compression is a lossy compression method for images based on fractals rather than pixels, which are best suited for texture and natural images. It works on self similarity property, relying on the fact that parts of an image often resemble other parts of the same image. It takes long encoding time and affects the image quality. This paper introduces an improved quantized quad tree technique for fractal image compression. Quantized quad tree method divides the original gray level image into various blocks depending on features presented in image. Simulation results show that with the quantized quad trees compression improves the compression ratio and PSNR without losing the quality of the image compression with range block, domain block and iterations technique.


Introduction
The concept of fractal was described by IBM mathematician Benoit Mandelbrot. He found that traditional geometry was inadequate to describe the structure of natural objects which are complex such as mountain, cloud, coastlines and tree. M. Barnsley suggests principle of fractal image compression in 1988. Affine transformation applied on fractal image compression is combination of transformations i.e. rotation, scale change, skew or translation. The image after applying affine transformation is an approximation of original image. In Jacquin method the image is partitioned in sub images called as Range blocks and Partitioned Iterated Function System is applied on sub-images, rather than the entire image to find out most suitable domain block. Basic steps in fractal image compression are: (1) Partition of image to be encoded to form range blocks (2) Selection of domain pool (3) Form a class of transform applied to the domain block (4) Searching most suitable domain block for formation of particular range block. The aim of compression algorithm is to increase compression ratio and to minimize encoding time.

Overview of fractal image compression Partition scheme
The first decision regarding partition is the choice of the type of image partition used for the range blocks. Since domain blocks must be transformed to cover range blocks, this decision, together with the choice of block transformation described later, restricts the possible sizes and shapes of the domain blocks. A wide variety of partitions have been investigated, the majority being composed of rectangular blocks.
The following are the different types of partition scheme: Fixed size square blocks partitioning: The simplest possible range partition consists of the fixed size square blocks Fig 1(a) Quad tree partitioning: The quad tree partition employs the well known image partitioning technique based on a recursive splitting of selected image quadrants, enabling the resulting partition to be represented by a tree structure in which each nonterminal node has four descendents. The usual top down construction starts by selecting an initial level in the tree, corresponding to some maximum range block size, and recursively partitioning any block for which a match better than some preselected threshold is achieved Fig 1(b) Horizontal-vertical partitioning: The Horizontal-Vertical (HV) partition like the quad tree produces a tree-structured partition of the image. Instead of recursively splitting quadrants, however, each image block is split into two by a horizontal or vertical line. Splitting positions may be constructed so that boundaries tend to fall along prominent edges

Implementation of fixed fractal image compression
The work is divided into two parts 1) The fixed fractal image compressor 2) fractal image compressor based on quantized quad tree partitioning. Experimental result is the difference between the compression ratio, encoding time and PSNR between the proposed architecture i.e. quad tree and basic method (fixed fractal image compression).

Materials and Methods
Fractal Image coding involves partitioning of the image into non overlapping blocks called Range Blocks and Domain Blocks. Size of domain Blocks chosen were twice the size of the range Blocks. Steps 1 Share the images of non overlapped range blocks. In this, range blocks are rectangular, but other forms, for example triangles can also be used. Range blocks can be equal, but adaptive splitting with the variable size of blocks is more often used. It enables to fill densely parts in the images containing fine details with the range blocks of the small size. 2 Cover the image with sequence of the domain blocks which are overlapped and are of different sizes. 3 For every range block find the domain block and corresponding transformation which in the best way covers the range block. The Affine transformation is used. 4 Adjust parameter of transformation, such as contrast and brightness, for the best accordance. If there is not enough exact accordance, we subdivide range blocks to smaller range blocks. We continue this process until we achieve comprehensible accordance.

Implementation of fractal image compression by using quantized quad tree partitioning technique
Following shows the block diagram of quad tree shown in Fig. 3

Setting Domain Data
The domain data consist of domain size, location, number of domains and the classes of domains. Classification of domains is done using a scheme, which takes into account the brightness values of the domains.

Quad Tree Partitioning
In the quad-tree partitioning technique, the partitioning of two dimensional spaces like the image is executed repeatedly by subdividing the image into four quadrants or regions. This process is made to continue based on some threshold criteria. The shape of the partitioning regions may be of any arbitrary shapes. Quad-tree partitioning scheme is found analogous to a structure of a tree. The root of the tree is the initial image and each node of the tree is a square portion of the image which contains four sub nodes corresponding to the four quadrants of the square image. Eight possible orientations to each domain are applied to map the domain to the range (four rotation and flip with four rotations). The Domain Block is affine transformed and is compared with each of the Range block and a closest approximation of the domain block with that of the Range block is found as in equation based on the Root mean squared error calculated between the Range Blocks and the transformed domain Blocks. The square image is split up into four equal-sized sub squares recursively until the squares are small enough to be covered within some specified threshold value. In the implemented quad-tree encoding technique a square image size of 256*256 pixels is considered. The domain sizes are chosen to be twice the range sizes. The pixels in the domain are averaged in groups of four so that the domains are reduced to the size of the range for comparison purpose.

Domain, Range classification and matching
Range blocks are classified using the same classification scheme used for the domains, and then a search is carried out to determine the best domainrange match. The match operation is restricted to only those domains and ranges belonging to the same class, and the error between them (threshold) is computed. If this error value is less than the specified threshold, the transformation is calculated; else, the image is further partitioned. This process is repeated for the whole image. Thus, classification helps in reducing the search time and computational overhead involved during the matching operation.

Apply transform
An affine transformation can skew, stretch, rotate, scale, shear and translate an input image. The feature of these transformations that run in a loop back mode is that for a given initial image. Each image is formed from transformed copies of itself and hence it must have detail at every scale. These images are fractals. Store these images as collections of transformations lead to image compression. Where dk, rk, are the pixel values in the domain and range blocks respectively. N=number of pixels in range/domain block The above coefficients are quantized and stored in a compressed file. If the mean square error between the range and domain block exceeds a minimum mean square error specified by a parameter called q (quality), the range block is further split into 4 more blocks and the best affine map is again computed for each block. This process is repeated recursively until range block size reduces to 4x4 pixels.
Step 1: First of all, the original image is segmented to determine Dᵢ.
Step 2: Directly divided the Dᵢ into blocks, and find the right Rᵢ for each block.
Step 3: Exchange and sort the Dᵢ sub-blocks according to the block mean, and note the information of exchange. The block mean and exchange information are added as part of its code.
Step 4: Exchange Rᵢ according to the same method as step 3, and the exchange information is added as part of the code.
Step 5: Search the similar block of Dᵢ in Rᵢ, if found, continue next, if not found, look for the most similar block Rᵢ and calculate the correctional value to construct the fictitious Rᵢ, add the correctional value as part of the code.
Step 6: Repeat step 4 and 5 until it reaches the set of conditions.

Decoding
Step 1: Read the encoding file by sequences. First, read the block mean of Di and its exchange information. According to the exchange information, we can get the sub-block mean with the original order.
Step 2: Then read the correctional value and exchange information of Ri to calculate the mean of Ri.
Step 3: Repeat step 2 until reaching the smallest block size.

.Results and Discussions
FIC algorithm is designed using MATLAB simulation and the result of fractal image compression and Quad tree based fractal image compression are compared for various images.

Conclusion
In this paper, the performance of different types of FIC techniques employed in the present work, with regard to encoding time is summarized in Table . The following observations are drawn from the results 1The Quantized Quad tree based FIC performs better than the fixed partitioning FIC where the encoding time with quad tree based FIC is reduced from 5.537 sec to 1.9197 sec. 2The quad tree based FIC exhibits a superior performance with regard to encoding time. 3Also from the result conclude that the compression ratio of quad tree based FIC is higher than the fixed fractal image compression. 4For example, as in lena image shown the compression ratio is increases in quad tree based fractal image i.e. 90.09%