FRACTAL-BASED IMAGE ENCODING AND COMPRESSION TECHNIQUES FRACTAL-BASED IMAGE ENCODING AND COMPRESSION TECHNIQUES

literally means that the scheme or the method is an entity performing encoding on the images, that is, transforming an image from one representation form to another, which is the correct for our purpose. It looks like many computer scientists use this wrong wording as standard nomenclature. Compression is commonly confused with the notion of encoding. Compression is done solely to the number of symbols represent It is achieved with the help of speciﬁc encoding of information. The process of reducing the size of a data ﬁle is popularly referred to as data compression , In computer science and information theory, data compression , source coding , or bit-rate reduction is the process of encoding digital information using fewer bits than the original representation. Specifically, digital-image compression is important due to the high storage and transmission requirements. Various compression methods have been proposed using different techniques to achieve high compression ratios. Fractal image encoding is a technique based on the representation of an image by contractive transformations. Fractal-based image compression methods belong to different categories according to the different theories they are based on. In this article, first we try to clarify the terminology used and then to comprehensively unveil the mathematical principle behind fractal image compression as well as to briefly overview a variety of schemes that have been investigated.


Introduction
The fractal transform was discovered in 1988 by Michael F. Barnsley. It is the basis for an image compression scheme which was initially developed by Alan D. Sloan and M. F. Barnsley at Iterated Systems, Inc. They used the similarities on different scales throughout images to assist in compression. Since then, the research literature on attractor image coding, fractal-based image coding, fractal image coding, fractal-based image compression, fractal image compression, fractal-based image encoding, fractal image encoding and fractal image approximation has experienced a rapid growth. First of all, let's understand the interconnections between these topics by clarifying the terms coding and encoding.

Etymology and Meaning
The origin of the word code is traced to the Latin word codex, a manuscript (hand-written) volume, which in turn comes from the Latin caudex, trunk of a tree or block of wood. It can be used as either a noun or a verb. When used as a noun, it means a collection of laws or a system of principles and rules (canons). In our context, it means a system of symbols and rules used as instructions (statements) to a computer or the symbolic arrangement of them -a computer program; for instance, instructions written by a programmer in a programming language are often called source code.
When code is used as a verb, it is commonly confused with encode. There is a strong difference between the two words: G to code means to express information through a proper standard representation. In the context of computer science it refers to write or revise a computer program. G to encode means to perform an operation that transforms some information from one representation form to another. Something that is performing the act of encoding is, for example, an encrypter or a compressor.
Saying 'image-coding schemes' or 'image-coding methods' literally means that the scheme or the method expresses information relative to an image. Saying instead 'image-encoding schemes' or 'image-encoding methods' literally means that the scheme or the method is an entity performing encoding on the images, that is, transforming an image from one representation form to another, which is the correct for our purpose. It looks like many computer scientists use this wrong wording as standard nomenclature.

