Image Compression Using Fractal Functions

The rapid growth of geographic information technologies in the field of processing and analysis of spatial data has led to a significant increase in the role of geographic information systems in various fields of human activity. However, solving complex problems requires the use of large amounts of spatial data, efficient storage of data on on-board recording media and their transmission via communication channels. This leads to the need to create new effective methods of compression and data transmission of remote sensing of the Earth. The possibility of using fractal functions for image processing, which were transmitted via the satellite radio channel of a spacecraft, is considered. The information obtained by such a system is presented in the form of aerospace images that need to be processed and analyzed in order to obtain information about the objects that are displayed. An algorithm for constructing image encoding–decoding using a class of continuous functions that depend on a finite set of parameters and have fractal properties is investigated. The mathematical model used in fractal image compression is called a system of iterative functions. The encoding process is time consuming because it performs a large number of transformations and mathematical calculations. However, due to this, a high degree of image compression is achieved. This class of functions has an interesting property—knowing the initial sets of numbers, we can easily calculate the value of the function, but when the values of the function are known, it is very difficult to return the initial set of values, because there are a huge number of such combinations. Therefore, in order to de-encode the image, it is necessary to know fractal codes that will help to restore the raster image.


Introduction
Remote sensing of the Earth (REE) is the observation of our planet and the determination of the properties of objects on the earth's surface, obtained with the help of imaging devices installed on aircraft and artificial satellites of the Earth (Figure 1). The obtained data are aerospace images of the observed part of the earth's surface in digital form in the form of raster images (Figures 2 and 3). These data are subject to further detailed analysis, namely, the determination of quantitative characteristics of the object under study, which are necessary to predict the development of a phenomenon or process. The processing and interpretation of remote sensing data is closely related to digital image processing. Remote sensing allows one to obtain from space high-quality images of the earth's surface, which help to solve practical problems in various fields of human activity. However, the amount of this graphical information is very large and needs to be compressed when transmitting data over communication channels and then used in geographic information systems. Today, fractal methods are often used to transfer images from satellites to the ground, which help to give a better picture. The main feature of these methods is the property of self-similarity of the image. Such methods provide large compression ratios. However, they need significant development while taking into account many criteria (speed, compression ratio, quality during decompression). They can be considered a real alternative to JPEG for many classes of images used in everyday life.  Fractal image compression (fractal transformation, fractal encoding) is a lossy image compression algorithm based on the iterated function system to images [1,2]. The encoding algorithm is encoded [3]. The concept of the fractal method was first introduced in 1990 by the British mathematician Michael Barnsley [4]. It consists of the fact that in the image it is necessary to find separate self-similar fragments which are repeated many times. He proved a class of theorems that allowed for the effective compression of images. In [5], Arno Jacquin described a new method of fractal encoding, in which the image is divided into domain and rank blocks, which cover the entire image. This approach became the basis for the creation of new fractal encoding methods used today. Jacquin's method was perfected by Yuval Fisher [6] and other scientists. A large number of scientific papers are devoted to the study of the effectiveness of the fractal image compression method [7][8][9][10][11][12][13][14][15][16][17][18][19][20][21][22]. For example, in [7] the algorithm of fractal compression of images using space-sensitive hashing is considered. Various methods are proposed in [8][9][10][11][12][13] aimed at reducing the volume of domain blocks, which makes it possible to reduce the encoding time of the search. In [8], a discrete cosine transform was used to classify all domain blocks into a number of classes, in [9] R-trees were used for this purpose, and in [10] a self-organized neural network was used. In [11,12], scientists use a genetic algorithm to search for optimal domains. In [13], the search is limited by the degree of information entropy of the domains. In [14][15][16][17][18][19][20][21][22], the variants of optimization and increase in fractal encoding speed and possibilities of their practical application are analyzed.
Today, the topic of fractal compression algorithms is still being actively studied. The aim of our research is to model the class of fractal functions, study their properties and establish the possibility of their application for an efficient algorithm for encoding images that are presented in digital form.

