5. Fractal Compression Fractal compression is a lossy compression method used to compress images using fractals. The method is best suited for photographs.

Slides:



Advertisements
Similar presentations
Digital Color 24-bit Color Indexed Color Image file compression
Advertisements

Image Compression. Data and information Data is not the same thing as information. Data is the means with which information is expressed. The amount of.
Grey Level Enhancement Contrast stretching Linear mapping Non-linear mapping Efficient implementation of mapping algorithms Design of classes to support.
Math Modeling Final Project APPLICATIONS of FRACTALS Advisor: Professor Alber Fang Qi Pu Wan Xue Rui FRACTAL LANDSCAPES FRACTAL IMAGE COMPRESSION.
Chapter 4: Image Enhancement
What is a Wavelet? Haar Wavelet A wavelet is a function that has finite energy and has an average of zero. Here are some examples of mother wavelets:
SWE 423: Multimedia Systems
A Review of Iterated Function System Theory for Image Compression A presentation based on a publication by the same name by: Waite,J British Telecom Res.
Fractal Image Compression
Course Website: Computer Graphics 11: 3D Object Representations – Octrees & Fractals.
Copyright © Cengage Learning. All rights reserved.
Fundamentals of Multimedia Chapter 7 Lossless Compression Algorithms Ze-Nian Li and Mark S. Drew 건국대학교 인터넷미디어공학부 임 창 훈.
1 Introduction to Computability Theory Lecture11: The Halting Problem Prof. Amos Israeli.
5. 1 JPEG “ JPEG ” is Joint Photographic Experts Group. compresses pictures which don't have sharp changes e.g. landscape pictures. May lose some of the.
Fractal Image Compression By Cabel Sholdt and Paul Zeman.
CS559-Computer Graphics Copyright Stephen Chenney Image File Formats How big is the image? –All files in some way store width and height How is the image.
Metric Self Calibration From Screw-Transform Manifolds Russell Manning and Charles Dyer University of Wisconsin -- Madison.
1 Perception, Illusion and VR HNRS 299, Spring 2008 Lecture 19 Other Graphics Considerations Review.
Data Compression For Images. Data compression or source coding is the process of encoding information using fewer bits (or other information-bearing units)
Compression is the reduction in size of data in order to save space or transmission time. And its used just about everywhere. All the images you get on.
COMP Bitmapped and Vector Graphics Pages Using Qwizdom.
: Chapter 12: Image Compression 1 Montri Karnjanadecha ac.th/~montri Image Processing.
Lossless Compression CIS 465 Multimedia. Compression Compression: the process of coding that will effectively reduce the total number of bits needed to.
1 Perception and VR MONT 104S, Fall 2008 Lecture 21 More Graphics for VR.
Lecture 7: Intro to Computer Graphics. Remember…… DIGITAL - Digital means discrete. DIGITAL - Digital means discrete. Digital representation is comprised.
UNIT 5.  The related activities of sorting, searching and merging are central to many computer applications.  Sorting and merging provide us with a.
The task of compression consists of two components, an encoding algorithm that takes a file and generates a “compressed” representation (hopefully with.
CS 325 Introduction to Computer Graphics 04 / 12 / 2010 Instructor: Michael Eckmann.
October 1, 2013Computer Vision Lecture 9: From Edges to Contours 1 Canny Edge Detector However, usually there will still be noise in the array E[i, j],
-BY DARSHAN ALAGUD UNDER GUIDANCE OF K.R.RAO. FALL 09, ELECTRICAL ENGINEERING DEPARTMENT, UNIVERSITY OF TEXAS AT ARLINGTON A Study on Fractal Image Compression.
Chapter 7 Lossless Compression Algorithms 7.1 Introduction 7.2 Basics of Information Theory 7.3 Run-Length Coding 7.4 Variable-Length Coding (VLC) 7.5.
Chapter 3- Coordinate systems A coordinate system is a grid used to identify locations on a page or screen that are equivalent to grid locations on the.
April 21, 2016Introduction to Artificial Intelligence Lecture 22: Computer Vision II 1 Canny Edge Detector The Canny edge detector is a good approximation.
ITEC2110, Digital Media Chapter 2 Fundamentals of Digital Imaging 1 GGC -- ITEC Digital Media.
BITMAPPED IMAGES & VECTOR DRAWN GRAPHICS
Section 8.1 Section 8.2 Create a custom theme Design a color scheme
Data Representation.
JPEG Compression What is JPEG? Motivation
Binary Notation and Intro to Computer Graphics
Relations, Functions, and Matrices
Computer Science Higher
CS 1321.
"Digital Media Primer" Yue-Ling Wong, Copyright (c)2013 by Pearson Education, Inc. All rights reserved.
Fractal image compression
JPEG.
Digital 2D Image Basic Masaki Hayashi
Data Compression.
Chapter III, Desktop Imaging Systems and Issues: Lesson IV Working With Images
Dr. Jim Rowan ITEC 2110 Bitmapped Images
Mean Shift Segmentation
Look at Me Mod 4 Lesson 3 Graphics Module 4- Build a Game.
Feature description and matching
Common Classification Tasks
Computer Vision Lecture 5: Binary Image Processing
Data Representation.
Computer Vision Lecture 9: Edge Detection II
OOP Paradigms There are four main aspects of Object-Orientated Programming Inheritance Polymorphism Abstraction Encapsulation We’ve seen Encapsulation.
Representing Images 2.6 – Data Representation.
15-826: Multimedia Databases and Data Mining
Fractal Image Compression
Fundamentals of Data Representation
APPLICATIONS of FRACTALS
© 2016 Pearson Education, Inc., Hoboken, NJ. All rights reserved.
JPEG Still Image Data Compression Standard
Copyright © Cengage Learning. All rights reserved.
Image Coding and Compression
Generating Random Variates
Lecture-Hashing.
Presentation transcript:

5. Fractal Compression Fractal compression is a lossy compression method used to compress images using fractals. The method is best suited for photographs of natural scenes (trees, mountains, ferns, clouds). The fractal compression technique relies on the fact that in certain images, parts of the image resemble other parts of the same image.

Fractal compression appeared to be a promising technology in the late 1980s, when in some circumstances it appeared to compress much better than JPEG, its main competitor at that time. However, fractal compression never achieved widespread use. Fractal compression is much, much slower to compress and much slower to decompress than JPEG. Furthermore, its patents were not widely licensed. Also, the improved compression ratio is an illusion.

Fractal compression only has a large advantage over JPEG at low image quality levels, which is usually undesirable. The claim that fractal compressed images, when enlarged beyond their original size, looked better than similarly enlarged JPEG images seems also to have been an irrelevant distinction.

Fractal Image Compression

Overview Introduction Why Fractal Image Compression Mathematical Background How does it work? Examples Possible Improvements

Introduction Images are stored on computers as collections of bits representing pixels or points forming the picture elements. Most data contains some amount of redundancy, which can sometimes be removed for storage and replaced for recovery. this redundancy does not lead to high compression ratios. An image can be changed in many ways that are either not detectable by the human eye or do not contribute to the degradation of the image.

Fractal Image Compression Is a compression method developed in the late 80’s Is patented Compression ratios from 1:4 to 1:100 Compressing is slow. Decoding is fast. Best suited for images of natural scenes, such as mountains, trees, clouds etc. Compresses color images better than grey scale images.

Fractal Compression The idea is to look for parts in a picture that resembles other parts in the same picture. The picture is divided into (range blocks) (small) and (domain blocks) (big). Uses a domain block to describe a range block. For each range block, search for the domain block that most closely resembles the range block.

Compression The searching that is done when trying to find the most suited domain block for each range block takes a lot of time. Have to check many transformations per domain block. Can take from 5 seconds up to 5 hours (or more) to compress an image. What is stored in the compressed file: The translation done on the domain blocks to match the position of their associated range blocks The transformations done on the domain blocks. The colour, brightness, contrast adjustments. This information is called fractal codes. No pixels are stored at all, only mathematical functions.

Compression 2 Typical pixel sizes of the range and domain blocks: Mapping of range blocks (R) and domain blocks (D) and their transformations (T) Typical pixel sizes of the range and domain blocks: The domain blocks are double the size of the range blocks. • Smaller size of the blocks means a larger compressed file, because of more fractal codes.

How does it work? Encoding divide image into small, non- overlapping, square blocks, typically called “parent blocks”. Divide each parent block into 4 each blocks, or “child blocks.” Compare each child block against a subset of all possible overlapping blocks of parent block size. Need to reduce the size of the parent to allow the comparison to work. Determine which larger block has the lowest difference, according to some measure, between it and the child block.

Decompression Decompression is done by applying the transformations and translations described in the fractal codes on an arbitrary image. Easy to automate. Is fast. Decoding is resolution independent: If a 64x64 image was compressed, it can be decompressed to any size (e.g. 128x128) without as much loss in quality as for a normal zoom. Read in child block and transform block position, transform, and size information. Use any blank starting image of same size as original image

Overview Why Fractal Image Compression Mathematical Background How does it work? Examples Possible Improvements

Why Fractal Image Compression Different type of compression scheme worth exploring Takes advantage of similarities within an image Advanced detail interpolation High theoretical compression rates Fast decompression times

Mathematical Background Started with Michael Barnsley, and refined by A. Jacquin Try and find a set of transforms that map an image onto itself. The key is the Collage Theorem States that if the error difference between the target image and the transformation of that image is less than a certain value the transforms are an equivalent representation of the image.

How does it work?-Encoding Take a starting image and divide it into small, non-overlapping, square blocks, typically called “parent blocks”. Divide each parent block into 4 each blocks, or “child blocks.” Compare each child block against a subset of all possible overlapping blocks of parent block size. Need to reduce the size of the parent to allow the comparison to work. Determine which larger block has the lowest difference, according to some measure, between it and the child block. Calculate a grayscale transform to match intensity levels between large block and child block precisely. Typically an affine transform is used (w*x = a*x + b) to match grayscale levels. Draw Pictures on a board here.

How does it work? – Encoding Upper left corner child block, very similar to upper right parent block. Compute affine transform. Store location of parent block (or transform block), affine transform components, and related child block into a file. Repeat for each child block. Lots of comparisons can calculations. 256x256 original image 16x16 sized parent blocks 241*241 = 58,081 block comparisons

How does it work?- Decoding Read in child block and tranform block position, transform, and size information. Use any blank starting image of same size as original image For each child block apply stored transforms against specified transform block Overwrite child block pixel values with transform block pixel values Repeat until acceptable image quality is reached.

Examples Original Image Starting Image for Decoding

How does it Work? – Decoding First Iteration Second Iteration

How does it work? - Decoding Fifth Iteration Tenth Iteration

Possible Improvments Greatest weakness is time for encoding Possible speed ups Order transform blocks into domains based off of average intensity and variance Only search through blocks with similar structures Do not search all possible blocks Reduce number of child blocks Quality and Compression Improvements through Quadtrees or HV Trees Rotations of Transform Blocks during comparison Improved grayscale transforms

Math Modeling Final Project APPLICATIONS of FRACTALS FRACTAL LANDSCAPES FRACTAL IMAGE COMPRESSION Advisor: Professor Alber Fang Qi Pu Wan Xue Rui

Two important properties of a fractal F Review: Two important properties of a fractal F F has detail at every level. F is exactly, approximately or statistically self-similar.

Fractal Landscapes Fractals are now used in many forms to create textured landscapes and other intricate models. It is possible to create all sorts of realistic fractal forgeries, images of natural scenes, such as lunar landscapes, mountain ranges and coastlines. This is seen in many special effects within Hollywood movies and also in television advertisements. A fractal landscape created by Professor Ken Musgrave (Copyright: Ken Musgrave) A fractal planet.

Simulation process First: Already known The average of the 2 neighbor blue points plus r The average of the 4 neighbor red points plus r This random value r is normally distributed and scaled by a factor d1 related to the original d by d is the scale constant. H is the smoothness constant.

We can now carry out exactly the same procedure on each of the four smaller squares, continuing for as long as we like, but where we make the scaling factor at each stage smaller and smaller; by doing this we ensure that as we look closer into the landscape, the 'bumps' in the surface will become smaller, just as for a real landscape. The scaling factor at stage n is dn, given by Simulation result by MATLAB Using a 64x64 grid and H=1.25 d=15

FRACTAL IMAGE COMPRESSION What is Fractal Image Compression ? The output images converge to the Sierpinski triangle. This final image is called attractor for this photocopying machine. Any initial image will be transformed to the attractor if we repeatedly run the machine. On the other words, the attractor for this machine is always the same image without regardless of the initial image. This feature is one of the keys to the fractal image compression.

How can we describe behavior of the machine How can we describe behavior of the machine ? Transformations of the form as follows will help us. Such transformations are called affine transformations. Affine transformations are able to skew, stretch, rotate, scale and translate an input image. M.Barnsley suggested that perhaps storing images as collections of transformations could lead to image compression.

Iterated Function Systems ( IFS ) An iterated function system consists of a collection of contractive affine transformations. For an input set S, we can compute wi for each i, take the union of these sets, and get a new set W(S). Hutchinson proved that in IFS, if the wi are contractive, then W is contractive, thus the map W will have a unique fixed point in the space of all images. That means, whatever image we start with, we can repeatedly apply W to it and our initial image will converge to a fixed image. Thus W completely determine a unique image.

Self-Similarity in Images We define the distance of two images by: where f and g are value of the level of grey of pixel, P is the space of the image JAVA Original Lena image Self-similar portions of the image

Affine transformation mentioned earlier is able to "geometrically" transform part of the image but is not able to transform grey level of the pixel. so we have to add a new dimension into affine transformation Here si represents the contrast, oi the brightness of the transformation For encoding of the image, we divide it into: non-overlapped pieces (so called ranges, R) overlapped pieces (so called domains, D)

Encoding Images Suppose we have an image f that we want to encode. On the other words, we want to find a IFS W which f to be the fixed point of the map W We seek a partition of f into N non-overlapped pieces of the image to which we apply the transforms wi and get back f. We should find pieces Di and maps wi, so that when we apply a wi to the part of the image over Di , we should get something that is very close to the any other part of the image over Ri . Finding the pieces Ri and corresponding Di by minimizing distances between them is the goal of the problem.

Decoding Images The decoding step is very simple. We start with any image and apply the stored affine transformations repeatedly till the image no longer changes or changes very little. This is the decoded image. First three iterations of the decompression of the image of an eye from an initial solid grey image

An Example Suppose we have to encode 256x256 pixel grayscale image. let R1~R1024 be the 8x8 pixel non-overlapping sub-squares of the image, and let D be the collection of all overlapping 16x16 pixel sub-squares of the image (general, domain is 4 times greater than range). The collection D contains (256-16+1) * (256-16+1) = 58,081 squares. For each Ri search through all of D to find Di with minimal distances To find most-likely sub-squares we have to minimize distance equation. That means we must find a good choice for Di that most looks like the image above Ri (in any of 8 ways of orientations) and find a good contrast si and brightness oi. For each Ri , Di pair we can compute contrast and brightness using least squares regression.

Fractal Image Compression versus JPEG Compression JPEG-max. quality (32,072) comp. ratio: 5.75:1 FIF-max. quality (30,368) comp. ratio: 6.07:1 Original Lena image (184,320 bytes)

Resolution Independence One very important feature of the Fractal Image Compression is Resolution Independence. When we want to decode image, the only thing we have to do is apply these transformations on any initial image. After each iteration, details on the decoded image are sharper and sharper. That means, the decoded image can be decoded at any size. So we can zone in the image on the larger sizes without having the "pixelization" effect..                 Lena's eye original image enlarged to 4 times Lena's eye decoded at 4 times its encoding size