Key Terms
Compression is commonly confused with the notion of encoding. Compression is done solely to lessen the number of symbols to represent given piece of information. It is achieved with the help of specific encoding of information. The process of reducing the size of a data file is popularly referred to as data compression, In computer science and information theory, data compression, source coding, or bit-rate reduction is the process of encoding digital information using fewer bits than the original representation. Specifically, digital-image compression is important due to the high storage and transmission requirements. Various  although its formal name is source coding (coding done at the source of the data before it is stored or transmitted). Image compression is the application of data compression on digital images. The objective of image compression is to reduce irrelevance and redundancy of the image data in order to be able to store or transmit data in an efficient form. Compression can be either lossless or lossy.
The term fractal is coined by Benoît B. Mandelbrot in 1975, about a decade after the publication of his paper on statistical selfsimilarity in the coastline of Britain. One often cited description that he published to describe geometric fractals is 'a rough or fragmented geometric shape that can be split into parts, each of which is (at least approximately) a reduced-size copy of the whole'; this is generally helpful but limited. A fractal is by definition a set for which the Hausdorff-Besicovitch dimension strictly exceeds its topological dimension. However, since Hausdorff-Besicovitch dimension is often difficult to calculate, the fractal dimension is used instead. An iterated function system is a method for constructing fractals and makes the basis of most fractal-based image compression methods. A fractal interpolation function can be considered as a continuous function whose graph is the attractor of an appropriately chosen iterated function system. If this graph, usually of nonintegral dimension, belongs to the three dimensional space and has Hausdorff-Besicovitch dimension between 2 and 3, then the resulting attractor is called fractal interpolation surface.
Fractal compression refers to a number of lossy compression methods, based on fractals. When applied to digital images, it is called fractal image compression. It differs from pixel-based compression schemes such as Joint Photographic Experts Group (JPEG), Graphics Interchange Format (GIF) or Moving Picture Experts Group (MPEG) since no pixels are saved; for comparison's sake see [1]. It is best suited for textures and natural images, relying on the fact that parts of an image often resemble other parts of the same image. Special algorithms convert these parts into mathematical data called fractal codes which are used to recreate the encoded and compressed image. These codes can be decoded to fill any screen size without the loss of sharpness that occurs in conventional compression schemes.
The purpose of this article is to overview some basic approaches to fractal-based image encoding and compression in very simple terms, with as little mathematics as possible. Before delving into the main study, we first present the development of an iterated function system. Next, we examine the theoretical formulation of affine fractal interpolation functions as attractors of an appropriately defined iterated function system in two and three dimensions. Moreover, we examine an extension of the affine fractal interpolation functions, namely the piecewise affine fractal interpolation functions. Furthermore, some fundamental fractal compression schemes which use iterated function systems will be presented. Main differences with other fractal-based image compression schemes will be briefly explained. Finally, some conclusions will be drawn. A fairly full picture of the relevant literature is presented in [2] and [3] until the day of their publication. The concepts of fractals, iter-ated function systems and local iterated function systems are discussed and different implementations of compression of both still images and image sequences are reviewed in [4], [5], [6], [7], [8] and [9]. The bibliography presented here contains the recent bare essentials which are not included in the aforementioned articles.