Materials and Methods
Fractal encoding is a mathematical process for encoding rasters into a set of mathematical data that reproduces the fractal properties of a given image. This encoding is based on the fact that all natural objects have a lot of similar information in the form of repetitive patterns. They are called fractals. Fractal decoding is a reverse process in which a system of fractal codes is converted into a raster [14].
The concept of fractal was proposed by the French-American mathematician Benoit Mandelbrot. In 1977, he published "Fractal Geometry of Nature", describing repetitive drawings from everyday life [23]. According to him, many geometric figures consist of smaller figures, which when being enlarged repeat accurately a larger figure (Figures 4 and 5). After conducting research, he also found that fractals have chaotic behavior, a fractional infinite dimension (how completely a fractal fills a space when magnified to smaller details), and can be described mathematically using simple algorithms [24]. It is known that many geographical objects have fractal properties-contours of coasts and oceans, rivers, mountain gorges, and state borders where they are drawn by natural contours [24].  For the constructive task of such fractal objects and their analytical research today in mathematics, various systems of representation and the encoding of real numbers are widely applied: with the finite and infinite, constant and variable alphabet, with natural and the whole negative, rational and irrational bases, etc. These are s-s and non-s-s, Qrepresentations, chain fractions, real numbers in the series Cantor, Lurot, Engel, Sylvester, Ostrogradsky-Sierpinski-Pierce, etc [25][26][27][28]. The creation of a new encoding system for the fractional part of a real number significantly expands the range of such objects, which are relatively simply formally described and studied.
In our work, we use an encoding system with a finite alphabet to build a new mathematical model that will be used in fractal image compression. The model is based on a continuous class of continuous functions that depend on a finite set of parameters and have fractal properties.
Let A 5 = {0, 1, 2, 3, 4} be the alphabet of the five-digit numeral system, . be a space of the sequences of elements of the alphabet and let Q * 5 = q ij , i ∈ A 5 , j ∈ N be an infinite stochastic matrix with positive elements q ij > 0 and the following properties: max q 0j , q 1j , q 2j , q 3j , q 4j = 0 (continuity).
The known theorem [25] states that for any x ∈ [0; 1] there exists a sequence (α k ) ∈ L such that where The representation of the number x in the form of series (1) is called Q * 5 -expansion while the symbolic notation If all the columns of the matrix q ij are identical, i.e., q ij = q i for any j ∈ N, then Q * 5 -representation is called Q 5 -representation. If q i = 1 5 is for all i ∈ A 5 , then the Q 5representation is a classic a five-digit representation.
Each irrational number has a unique representation, but some rational numbers have two representations. These are numbers with the representations ∆ (4) . By agreement, we use only one of two representations of a rational number containing period (0). Then, we have the uniqueness of the Q * 5 -representation of a number.
The concepts of cylinder and Hausdorff-Besicovitch dimension are important for image geometry. We will revisit them [25].
The cylinders have the following properties: (1) Cylinders of rank m are a union of cylinders of rank m + 1, i.e., (3) Basic metric ratio: Let (M, ρ) be a metric space, E a bounded subset of M and d(E) denote the diameter of the set E. Let Φ M be a family of subsets of the space M such that for an arbitrary set E ⊂ M and, for each number ε > 0, there exists an at most countable ε-covering {Ej} of E E j ∈ Φ M , d E j ≤ ε . Let α be a positive number.
where the infimum is taken over all at most countable ε -coverings Definition 3. The positive number is called the Hausdorff-Besicovitch dimension of the set E.
Using Q * 5 -representation of numbers, denote the function by the equality: where (g n ) = (g 0n , g 1n , g 2n , g 3n , g 4n ), n ∈ N is a sequence of vectors such that: (ε n ) is a sequence of positive real numbers with 0 ≤ ε n ≤ 1. (4) is a singular Cantor-type function with a Hausdorff-Besicovitch fractal dimension log 5 4; (5) the graph of the function is symmetric about point 1 2 ; 1 2 .

