CHAPTER 4 FRACTAL IMAGE COMPRESSION

Similar documents
Iterated Functions Systems and Fractal Coding

A Review of Image Compression Techniques

Fractal Compression. Related Topic Report. Henry Xiao. Queen s University. Kingston, Ontario, Canada. April 2004

5.7. Fractal compression Overview

FRACTAL IMAGE COMPRESSION OF GRAYSCALE AND RGB IMAGES USING DCT WITH QUADTREE DECOMPOSITION AND HUFFMAN CODING. Moheb R. Girgis and Mohammed M.

Fractal Image Coding (IFS) Nimrod Peleg Update: Mar. 2008

Fractal Image Compression. Kyle Patel EENG510 Image Processing Final project

Fractal Image Compression

MRT based Adaptive Transform Coder with Classified Vector Quantization (MATC-CVQ)

FAST FRACTAL IMAGE COMPRESSION

Lecture 3: Some Strange Properties of Fractal Curves

Roshni S. Khedgaonkar M.Tech Student Department of Computer Science and Engineering, YCCE, Nagpur, India

Genetic Algorithm based Fractal Image Compression

Hybrid image coding based on partial fractal mapping

Fractal Coding. CS 6723 Image Processing Fall 2013

MRT based Fixed Block size Transform Coding

Image Compression - An Overview Jagroop Singh 1

Fingerprint Image Compression

Module 8: Video Coding Basics Lecture 42: Sub-band coding, Second generation coding, 3D coding. The Lecture Contains: Performance Measures

(Refer Slide Time 00:17) Welcome to the course on Digital Image Processing. (Refer Slide Time 00:22)

Fractal Image Denoising

A QUAD-TREE DECOMPOSITION APPROACH TO CARTOON IMAGE COMPRESSION. Yi-Chen Tsai, Ming-Sui Lee, Meiyin Shen and C.-C. Jay Kuo

Pak. J. Biotechnol. Vol. 13 (special issue on Innovations in information Embedded and Communication Systems) Pp (2016)

STORING IMAGES WITH FRACTAL IMAGE COMPRESSION