Fractal Image Generation
In mathematics, an iterated function is a function which is composed with itself, possibly ad infinitum, in a process called iteration. Iteration means the act of repeating a process with the aim of approaching a desired goal, target or result. The formal definition of an iterated function on a set X follows. Let X be a set and f a function from Χ to itself i.e. a transformation. Define f k as the k-th iterate of f, where k is a non-negative integer, by f 0 ϭ id X and f kϩ1 ϭ f Њ f k , where id X is the identity function on X and f Њ g denotes function composition.
Α contraction mapping, or contraction, on a metric space (X, ρ) is a transformation f, with the property that there is a nonnegative real number s Ͻ 1 such that for all x and y in X, ρ(f(x), f(y)) Յ s ⋅ ρ(x, y), where ρ is a distance function between elements of X. The smallest such value of s is called the Lipschitz constant or contractivity factor of f. If the above condition is satisfied for s Յ 1, then the mapping is said to be non-expansive. A contraction mapping has at most one fixed point, i.e. a point x* in X such that f(x*) ϭ x*. Moreover, the Banach fixed point theorem, also known as the contraction mapping theorem or contraction mapping principle, states that every contraction mapping on a nonempty, complete metric space has a unique fixed point, and that for any x in X the iterated function sequence x, f(x), f(f(x)), f(f(f(x))), … converges to the fixed point. Furthermore, this fixed point can be found as follows: Start with an arbitrary element x 0 in X and define an iterative sequence by x n ϭ f(x nϪ1 ) for n ϭ 1, 2, 3, … . This sequence converges and its limit is x*. An iterated function system, or IFS for short, is defined as a collection of a complete metric space (X, ρ), e.g. ‫ޒ(‬ John E. Hutchinson showed in [10] that, for the metric space ‫ޒ‬ D n , such a (hyperbolic) system of functions has a unique compact (closed and bounded) fixed set S. One way for constructing a fixed set is to start with an initial point or set S 0 and iterate the actions of the w i , taking S nϩ1 to be the union of the image of S n under the w i ; then taking S to be the closure of the union of the S n . Symbolically, the unique fixed (nonempty compact) set S ʚ ‫ޒ‬ has the property . The set S is thus the fixed set of the Hutchinson operator where A is any subset of ‫ޒ‬ n . The operator H itself is a contraction with contractivity factor s ϭ max{s 1 , s 2 , …, s M } ( [11], Theorem 7.1, p. 81 or [12]). The existence and uniqueness of S, which is called the attractor of the IFS, is a consequence of the contraction mapping principle as is the fact that lim is the metric space of all nonempty, compact subsets of X with respect to some metric, e.g. the Hausdorff metric. The operator H is also called the collage map to alert us to the fact that H(A) is formed as a union or 'collage' of sets.
Fractals derived by IFSs can be of any number of dimensions, but are commonly computed and drawn in 2D. A fractal is made up of the union of several copies of itself, each copy being transformed by a function (hence 'function system'). The canonical example is the Sierpinski gasket; see Fig. 1. The functions are normally contractions which means they bring points closer together and make shapes smaller. Hence, such a shape is made up of several possibly-overlapping smaller copies of itself, each of which is also made up of copies of itself, ad infinitum. This is the source of its selfsimilar nature.
Note that this infinite process is not dependent upon the starting shape being a triangle -it is just clearer that way. The first few steps starting, for example, from a square also tend towards a Sierpinski gasket; see Sometimes each function w i is required to be a linear, or more generally an affine transformation, and hence represented by a matrix. A transformation w is affine, if it may be represented by a matrix A and translation t as w(x) ϭ Ax ϩ t, or, if X ϭ ‫ޒ‬ 2 , .
(1) w x y The code of w is the 6-tuple (a, b, c, s, d, e) and the code of an IFS is a table whose rows are the codes of w 1 , w 2 , …, w M . For the three-dimensional case (grey-scale images) this becomes , where I(x, y) denotes the grey-scale value at location (x, y). So, the similarity that exists in different parts of an image could be described in a finite set of instructions and data. Using some image-areas of the image, by rotating, resizing and stretching them, it is possible to generate other parts of the image. However, IFSs may also be built from non-linear functions, including projective and Möbius transformations.
The most common algorithm to compute fractals derived by IFSs is called the chaos game or random iteration algorithm. It consists of picking a random point in the plane, then iteratively applying one of the functions chosen at random from the function system and drawing the point. An alternative algorithm, the deterministic iteration algorithm, or DIA for short, is to generate each possible sequence of functions up to a given maximum length and then to plot the results of applying each of these sequences of functions to an initial point or shape.

Fractal Interpolation
Based on a theorem of J. E. Hutchinson ([10], p. 731) and using IFS theory [12], M. F. Barnsley introduced a class of functions (see [11]) which he called fractal interpolation functions. He worked basically with affine fractal interpolation functions, in the sense that they are obtained using affine transformations. Their main difference from elementary functions is their fractal character. Since their graphs usually have non-integral dimension, they can  Fig. 1 The evolution of the Sierpinski gasket Fig. 2 Iterating from a square be used to approximate image components such as the profiles of mountain ranges, the tops of clouds and horizons over forests, to name but a few. Applications of this theory include modelling of discrete sequences as in [13], modelling of speech signals as in [14] and compression of static images as in Ref.
[AlCl94] of [2]. The IFS ‫ޒ{‬ 2 ; w 1ϪM } has a unique attractor that is the graph of some continuous function which interpolates the data points. This function is called a fractal interpolation function, or FIF for short, because its graph usually has non-integral dimension. A section is defined as the function values between interpolation points. It is a self-affine function since each affine transformation w i maps the entire (graph of the) function to its section. The above function is known as affine FIF, or AFIF for short. For example, let {(0, 0), (0.4, 0.5), (0.7, 0.2), (1, 0)} be a given set of data points. Fig. 3 shows the graph of an AFIF with s 1 ϭ 0.5, s 2 ϭ Ϫ0.2 and s 3 ϭ 0.4. The closeness of fit of a FIF is mainly influenced by the determination of its vertical scaling factors. No direct way to find the optimum values of these factors exists and various approaches have been proposed in the literature.

Piecewise Affine Fractal Interpolation
The piecewise self-affine fractal model is a generalization of the affine fractal interpolation model and has its mathematical roots

Interpolation Functions in ‫ޒ‬ 2
Suppose we refer to an image as a function z ϭ z(x, y) that gives the grey level at each point (x, y). Let the discrete data {(x i , y j , z i,j ϭ z(x i , y j )) ʦ ‫ޒ‬ 3 : i ϭ 0, 1, …, N; j ϭ 0, 1, …, M} be known. Each affine mapping that comprises the hyperbolic IFS ‫ޒ{‬ 3 ; w 1ϪΝ, 1ϪΜ } is given by the following special form of (2) , with |s n,m | Ͻ 1 for every n ϭ 1, 2, …, N and m ϭ 1, 2, …, M. The condition ensures that is a similitude and the transformed surface does not vanish or flip over.
FIFs are suitable for data sets with points linearly ordered with respect to their abscissa. This is often sufficient, e.g. when interpo- lating time series data. In practice, however, there are many cases where the data are suitable for fractal interpolation but define a curve rather than a function, e.g. when modelling coastlines or plants. There exist methods for constructing fractal interpolation curves based on the theory of FIFs. These methods use various approaches, such as generalizations to higher dimensions, use of index coordinates or application of reversible transformations.

Fractal Image Encoding and Compression
Fractal encoding relies on the fact that all natural, and most artificial, objects contain redundant information in the form of similar, repeating patterns or fractals. The encoding process is computationally intensive. Depending upon the resolution and contents of the input bitmap data, and output quality, compression time, and file size parameters selected, compressing a single image could take anywhere from a few seconds to a few hours on even a fast computer; see also [15]. Decoding a fractal image is a much simpler process. All the decoding process needs to do is to interpret the fractal codes and translate them into a bitmap image.
The fundamental principle of fractal-based image compression consists of the representation of an image by an IFS of which the fixed point is 'close' to that image. In other words, the encoding process is first to find an IFS and then a suitable operator H whose fixed point is 'close' to the given image.

Based Directly on the Collage Theorem
The collage theorem characterizes an IFS whose attractor is close, relative to some metric, to a given set. The IFS described is composed of contractions whose images, as a collage or union when mapping the given set, are arbitrarily close to the given set.
where s ϭ max{s i : i ϭ 1, 2, …, N}. Therefore, the closer the union is to the given set, the closer the attractor of the IFS will be to the given set. The theorem, however, is not constructive, it does not indicate how to find a set of proper mappings, but rather, it provides a way to test an IFS without need for computation of the attractor.
To find an IFS for an image, based on the collage theorem and the property of IFS attractors, we split the whole image into non-overlapping segments whose union covers the entire image. If each segment is a transformed copy of the entire image or is very close to it, the combination of these transformations is the IFS of the original image. In other words, to encode an image into IFS is to find a set of contractive affine transformations, w 1 , w 2 , …, w N , so that the original image B is the union of the N subimages: B ϭ ϭ w 1 (B) ʜ w 2 (B) ʜ … ʜ w N (B).

Based on the Fractal Transform
The fractal transform [16] was considered to solve effectively the problem of finding a fractal which approximates a digital 'real world image.' This first practical fractal compression system for digital images resembles a vector quantization system using the image itself as the codebook.

Fractal Transform compression
Start with a digital image A 1 . Downsample (subsample) it by a factor of 2 to produce image A 2 . Now, for each block B 1 of 4ϫ4 pixels in A 1 , find the corresponding block B 2 in A 2 most similar to B 1 and then find the grey-scale or RGB offset and gain from A 2 to B 2 . For each destination block, output the positions of the source blocks and the color offsets and gains.
An image compressed in this way contains a minimal area plus a transformation matrix that contains all required information to reconstruct something similar to the original image by rotating, resizing and stretching this area. Therefore the task of fractal encoding algorithms is to find redundant areas of an image and to reduce these areas to the necessary information about attractor and transformation matrix. To perform this task, the image is divided into domains in coarse or fine resolution depending on the redundancy of the image. Then the routine searches the image for ranges that have a similarity to the domain that can be described by an affine transformation matrix. The names of these blocks are reversed in Ref. [7, p. 181] of [3].

Fractal Transform decompression
Starting with an empty destination image A 1 , repeat the following algorithm several times: Downsample A 1 down by a factor of 2 to produce image A 2 . Then copy blocks from A 2 to A 1 as directed by the compressed data, multiplying by the respective gains and adding the respective color offsets.
This algorithm is guaranteed to converge to an image, and it should appear similar to the original image. In fact, a slight mod-ification of the decompressor to run at block sizes larger than 4ϫ4 pixels produces a method of stretching images without causing the blockiness or blurriness of traditional linear resampling algorithms.

Based on Local (Partitioned) IFS
IFS approximates each part of the image by a transformed version of the whole image, but our intuition suggests that real-world images, generally, do not contain parts that are affine transforms of the whole image (Fig. 4). Nevertheless, different parts of the image may become similar under certain affine transformation. Therefore, an extension of the IFS, the Local or Partitioned IFS, has been developed to approximate each part of the image by a transformed version of another part of the image. Τhe first automated compression scheme for real world images using PIFS was developed by Arnaud E. Jacquin (Ref. [26] of [3]) in 1992.
Suppose we are given an image f we wish to encode. We divide the image into range blocks R 1 , R 2 , …, R i , …, R N , such that f ϭ ϭ R 1 ʜ R 2 ʜ ⋅⋅⋅ ʜ R N and R i ʝ R j ϭ л when i j. Therefore, the range blocks cover the whole image and do not overlap. The image is also divided into overlapping domain blocks D 1 , D 2 , …, D j , …, D M . For each range block R i , we find a contractive transformation wi and a domain block D j , so that R i Ϸ w i (D j ). The combination of w 1 , w 2 , …, w i , …, w N is called PIFS H. If H is simpler than the original image, we can encode f into H and achieve certain compression. When decoding, according to the contractive mapping fixed point theorem, as long as H is contractive, repeated application of H to an arbitrary image will result in a fixed image.
When H(f ) is close to f, the fixed image will be close to the original image f.
The three main issues involved in the design and implementation of a fractal block-coding system based on the above idea are (i) how the image is partitioned, (ii) the choice of a distortion measure between two images and (iii) types of contractive affine transformations to be used. We do not intend to discuss these issues; see [17] for highlighting the solution to the key and open issues in the fractal coding. It is noteworthy to mention, though, how important is to find a similar block so that the IFS accurately represents the input image, so a sufficient number of candidate blocks for D i need to be considered. On the other hand, a large search considering many blocks is computationally costly. This bottleneck of searching for similar blocks is why fractal encoding is slower than for example DCT, the underlying compression technique in JPEG, and wavelet based image representations.

Based on RIFS or on FIF
A RIFS is an improvement of LIFS using elements of the theory of Marcovian stochastic processes which can produce more natural looking images; see [18]. An image compression scheme using fractal interpolation surfaces which are attractors of some RIFSs is introduced in [19]. Alternative image compression methods which use the method presented in Subsection 3.3 can be found in [20]. Many enhancements and variations exist, as for example [21], but they fall beyond the scope of this discussion.
The resolution independence of a fractal-encoded image can be used to increase the display resolution of an image. During this process, also known as fractal interpolation, an image is encoded into fractal codes via fractal compression and subsequently decompressed at a higher resolution. The result is an up-sampled image in which an appropriately chosen iterated function system has been used as the interpolant. Because fractal interpolation operates on geometric information in the image, rather than pixel information, it maintains geometric detail very well compared to other interpolation methods.

Conclusions
Our clarification of terminology used in the existing literature led to the conclusion that fractal image compression is also called as fractal image encoding because a compressed image is represented by contractive transformations and mathematical functions required for reconstructing the original image.
Lossless compression methods are sometimes preferred for artificial images such as technical drawings, icons or comics. This is because lossy compression, especially when used at low bit rates, introduce compression artifacts. Lossless compression may also be preferred for high value content, such as medical imagery or image scans made for archival purposes. Lossy methods are especially suitable for natural images such as photos in applications where minor loss of fidelity is acceptable to achieve a substantial reduction in bit rate. For further details see [22] and [23].
Fractal image compression enables an incredible amount of data to be stored in highly compressed data files. An inherent feature of fractal compression is that images become resolution independent after being converted to fractal code. This is because the iterated function systems in the compressed file scale indefinitely. This indefinite property, known as fractal scaling or fractal zooming, leaves no trace of the original pixel structure.