Results
We describe the method of fractal encoding of images using this class of nonmonotonic singular functions. The image is placed in a single square. We define two vectors Q and G such that: The first vector divides our image along the abscissa axis into five Q-cylinders (rank areas) that do not intersect (Figure 6), the length of q 0j , q 1j , q 2j , q 3j , q 4j respectively. The second vector on the y-axis specifies a set of G-cylinders that can overlap (Figure 7), the length of g 0k , g 1k , g 2k , q 3k , q 4k each, respectively.  We take two identical images of 1 × 1 size. The first image is divided into Q-cylinders, and the second image is divided into G-cylinders (they describe similar parts and are used in constructed decoded images). For each method of search of Q-cylinders, the nearest Gcylinder for which the distributed features can be approximated by the distribution of a rank area is selected. For the best approach to the G-cylinders, use the official conversion, which helps to change the brightness and contrast. If the desired approximation is not achieved, each cylinder of the rank area again extends to the appearance of the corresponding parts and the process is repeated. The numbers of the Q-and G-cylinders that were used in the encoding process and helped to obtain the desired results, together with the coefficients of affine transformations, are written to the file. These results will then be used in decoding.
Therefore, in the original image there is a search for self-similar areas, which are then taken as the basic elements of the fractal image. The latter is approximated by fractal transformations, and then we obtain an image in the form of Formula (2), which reflects the transformation.
T 0n (x, y) = (q 0n x; g 0n ),  T in is a compression image, so the {T 0n , T 1n , T 2n , T 3n , T 4n } family is an iterated function system. We show that the set F is a graph of a function continuous on [0; 1]. We give a geometric interpretation of the construction of this set. Let the graph of the function F 0 (x) be broken, connecting series points: (0; 0), (q 01 ; g 01 ), Graph of the function F 1 (x) is broken, connecting series points: (0; 0), (q 01 q 02 ; g 01 g 02 ), q 01 (q 01 + q 11 q 02 ; g 01 + g 11 g 02 ), q 01 + q 11 (F 0 (x)). These points are uniquely determined by the vectors Q and G, and they belong to the interior of the square [0; 1] × [0; 1]. We say that the transformation T is performed over the segments of the broken F 0 (x). With each of the segments of the obtained broken F 1 (x), which are not segments of constancy, we do the same (we perform the transformation T on them). Continuing this process, we obtain a functional sequence (F n (x)) such that: Thus, according to Banach's theorem (the theorem was formulated and proved in 1922 by Stefan Banach and is one of the most classical and fundamental theorems of functional analysis), there is a class of mappings-these are compressive mappings. A well-known statement: if we repeatedly apply the map T to the image F 0 so that F i = T(F i−1 ), then for i → ∞ we get the same image, regardless of the initial F 0 : The image F is called the original image of the transformation T. Let q ij = q i = 1 5 and ε n = 1. Then, The graph of the function is constructed according to the following algorithm. First, we build a unit square as a basis. We fix points (0; 0), 1 5 ; 3 4 , 2 5 ; 2 4 , 3 5 ; 2 4 , 4 5 ; 1 4 , (1; 1) according to the coordinates of the vector  Figure 9). In the next step, the algorithm is repeated, i.e., each of the four broken lines is replaced by five new broken lines at the appropriate scale. The more iterations you make, the more accurate the graph of the function will be ( Figure 10). Increasing iterations is responsible for the accuracy of the graph. Function (2) has an interesting property-if we know the initial sets of numbers, it is easy to calculate the value of the function, but, conversely, when the values of the function are known, the initial set of numbers is difficult to recover because there are many such sets.  Another special property of this function is the manifestation of self-similar properties of the graph of the function depending on the parameter at intervals where the function is not constant, i.e., the graph of the function This allows for encoding information faster, thus increasing the efficiency of data transmissions through communication channels.
The process of encoding information requires a lot of calculations. Large volumes of iterations are performed to search for self-similar fragments in the image. Therefore, compressing a single image takes a long time. In this case, the more iterations there are to make, the more accurate the result will be.
Decoding a fractal image is also an iterative process, although it takes little time, as all such objects are searched for in the encoding process. All you need to do is refine the fractal codes by transforming them into the original image. However, if you do not know the image encoding algorithm, the decoding process will be very cumbersome and time consuming.
Here are some examples of fractal encoding with given initial sets of digits for a given image f :
For Q-cylinders, the digits 1 and 3 are allowed, i.e., the image will be divided into cylinders ∆ 1 , ∆ 3 , ∆ 11 , ∆ 13 , ∆ 31 , ∆ 33 , . . .. Then, for the second identical image, as a result of affine transformations, the brightness distribution will contain G-cylinders with numbers 1 and 3, i.e., the digits of the set C 2 ≡ C[Q * 5 ; {1, 3}] are a set of Cantor type it is a set of not deleted points; it is possible to define the relation of this set to unit interval through the general length of the removed subintervals) ( Figure 12); 3.
For Q-cylinders, the digits 1,2 and 3 are allowed, i.e., the image will be divided into cylinders ∆ 1 , ∆ 2 , ∆ 3 , ∆ 11 , ∆ 12 , ∆ 13 , ∆ 21 , ∆ 22 , ∆ 23 , ∆ 31 , ∆ 32 , ∆ 33 , . . .. Then, for the second identical image, as a result of affine transformations, the brightness distribution will contain G-cylinders with digits 1,2 and 3, i.e., the image (Figure 13), where C 3 is a set of Cantor type and M is a discrete subset of the set of five-rational numbers: For Q-cylinders, the digits 0 and 4 or 1 and 3 are allowed. Then, for the second identical image, as a result of affine transformations, the brightness distribution will contain G-cylinders with digits 1,2,3,4, if the digits 0 and 4 or 1 and 3 are allowed for Q-cylinders, then the image of the set of Cantor type C 5 ≡ C[G * 5 ; V n ] (Figure 14), where is a set of Cantor type of Lebesgue zero measure.    This function class model allows for the development of a new fractal image encoding method for data transmission over communication channels, storage on media and subsequent use in geographic information systems.
The obtained results can be effectively used for the computer processing of aerial photographs in GIS of various functional purposes. A promising development of this mathematical model is the consideration of the problems of its practical application in GIS of environmental monitoring for compression and archiving of geospatial data.