SIGGRAPH `92 Course Notes. Yuval Fisher. Visiting the Department of Mathematics. Technion Israel Institute of Technology. from

Lecture 25: Bezier Subdivision. And he took unto him all these, and divided them in the midst, and laid each piece one against another: Genesis 15:10

A Image Comparative Study using DCT, Fast Fourier, Wavelet Transforms and Huffman Algorithm

Encoding Time in seconds. Encoding Time in seconds. PSNR in DB. Encoding Time for Mandrill Image. Encoding Time for Lena Image 70. Variance Partition

Symmetric Fractals. Seeking Sangaku Ramanujan, Hardy, and Ono

Integers & Absolute Value Properties of Addition Add Integers Subtract Integers. Add & Subtract Like Fractions Add & Subtract Unlike Fractions

Fractals: a way to represent natural objects

Fractal Image Compression on a Pseudo Spiral Architecture

CHAPTER 6. 6 Huffman Coding Based Image Compression Using Complex Wavelet Transform. 6.3 Wavelet Transform based compression technique 106

Local Predecimation with Range Index Communication Parallelization Strategy for Fractal Image Compression on a Cluster of Workstations

Scope and Sequence for the New Jersey Core Curriculum Content Standards

Big Mathematical Ideas and Understandings

A combined fractal and wavelet image compression approach

Module 7 VIDEO CODING AND MOTION ESTIMATION

Prentice Hall Mathematics: Course Correlated to: Colorado Model Content Standards and Grade Level Expectations (Grade 6)

Image Sampling and Quantisation

Image Sampling & Quantisation

Outline Introduction MPEG-2 MPEG-4. Video Compression. Introduction to MPEG. Prof. Pratikgiri Goswami

Data Partitioning. Figure 1-31: Communication Topologies. Regular Partitions

Performance Level Descriptors. Mathematics

Ohio Tutorials are designed specifically for the Ohio Learning Standards to prepare students for the Ohio State Tests and end-ofcourse

Arizona Academic Standards

Fast Fractal Image Encoder

Does it Look Square? Hexagonal Bipyramids, Triangular Antiprismoids, and their Fractals

Review and Implementation of DWT based Scalable Video Coding with Scalable Motion Coding.

CHAPTER 4 REVERSIBLE IMAGE WATERMARKING USING BIT PLANE CODING AND LIFTING WAVELET TRANSFORM

Fractals and the Chaos Game

An Elevated Area Classification Scheme Situated on Regional Fractal Dimension Himanshu Tayagi Trinity College, Tublin, Ireland

CURRICULUM UNIT MAP 1 ST QUARTER

CHAPTER 6 MODIFIED FUZZY TECHNIQUES BASED IMAGE SEGMENTATION

Lecture 6: Fractals from Iterated Function Systems. He draweth also the mighty with his power: Job 24:22

Digital Image Processing Fundamentals

Mathematics Curriculum

Functional Fractal Image Compression

CMP Book: Investigation Number Objective: PASS: 1.1 Describe data distributions and display in line and bar graphs

GTPS Curriculum Mathematics Grade 8

09/11/2017. Morphological image processing. Morphological image processing. Morphological image processing. Morphological image processing (binary)

Image Segmentation Techniques for Object-Based Coding

Wavelet Based Image Compression Using ROI SPIHT Coding

AN IMPROVED DOMAIN CLASSIFICATION SCHEME BASED ON LOCAL FRACTAL DIMENSION

Optimized Progressive Coding of Stereo Images Using Discrete Wavelet Transform

Lecture 1: Turtle Graphics. the turtle and the crane and the swallow observe the time of their coming; Jeremiah 8:7

Contrast Prediction for Fractal Image Compression

Fractals: Self-Similarity and Fractal Dimension Math 198, Spring 2013

Biometrics Technology: Image Processing & Pattern Recognition (by Dr. Dickson Tong)

Mathematics Fourth Grade Performance Standards

Generation of 3D Fractal Images for Mandelbrot and Julia Sets

round decimals to the nearest decimal place and order negative numbers in context

This strand involves properties of the physical world that can be measured, the units used to measure them and the process of measurement.

Compression of RADARSAT Data with Block Adaptive Wavelets Abstract: 1. Introduction

Clustering and Visualisation of Data

Ratios and Proportional Relationships (RP) 6 8 Analyze proportional relationships and use them to solve real-world and mathematical problems.

Chapter 18. Geometric Operations

APS Sixth Grade Math District Benchmark Assessment NM Math Standards Alignment

Montana City School GRADE 5

3-Dimensional Object Modeling with Mesh Simplification Based Resolution Adjustment

On Skeletons Attached to Grey Scale Images. Institute for Studies in Theoretical Physics and Mathematics Tehran, Iran ABSTRACT


USING FRACTAL CODING FOR PROGRESSIVE IMAGE TRANSMISSION

Cluster Analysis. Angela Montanari and Laura Anderlucci

Scalable Compression and Transmission of Large, Three- Dimensional Materials Microstructures

Morphological Image Processing

DESIGN AND ANALYSIS OF ALGORITHMS. Unit 1 Chapter 4 ITERATIVE ALGORITHM DESIGN ISSUES

On the undecidability of the tiling problem. Jarkko Kari. Mathematics Department, University of Turku, Finland

The goal is the definition of points with numbers and primitives with equations or functions. The definition of points with numbers requires a

Prentice Hall. Connected Mathematics 2, 7th Grade Units Mississippi Mathematics Framework 2007 Revised, Grade 7

1. Compare and order real numbers.

8 th Grade Pre Algebra Pacing Guide 1 st Nine Weeks

Mr.Pratyush Tripathi, Ravindra Pratap Singh

Kate Collins Middle School Pre-Algebra Grade 6

Unit 1 Chapter 4 ITERATIVE ALGORITHM DESIGN ISSUES

7 Fractions. Number Sense and Numeration Measurement Geometry and Spatial Sense Patterning and Algebra Data Management and Probability

Efficient Image Compression of Medical Images Using the Wavelet Transform and Fuzzy c-means Clustering on Regions of Interest.

SHAPE, SPACE & MEASURE

6 Mathematics Curriculum

NZ Mathematics Levels 1-6 Curriculum Objectives Addressed Within Numbers Up! 2 Baggin the Dragon

Transcription:

49 CHAPTER 4 FRACTAL IMAGE COMPRESSION 4.1 INTRODUCTION Fractals were first introduced in the field of geometry. The birth of fractal geometry is traced back to the IBM mathematician B. Mandelbrot and the 1977 publication of his book The Fractal Geometry of Nature". Later, Michael Barnsley applied this idea to image representation and compression with the mathematics of Iterated Functions Systems (IFS) (Barnsley and Sloan 1998). Fractal compression algorithms based on Iterated Function Systems (IFS) were of their high computational complexity. It was Arnaud Jacquin (1992) who set a practical fractal coding algorithm using Partitioned Iterated Function Systems (PIFS). Since the development of PIFS, fractal image coding has been widely studied and various schemes have been derived and implemented. Fractal encoding is a mathematical process used to encode any given image as a set of mathematical data that describes the fractal properties of the image. Fractal encoding relies on the fact that all objects contain information in the form of similar, repeating patterns called an attractor. It is assumed that natural images exhibit significant self affinity so that contractive transform was expected to provide an efficient representation, even though a considerable attention received by the advantages of fractal representation (Clarke and Linnet 1993).

50 Fractal encoding is largely used to convert the image into fractal codes. In the decoding it is just the reverse, in which a set of fractal codes are converted to image. The encoding process has intense computation. Since more number of iterations are required to find the fractal patterns in an image, it takes longer time. The decoding process is much simpler as it interprets the fractal codes into the image. Fractal image compression (FIC) is achieved either by using Iterated Function Systems (IFS) or by Partitioned Iterated Function Systems (PIFS). 4.2 WHAT IS FRACTAL IMAGE COMPRESSION? Imagine a special type of photocopying machine that reduces the image to be copied by half and reproduces it three times on the copy (Fisher 1995). What happens when the output of this machine is fed back as input? Figure 4.1 shows several iterations of this process on an input image. It can be observed that all the copies seem to converge to the same final image. This final image is called the attractor for this copying machine. Since the copying machine reduces the input image, any initial image placed on the copying machine will be reduced to a point as the machine runs repeatedly; in fact, it is only the position and the orientation of the copies that determines what the final image looks like. Initial Image First Copy Second Copy Third copy Figure 4.1 First Three Copies of the Initial Image (Fisher 1995)

51 The way the input image is transformed determines the final result while running the copy machine in a feedback loop. However, there is a constrain to these transformations, with the limitation that the transformations must be contractive, that is, a given transformation applied to any two points in the input image must bring them closer in the copy. This condition is quite logical, since if points in the copy were spread out, the final image would have to be of infinite size. Except for this condition the transformation can have any form. 4.2.1 Properties of Fractals properties: If a set F to be considered as a fractal, then it has the following Fractal set has every detail at every level. The property of self similarity or scaling is one of the central concepts of fractal geometry. Decoding is faster, simpler and resolution independent. 4.2.2 Self-Similarity Fractal shapes are self-similar and independent of scale or scaling and possess no characteristic size. A typical image does not contain the type of self-similarity as found in fractals. But it contains a different sort of selfsimilarity. The property of objects whereby magnified subsets appear similar or identical to the whole and to each other is known as self-similarity. It is a characteristic of fractals and sets them apart from Euclidean shapes which generally become smoother.

52 Figure 4.2 shows regions of Lena image that are self similar at different scales (Fisher 1995). A portion of her shoulder overlaps a similar region that is almost identical and a portion of the reflection of the hat in the mirror is similar to a smaller part of the hat. The difference here is that the entire image is not self similar, but parts of the image is self similar with properly transformed parts of itself. Studies suggest that most naturally occurring images contain this type of self-similarity. It is this restricted redundancy that fractal image compression schemes attempt to eliminate. Figure 4.2 Self- Similarity The non-uniform scaling, where shapes are (statistically) invariant under transformations that scale different coordinates by different amounts, is known as self-affinity. 4.3 MATHEMATICAL PRINCIPLES The mathematical ideas of fractal image compression were first explored by John Hutchinson (1981) were further refined and applied to image compression by Barnsley and Sloan (1998). The basic idea is that certain geometric transformations - combinations of scaling, rotating and

53 translating - eventually reach a fixed point, where further operations cause no further change. If a section of an image is similar to such a fixed-point pattern, the corresponding list of transformations can serve as an approximate encoding of the section. There are two main theorems supporting fractal theory. One is the contractive mapping fixed-point theorem and the other is recognized as a corollary of the first, the collage theorem (Lu 1993, Saupe and Hamzaoui 1994a, 1994b, Saupe 1996). 4.3.1 Contractive Mapping Fixed Point Theorem Let (X, d) be a complete metric space and f : X X be a contractive mapping. Then there exists a unique fixed point x f X such that: x f = f(x f ) = n f on lim (x) x X (4.1) where f on (x) denotes f composed with itself n times. The value x f is also called the attractor of the mapping f. 4.3.2 Collage Theorem If (X, d) is a complete metric space and f : X X is a contractive map with fixed point xx then: d(x, x f ) 1 d(x,f (x)) 1 s x X (4.2) where s is the contractivity of f. It is not necessary for f to be contractive for it to have a fixed point which attracts all of X. For example, it is sufficient for some iteration to be contractive.

54 4.4 ITERATED FUNCTION SYSTEMS The theory of Iterated Function Systems (IFS), which forms the basic of the theory of fractal compression, is an extension of classical geometry. It uses affine transformations to express relationships between parts of an image. Using these relationships, it defines and conveys images with complex structures. Affine transformations can be described as combinations of rotations, scaling, and translations of the coordinate axes in n-dimensional spaces. The transformation is denoted by w, and the notation w(s) denotes the transformed point of w on a set of points S. A general form of an affine transformation is represented by w i x y = a i ci bi d i x y + e i f (4.3) i where x, y are coordinates and a, b, c, d, e, f are coefficients. Barnsley suggested that storing images as collections of transformations could lead to image compression. His argument went as follows: the image in Figure 4.1 looks complicated yet it is generated from only 4 affine transformations. Each transformation w i is defined by six numbers a i, b i, c i, d i,e i and f i, which do not require much memory to store on a computer (4 transformations 6 numbers transformations 32 bits/ number = 768 bits (Barnsley and Sloan 1998). 4.4.1 Affine Transformations These are combinations of rotations, scaling and translations of the co-ordinate axes in n-dimensional space. Figure 4.3 shows an example of an affine transformation, W, operated on a smiling face, F, lying on the xy plane,

55 moving it to a new face, W(F). W always moves points closer together - it is contractive. Figure 4.3 An Example of Affine Transformation W (Ali and Clarkson 1991) The general form of the transformation given as Equation (4.3) is sufficient to generate interesting transformations called affine transformations of the plane. Each transformation can skew, stretch, rotate, scale and translate an input image as shown in Figure 4.3. 1 4.4.2 Contractivity Let S be a metric space with metric distance d. A transformation w is said to be contractive if for any two points P1, P2, the distance d(w(p1),w(p2)) < s d(p1, P2) (4.4) for some s < 1. This formula says the application of a contractive map always brings points closer together and when they are repeatedly applied they converge to a point. This point remains fixed when further iterations are applied.

56 An IFS is a finite collection of contractive affine transformations. The collection of the transformations W defines the map from the original image S to the transformed image W(S), which can be written as W S n w ( S ) (4.5) i1 i i where S S i i Note that the contractive affine transformation w i operates on a subset, called block S i, of the original image S. After each transformation w i, a predetermined property will determine the importance of the transformation related to other transformations. Therefore, W(S) is a union of the set of individual contractive transformations. A systematic method for finding the affine transformation that produces the IFS encoding of a desired image can be explained with the collage theorem and the contractive mapping fixedpoint theorem. 4.5 PARTITIONED ITERATED FUNCTION SYSTEMS (PIFS) The Sierpinski triangle in Figure 4.1 demonstrates the way of using IFS. But real images are very irregular. In most cases, it would be rather impossible to find such a perfect mapping for the whole image. Thus Jacquin introduced Partitioned Iterated Function Systems (PIFS) in his work (Jacquin 1992). A PIFS is a generalization of an IFS, and attempts to ease the IFS computation. Theoretically, each image has a unique fixed point. But in practice, it is impossible to find a unique fixed point for a whole image. Thus, the image should be partitioned as different parts, and the fixed points for the

57 corresponding parts should be obtained through different transformations (or maps). The above IFS is different for different parts of the image, and therefore it is called a partitioned iteration function system (PIFS). The copy machine principle can be extended to perform the process. Besides the features described above, this includes: The number of copies of the original pasted together to form the output. A setting of position and scaling, stretching, skewing, and rotation factors for each copy. A contrast and brightness adjustment for each copy. A mask that selects, for each copy, a part of the original to be copied. An image is modeled as a function f(x, y), so the transformation w i is applied to an image f as w i (f) w i (x, y, f(x, y)). Affine Transformation of PIFS is given by x ai bi 0 x ei wi y ci di 0 y f i z 0 0 s i z o i (4.6) In this transformation, x and y are the spatial locations of a pixel, while z is the gray-level intensity of the pixel at location (x, y). Coefficients a i, b i, c i, d i, e i and fi control the spatial aspects of the transformation (i.e., skewing, stretching, rotation, scaling, and translation), while the coefficients si and oi determine the contrast and brightness of the transformation, respectively. Thus, the image can be represented as a collection of maps w 1, w 2,,w N, where

58 N W = wi (4.7) i1 w i : D i Rˆ That is, the application of w i to a region of the image D i produces Rˆ i a result that approximates another region of the image, R i. The sub-region D i is called a domain and is a member of the pool of domains D, while the sub-region R i is called a range and is a member of the pool of ranges R. Minimizing the error between Rˆ i and R i will minimize the error between the original image and the approximation. Thus, dissimilarity metric is used to find the best transform to map D i to R i. In practice, it is convenient to choose the RMS (Root Mean Square) metric. The RMS error between two images f and g of size N N is RMS N N 2 (4.8) x1 y1 d f, g ( f ( x, y) g( x, y)) and performing the dissimilarity measure on Rˆ i and Ri will be noted as the domain-range comparison. 4.5.1 Ranges and Domains The idea of fractal image compression is based on the selfsimilarity sets of the image (mainly works for natural images), where some parts of the image called range blocks is similar to larger parts of the same image called domain blocks. A domain is a region where the transformation maps from and range is a region where it maps to as shown in Figure 4.4.

59 Figure 4.4 Mapping from Domain Block to Range Block (Mitra et al.. 2000) The domain pool is a collection of the domain blocks, which are used to compare the range blocks to find mappings. So the size of the domain pool, determined by how many domain blocks are in the pool, is crucial to the efficiency of the encoding. In general, if the domain pool is larger, better the fidelity (i.e., smaller distance) of the mappings between the domain blocks and the range blocks. On the other hand, larger pools lead to more comparisons, which slows down the encoding. The domain-range comparison step of fractal encoding is very much computationally intensive. In the encoding process, one range block can be compared to only one class of the domain blocks from the pool that belongs to the same category to reduce the total amount of comparisons. The domain and range blocks are commonly classified into affixed number of classes according to a certain classification scheme (Fisher 1995, Jacquin 1992). Many fractal image compression schemes require the range block to be no smaller than 4 pixels by 4 pixels, which also implies a size restriction on the domain block from previous descriptions. The problem of Fractal image compression is to find best domain that will map to a range.

60 4.5.1.1 Encoding Fractal encoding is a process to find close mappings, or transformations, for each range block from the domain blocks. The domain location and the coefficients are only to be stored for each transform after encoding as indicated in Figure 4.5. Thus quite a lot of bits can be saved over the original data. So the most valuable advantage of fractal coding is the ability to achieve high compression ratio. However, the compression ratio is highly dependent on identifiable patterns and self-similarities. Consider an image of 256256 in size and each pixel is of 256 gray levels and the image is partitioned into 88 blocks of non-overlapping subsquare ranges, 1616 blocks of overlapping domains. For each range R i, search is done through all of the domain D, which covers the range the best. The position of the range, the best domain and transformation are stored. This process is repeated until all ranges have been covered. This method of partition is fixed range size partition method. Figure 4.5 Fractal Encoding

61 4.5.1.2 Decoding The decompression process usually begins by setting the computer s image buffer to a uniform mid-gray value. This is used as the seed image. During one iteration, the pixels of each range block in the transform list are evaluated. The result is used as the input for the second stage of iteration as shown in Figure 4.6. After just two iterations the original image is recognizable, and the decoding process involves repeatedly applying the transform until it converges to an image, which closely approximates the original (John Kominek 1997). Figure 4.6 Fractal Decoding Comparatively less attention was paid towards the problem of analyzing the convergence phenomenon of the fractal coders. The decoding process of fractal coding is a reconstruction through iteratively applying the mappings (transforms) from the encoding in reverse. According to the fixed point theorem, starting from an arbitrary sequence the reconstruction leads to a fixed sequence. Although the choice of seed image (arbitrary sequence) does not affect the outcome, it can affect how quickly the decompression process converges. One could instead begin with an all-black seed image, or an all-white one, but usually mid-gray is preferable. A successful way of increasing decompression speed, as first described by Beaumont (1990, 1991), is to begin with a low resolution version of the original. The collage

62 and complete metric space requirements provide that the final fixed sequence shall be close to the original sequence with a sufficiently small error. Post-processing is mainly addressed with the problem of blocking artifacts in the decoded image (Fisher 1995). In PIFS, blocking artifacts are reduced because the domain blocks are allowed to overlap. The idea of allowing the range blocks to have certain degree of overlap, which gives even smoother edge between blocks. However, post-processing may be very useful when applying fractal coding on other types of data. The processing methods can be more advanced with some sophisticated transform techniques. The code generated by fractal coding of a digital image provides a resolution independent representation of the image as this code can be decoded to generate a digital image at any resolution. When the image is decoded at a size larger than the original encoded image, image details beyond the resolution of the original image are predicted by assuming local self-similarity in image at different scales. A method was presented to decode with higher resolution, and to evaluate the accuracy of the predicted details using a frequency analysis of fractally enlarged test images (Alkansari and and Huang 1997 a, b). One advantage of fractal coding being cited is resolution independence (Fisher 1995, Wohlberg and De Jager 1999). The fractal model uses functions of infinite resolution and decoding of any resolution can be arrived. 4.6 PARTITIONING SCHEMES Image partitioning is one of the important aspects of fractal image compression. Image partitioning is about dividing the image into sections that are more appropriate for the application to work on.

63 The classical way of partitioning an image (Jacquin 1992) was having the range blocks in a fixed square size and the domain blocks being twice the size of the range block. However, other partitioning methods have been used in which there is less number of blocks causing a shorter encoding time, or to have more flexible partitioning leading to higher compression rates. system are: The three main issues involved in the design of fractal block coding the partitioning of an image the choice of a measure of distortion between two images the specification of finite class of contractive image transformations defined consistently with a partition and a scheme for the quantization of their parameters. Based on the PIFS, the image is partitioned into subspaces. The range and the domain partitions determine the process of finding the mappings from the domain blocks to the range blocks. The partition schemes are most critical for the range partition. The domain partition is based on the range partition since the domain shape and size are restricted by the range size, because an affine transformation is used from domain to range. A wide variety of partition schemes have been investigated, with the majority being composed of rectangular blocks (Wohlberg and De Jager 1999). The partition schemes are categorized into two aspects based on the schemes geometric means. Right-angled range partition scheme is the group with perpendicular polygons such as fixed size square. Triangular and polygonal range partition scheme is an irregular group of partitions.

64 Among the right-angled partition group, quadtree is the most popular partition scheme. The tree structure constructs range blocks recursively and subdivide or merge certain blocks based on different thresholds, which is more efficient than simple fix block partition algorithmically. Different types of partition methods are discussed in the following sections. 4.6.1 Fixed Block Partition The common approach started by Jacquin (1992) is to restrict the domain block to twice the size of the range block. This is supported by the argument that the larger sized domain block of the two corresponding domain pools gives a better compression ratio and fidelity of recovery (Fisher 1992). Under this restriction, one domain pool applies only to certain sized range blocks. Generally, larger sized domain pools which contain the domain blocks larger than the given range block cannot be applied here because the distance metric would be very difficult to define. In most of the designs, the size of the range block is restricted to guarantee compression. Many fractal image compression schemes require the range block to be no smaller than 4 pixels by 4 pixels, which also implies a size restriction on the domain block from previous descriptions. In typical images, when the fixed range block size is used it is possible to find matching domain blocks within a certain error tolerance. Similarly, there are possibilities that larger range blocks could be used and their matching domain blocks could still be found. Fixed range blocks do not take the advantage of the contents of images. With fixed partitioning method, areas with fine details may not be covered properly.

65 This implies that higher compression performance with good quality images can be achieved if variable size blocks are used. Quad tree, HV Partitioning, Triangular partitioning are the suggested methods by Fisher (Fisher 1995). 4.6.2 Quadtree Partition One of the most commonly used partitioning methods is the quadtree partition. This method yields better results than the simple encoder. Quadtree partitions were used in the first implementation of the PIFS based fractal image coding (Jacquin 1992). It employs the well-known image processing technique based on, a top-down recursive splitting of selected image quadrants. The resulting partition can be represented by a tree structure in which each non-terminal node has four descendants. A square in the image is broken up into four equal-sized squares when the details are covered. This process repeats recursively starting from the whole image and continuing until the squares are small enough to be covered. This method yields better results than the fixed partitioned method. If the distance or the RMS value between the range and the domain is less than the pre-selected threshold, then no further partition is required. If this is not the case, then each range block will be subdivided into four quadrants, and the process repeats until it reaches the pre-selected maximum depth of the quadtree (Barthel et al.. 1993, Nelson and Gaily 1996, Soyjauadh and Jahmeer Bacus 2002) Quadtree partitioning applied to a simple image is shown in Figure 4.7. However, because of variable range block sizes are used in the quadtree partitioning method, the information about the block size used and the block location has to be stored together in the transformations. In the fixed size square partitioning, range block location and size need not be stored because they are implied when range blocks are coded sequentially.

66 Figure 4.7 Quadtree Partitioning Applied to a Simple Image 4.6.2.1 Determining Parameters Domain Pool: The naïve domain pool design is to have a fixed domain pool for all range blocks. This design is identified by empirical evidence on image compression where the best domain block for a particular range block is not expected to be spatially close to that range block to any significant degree (Wohlberg and De Jager 1999). However, this simple approach results in a domain pool with an enormous size. Further restrictions have to be applied to reduce the size of the pool to bring the encoding process into a manageable time frame. The common approach started by Jacquin (1992) is to restrict the domain block to twice the length of the range block. This is supported by the argument that the larger sized domain block of the two corresponding domain pools usually gives a better compression ratio and fidelity of recovery. Under this restriction, one domain pool only applies to certain sized range blocks. In general, larger sized domain pools which contain the domain blocks larger than the given range block cannot be applied here because the distance metric would be very difficult to define.

67 In most of the designs, the size of the range block is further restricted to guarantee compression. Many fractal image compression schemes require the range block to be no smaller than 4 pixels by 4 pixels, which also implies a size restriction on the domain block from previous descriptions. For small images, there are fewer domain blocks to choose from and thus the picture quality is poorer. For larger images the quality of the compression is much better, particularly when more sophisticated compression methods like Quadtree partitioning is used rather than the basic block encoding scheme. Domain classification: The domain blocks in the domain pool are usually classified before the map search. In the encoding process, one range block can be compared to only one class of the domain blocks from the pool that belongs to the same category to reduce the total amount of comparisons. The domain and range blocks are commonly classified into a fixed number of classes according to a certain classification scheme (Fisher 1995, Jacquin 1992). Tolerance Factor: The domain-range mapping error tolerance factor is a very critical parameter dominating the compression ratio as well as the encoding quality in the fractal scheme. Intuitively, the bigger the tolerance value, the higher the compression ratio that can be achieved, because more mappings can be accepted for the large size range blocks, and thus fewer transforms need to be stored. On the other hand, a smaller tolerance value gives a better encoding quality. Advantage of this factor is that it is flexible in the sense that compression ratio can be traded for image quality. If low image quality is

68 required a large error tolerance can be used during the matching process and a smaller number of larger range blocks may be used, resulting in a higher compression ratio. If high image quality is required, a small error tolerance is used a larger number of smaller range bocks may be used, resulting in a low compression ratio. This property is not possessed by the fixed size PIFS compression method. 4.6.3 Horizontal -Vertical Partition Horizontal-Vertical partition works by partitioning the image into rectangular blocks of varying size. The method starts with an initial set of macro blocks, which fully tiles the image. These blocks are divided into smaller blocks by applying either a horizontal or vertical partition, the process is shown in Figure 4.8(a-d). The initial macro block (a) is divided by a vertical or horizontal partition to form the new blocks (b). This is continued in (c) by further dividing the blocks, until finally a sensible partition is formed around the image details (d). There are two ways to decide, whether to partition vertical or horizontally: Choose the partition that best improves the picture (in rate distortion terms). Alternatively partition horizontally and then vertically (a) (b) (c) (d) Figure 4.8 HV Partitioning Applied to a Simple Image

69 The partition (horizontal or vertical) is placed in a position that equally divides the metric used. The metric is usually proportional to the error and so this effectively divides the block into two new blocks that have roughly the same reconstruction error. Since the approximation functions are the same for both blocks and they produce roughly the same reduction in error, it is best to divide the error equally between the blocks so that no discontinuities occur in the image. Using HV partitioning without constraints leads to problems. The blocks produced by the error division method can often become too long and very long blocks do not encode very well, since have a large edge to area ratio and hence produce an increased blocking artifact. To prevent this happening it is best to apply the above method of splitting along with an aspect ratio limitation. As soon as the aspect ratio of a new block drops below a certain amount, it is fixed to that minimum by an aspect ratio limiter. It is common to fix the minimum aspect ratio to about 1:4 in either direction. Blocks above this ratio still code reasonably well but allowing higher aspect ratios leads to larger number of limited blocks. Although the HV partitioning method is much better than quadtrees at partitioning the image shape, it is not necessarily the best for image compression. Each new split requires the splitting point to be encoded and this can be a large overhead, compared to the binary nature of the Quad-tree. Also the HV partitioning blocks are not square and therefore much slower algorithms must be applied to encode them, since there is less symmetry to exploit in rectangular blocks. In some situations HV partitioning is much more effective than the quad-tree, but this depends on the properties of individual images (David Bethal 1997). 4.6.4 Triangular Partition The triangular partitioning is also similar to the quadtree partitioning in which each block splits into smaller pieces whenever it is

70 necessary. From the name, it is recognized that the partition of the image is of the triangular shape. Starting with the original image to be divided into two triangles, each can then be subdivided into four triangles; this process continues until no more partitioning is possible as shown in Figure 4.9(a-b). It is possible to vary the positions of these triangles after the split, creating an improved triangular split, which requires more information to store. (a) (b) (c) (d) Figure 4.9 Triangular Partitioning Applied to a Simple Image The quad-tree method has been shown to be very effective at compressing images and is a more general solution than the HV partitioning (Wohlberg and De Jager 1999). 4.7 QUADTREE ENCODING ALGORITHM More detailed areas of the original image need smaller size range blocks, in order to be matched accurately with a domain block. Because of this, quadtree partitioning uses square range blocks that can vary in size. If a large range block does not have a suitably accurate match with some domain block, using the standard block encoding as described in Section 4.6.2, then it is divided into four quadrants and the process is repeated. Two integer parameters specify the maximum and minimum possible sizes for range blocks.

71 The size of the domain blocks is twice the size of the range block, and each range block to contain atleast four pixels. The range blocks are selected based on the partition and the affine mapping. The initial partition is to partition an image into quadrants. Then the four resulting range blocks are compared with all potential domain blocks from the domain pool to find the optimal domain blocks achieving the minimum RMS distance through affine transforms. If the minimum RMS distance is above the permitted error threshold, the range blocks are divided recursively into two subblocks applying the binary partition. This process is repeated until a range block can be mapped to a potential domain block with a minimum RMS distance less than the error threshold, or the smallest range block size has been reached. In the latter situation, the transform is stored with the minimum RMS distance at the deepest recursive level (i.e., with the smallest range block size). Once a mapping w i has been identified, the transform coefficients are stored (i.e., scaling and offset) and the range block and domain block locations to the output file. The range block which has been mapped is discarded later. The final output file stores parameters of the map W = U w i from the encoding process. Three kinds of domain pools (D1, D2, D3) are allowed. D1 has a lattice with a fixed spacing l, which means the domain blocks from D1 are directly obtained from a fixed size window sliding l samples each time through the whole sequence. Setting l to 1 gives all possible domain blocks for a range, D2 is formed with a spacing given by the domain size divide by l, which gives smaller domain blocks and less large ones. The D 2 domain pool thus concentrates on the small size range blocks to ensure mapping quality. D3 has a lattice as D2 does but with the opposite spacing-size relationship, which means the largest domain blocks have a spacing corresponding to the

72 smallest domain size divided by l, and vice versa. The D3 domain pool thus has larger domain blocks, and less small ones. The idea is that it is more important to find a good domain-range fit for larger range blocks, because the encoding will require a fewer number of transforms which also means a higher compression ratio. For experimental needs, user defined encoding parameters are used in the algorithm. The parameters are based on the studies on fractal image encoding (Fisher 1995), which explore some main properties of fractal encoding. The parameters are: e RMS : the maximum RMS mean error for a domain-range mapping. d max : the maximum recursion depth, which gives the smallest range block size. d min : the minimum recursive depth, which gives the largest range block size. d type : the type of domain pool to be used. l : the lattice spacing used in the domain pool. s max : the maximum allowable scaling factor of an affine transform. T : Tolerance factor d type is set to 1, 2, or 3 to use domain pool D1,D2, or D3. The parameters s i and o i specify the numbers of bits to store scaling and offset coefficients of a transform.

73 4.8 QUADTREE DECODING ALGORITHM The natural fractal decoding process is by iterating map W from encoding in reverse. The coefficients of the transforms are read in from the encoded file. A map w i can be reconstructed based on the affine transform definition that R = αd + β, where R is a range block, and D is a domain block. W then can be reconstructed by the union of w i. At each iteration, the map W is applied in reverse to the sequence, and replaced the sequence with the new one. The difference between consecutive iterations is calculated to compare the contractivity. Most decoding parameters are straight forward coming from the encoding in order to get the best approximation of the images. n i : the number of iterations in the decoding process. d max : the maximum recursion depth, which gives the smallest range block size. d min : the minimum recursion depth, which gives the largest range block size. d type : the type of domain pool to be used. l : the lattice spacing used in the domain pool. s max : the maximum allowable scaling factor of an affine transform. d max, d min, d type, and l are read in from the encoded file. s max and other parameters s i and o i have to be consistent with the encoding.

74 The postprocessing flag allows the averaging process between the decoded blocks to take effect after single iteration or after number of iterations. 4.9 MERITS AND DEMERITS OF FIC FIC is asymmetrical in nature. Even with dedicated hardware assist, the compression stage is known to be prohibitively slow. Decompression is sufficiently rapid for real-time operation (John Kominek 1994). Highlights of Fractal Image Compression: It is a promising technology, though still relatively immature. The fractals are Iterated Function Systems (IFS). It is a block-based, lossy compression method. Fractal image interpolation may prove useful in multimedia applications. Decompression is fast. Compression has traditionally been slow. Two patents have been granted on the technology. More are expected. Fractal images are largely immuned from pixelation problems. They have the property of size independency. Although the fractal codes are computed from image blocks of a given size, the approximated image can be rendered to any size. Magnified fractal encoded images often look better than

75 magnified original images due to reasonable interpolation (Paul Levi et al.. 1994). The main source of interest in fractal compression is probably its ability to achieve very high compression ratios while still maintaining reasonable image quality (John Kominek 1994). Unlike the JPEG international standard (Wallace 1990) which undergoes sharp degradation after a certain critical point, fractal compressed images degrade more gradually. Typically, JPEG introduces smaller errors at low compression ratios and, visually, exhibits a sharper preservation of fine detail. JPEG encoded images with higher compression ratios tend to coarse blocks. At higher compression ratios fractal compression is relatively superior (John Kominek 1994). Fractal compression works better by providing better image quality for comparable compression ratio rather than wavelet al..gorithm. Fractal compression methods are probably best suitable for archival applications, such as digital encyclopedias, where an image is encoded once and decoded many times (Stephen Welstead 1999). In this chapter the principles of fractal compression, various partitioning methods and merits and demerits of FIC over other compression methods are discussed. Next chapter discusses about the various imaging modalities used in this work for the application of FIC.