Discussion
This article highlights a new method of image compression, which uses a class of nonmonotonic singular functions with fractal properties and depends on a finite number of parameters. These features allow you to get excellent digital data compression ratios and fast decoding. Another feature is that the size of the data after compression will actually take up less space in the file. This makes it possible to transfer information from satellites to Earth faster and then use it in geospatial systems, for example, for weather forecasting, studying Earth resources, and so on.
The disadvantage of this method is the large amount of computation, because to obtain a high degree of compression, you need to perform a large number of conversions, which can degrade image quality. The data we will receive after unpacking may differ from the initial ones, but the degree of difference will not be significant with their further use.
Unfortunately, the proposed methods do not completely solve the problem of increasing the speed and efficiency of fractal compression. However, today, more and more scientists are trying to improve the efficiency of existing methods and find new ways to optimize fractal encoding.

Conclusions
Mathematical models of the effective use of fractal functions for compression (encoding) of raster images are covered. There are already a large number of existing models using functions with a complex local structure, but they also need to be improved. Functions with fractal properties, unlike conventional functions, help to efficiently encode data and solve complex problems in various areas of human activity. Such functions are given by a recursive formula. Their generation takes a long time, which provides a high degree of compression, but is time consuming. Unpacking the image is easier, because the main work has already been done during encoding and it remains only with the help of known fractal codes to return the raster image. The obtained results allow one to create a sufficiently reliable mathematical support for the process of compression of various graphic information and to improve existing methods.
We see prospects for further research in constructing a family of functions with fractal properties, using different systems of encoding real numbers, and their application to create reliable and advanced methods of encoding spatial data, their storage, processing and representation. This will create a single information space and provide ample opportunities for systematic analysis of information for effective environmental quality management and ensuring the safety of life.