1 Prof. Dr. Paul Müller, University of Kaiserslautern
5.7. Fractal compression Overview
1. Introduction
2. Principles
3. Encoding
4. Decoding
5. Example
6. Evaluation
7. Comparison
8. Literature References
2 Prof. Dr. Paul Müller, University of Kaiserslautern
Introduction (1) - General
Use of self-similarities between
picture ranges
Geometrical and brightness
modification to describe a range
Perception and efficient coding
of self-similarities (↔ redundant
information) through fractal
transformations
No pixel values are stored, only
transformation parameters
3 Prof. Dr. Paul Müller, University of Kaiserslautern
Introduction (2) - General
Concept is based on the Fixpoint Theorem from Banach and IFS (Iterated Function Systems)
Reconstruction is independent of original resolution, (e.g. enabling a zoom function without negative side effects such as interpolation)
Lossy and extremely asymmetric compression method
Developed by Michael F. Barnsley in 80´s at the Georgia Institute of Technology
Barnsley"s company "Iterated Systems" owns the licenses for full-automatic fractal compression
4 Prof. Dr. Paul Müller, University of Kaiserslautern
Introduction (3) - MRCM
The Multi Reduction Copy Machine Optional number of lenses
Optional rate of diminution
Optional arrangement of copies
Example: Sierpinsky Triangle 3 Lenses
Diminution to 25%
Pyramidal arrangement
The geometric transformation of the MRCM can be expressed by six parameters:
The affine coefficients a,b,c,d cause a mirroring, rotation and diminution. The offset T (e,f) describes the geometric displacement.
5 Prof. Dr. Paul Müller, University of Kaiserslautern
Introduction (4) - MRCM Samples
after 0 iteration after 1 iteration after 2 iterations
after 3 iterations after 4 iterations after 5 iterations
6 Prof. Dr. Paul Müller, University of Kaiserslautern
Introduction (5) - The "inverse" problem
Iteration converges to Sierpinsky Triangle ("Attractor")
Optional size / resolution
Independent of input image
Compression – "inverse" problem
extension of MRCM necessary for efficient coding
7 Prof. Dr. Paul Müller, University of Kaiserslautern
Principles (1) - Partitions
2 Partitions Range blocks Ri (often uniform
size, non-overlapping)
Domain blocks Di (optional size, overlapping)
surjective function Di → Ri
Idea: Manipulation of (relatively) big domain blocks to describe range blocks
Task: Finding the best matching domain-block for each range block
Matching criteria essential for complexity
8 Prof. Dr. Paul Müller, University of Kaiserslautern
Principles (2a) - Transformations
Geometric transformation of a domain block i (see MRCM):
Transformation matrix (a,b,c,d) Usually operations are applied to rectangular areas (often quadratic areas) are used. Therefore the geometric transformations for a,b,c,d are limited to the following 8 operations:
9 Prof. Dr. Paul Müller, University of Kaiserslautern
Principles (2b) - Transformations
The luminance transformation tolerates a variance and change of the leading sign of the contrast, also the mean value of the brightness could be changed. To achieve a higher similarity between domain and range blocks, the brightness and variance are corrected after the geometric adaption. This can be done using the method of the smallest quadrates, by minimizing the following expression:
whereby d(x,y) is the domain block and r(x,y) is the range block.
From the geometric and luminance transformation follows the resulting transformation:
10 Prof. Dr. Paul Müller, University of Kaiserslautern
Principles (3) - Fixpoint Theorem
Idea based on the Fixpoint Theorem from Banach also
known as "Contraction Mapping Theorem" (CMT)
Quotes that:
any contractive auto-mapping function within a metrical space
contains a fix point
Iterative application of function converges to fix point
Original picture is defined a "Banchachscher fix point" and
transformation needs to fulfill the CMT accomplishments
to ensure reconstruction
Quality of result after each iteration is usually measured
by the "Collage Theorem"
11 Prof. Dr. Paul Müller, University of Kaiserslautern
Principles (4) - Metrics
Fractal Compression produces a certain error since
perfect reconstruction is (usually) not possible
Error can be kept on an appropriate level by any function
accomplishing metrical properties (e.g. accumulation of
single pixel differences)
Finite input (as pictures) is commonly based on the L2
metric
Based on the applied metric, the so called "Peak Signal to
Noise Ratio" (PSNR), describes the difference between
two picture (-areas)
12 Prof. Dr. Paul Müller, University of Kaiserslautern
Principles (5) - PSNR
Peak Signal to Noise Ratio
Measured in dB
The higher the value, the smaller the perceivable
difference
For a value ≥ 40 dB, no difference can be perceived
between copy and original anymore
13 Prof. Dr. Paul Müller, University of Kaiserslautern
Principles (6) - Collage Theorem
Fractal Compression is based on sub-optimal parameters → error occurrence
Collage Theorem defines an upper error limit
Basically a conclusion from the Contraction Mapping Theorem:
The distance |x-w(x)| is also called "Collage Error"
Task: To apply a contraction W : F → F that minimizes the distance |x-xf|
Minimization is achieved by minimizing the error of each partial transformation (also called Collage Coding)
14 Prof. Dr. Paul Müller, University of Kaiserslautern
Encoding (1) - Range block Partition
Basically 3 different methods are used for the range block
partition
Uniform Partition:
Same size for each block (e.g. 4x4, 8x8 pixel)
Simple but inefficient
Quadtree Partition:
Based on squares with adaptive sizes to information content
relatively simple and relatively efficient
HV- Partition:
Based on quadrangles with adaptive sizes to information content
Advanced but efficient
15 Prof. Dr. Paul Müller, University of Kaiserslautern
Encoding (2) - Range block partition example
16 Prof. Dr. Paul Müller, University of Kaiserslautern
Encoding (3) - Domain block partition
By defining a set of range blocks the choice of potential
domain blocks becomes reduced
Compromise between number and size has to be taken
Too many and/or too small domain blocks:
Very good results
Poor performance
Too few and/or too big domain blocks:
Poor results
Great performance
Optimal block matching strategy is not reasonable (see
example)
17 Prof. Dr. Paul Müller, University of Kaiserslautern
Encoding (4) - Codebook generation
Assignment of domain to range blocks is also known as
"Codebook Generation" (thus, the assignment table itself
is called "Codebook")
Pixels are vertically and horizontally scanned
Legal operations are applied on domain blocks and best
match is written in codebook
18 Prof. Dr. Paul Müller, University of Kaiserslautern
Decoding (1) - iterative buffer strategy
Decoding requires a small part of the coding complexity only
Decoding is based on two scalable buffers A and B
The following 5 steps are executed until the implemented loop
condition (specifying a quality parameter) is fulfilled:
Step 1: block boarders of domain- and range blocks are read and
written into buffer (starting with Buffer A)
Step 2: Resolution reduction of domain blocks to size of range
blocks, eventually geometric adaptation
Step 3: Multiplication of reduced domain blocks with contrast and
addition of brightness value on each pixel of the reduced range
blocks
Step 4: Saving of the resulting picture in the opposite buffer
Step 5: if differences between buffer A and B are beyond the
specified tolerance go back to Step 1 using the buffer with the
resulting picture.
19 Prof. Dr. Paul Müller, University of Kaiserslautern
Decoding (2) - Alternative Strategies
Alternative decoding modes are e.g.:
Thumbnails: provides smaller preview pictures
Pyramidal Arrangement: resolution is doubled each iteration
(reasonable and requires less space)
Best Time Algorithms: optimize the total decoding time for
reconstruction of complete picture
Remark:
Maximum quality of the reconstructed picture can only be
slightly influenced by the choice of the decoding method.
The quality essentially depends on the complexity of the
algorithms that search appropriate transformation
parameters.
20 Prof. Dr. Paul Müller, University of Kaiserslautern
Example (1) - Block coding
Picture: Lenna, 256x256 pixel, 256 grayscales
(→ 512x512 = 262.122 byte)
Partitions:
Range Blocks - uniform partition (8x8 pixel = 1.024)
Domain blocks - uniform, overlapping (16x16 pixel =
58.081, optimal but extremely complex choice)
Transformations:
Rotations: 0°,90°,180°,270°
Mirroring
Diminution factor = 25% (fixed by partition choices)
Brightness transformation
21 Prof. Dr. Paul Müller, University of Kaiserslautern
Example (2) - Complexity and size
Complexity Geometrical Adaptation:
• # range blocks (1.024) x # of domain blocks (58.081) x # geom. transformations (8) = 475.799.552 operations
Brightness- and contrast adaptation: • # range blocks (1.024) x # domain blocks (58.081)
= 59.474.944 operations
Size # transformations (1.024) x
[ # bits for source coding (16) +
# bits for geometrical transformations (3) +
# bits for Brightness- and Contrast adaptation (12) ]
= 3.986 bytes
+ control data
→ total ~ 8.192 byte
→ Compression rate of 16,5
22 Prof. Dr. Paul Müller, University of Kaiserslautern
Example (3) - Sample pictures
Original (0 iteration) after 1st iteration
after 2nd iteration after 10th iteration
23 Prof. Dr. Paul Müller, University of Kaiserslautern
Evaluation (1) - General
Powerful alternative to block orientated methods such as
e.g. DCT
Remarkable compression rates
Excellent zoom function / presentation of natural photos
and sharp edges
Negative effect at too high compression rates (see sample
pictures)
Complexity still too high to be considered a reasonable
alternative to Wavelets (even though special HW support
is applied)
Popularity and use furthermore reduced by license fees
24 Prof. Dr. Paul Müller, University of Kaiserslautern
Evaluation (2) - Performance
Performance and complexity mainly depend on implemented
search strategies
The following three statements might give an impression of the
present situation and the development of the performance:
1988 – Barnsley about encoding a "complex" photo:
Complexity of about 100 hours on 2 Workstations
1997 – Diploma Thesis: Fractal Image compression / adaptive
algorithms
Complexity of only the range block partition of a 512x 512 BW
photo still varies between 1,5 – 57 minutes
2002 – Class: Digital Image Processing (University of
Dortmund, Germany)
Complexity of a "regular" photo still ranges from 50 – 147
seconds
25 Prof. Dr. Paul Müller, University of Kaiserslautern
Evaluation (3) - Fields of application
Fractal compression is mainly used for picture and video
files
Nevertheless, good results can also be achieved for audio
files
Application only seems reasonable when consumer/user
does not get involved with coding complexity
2 commercial examples:
Star Trek II (1982): Background landscapes were created by IFS
Encarta (1992): fractal encoded images of a multimedia
encyclopedia from Microsoft
Hybrid coding methods gain interest (e.g. the additional
use of DCT to obtain a scalable overall quality level for
any picture)
26 Prof. Dr. Paul Müller, University of Kaiserslautern
Comparison (1) - Experiment
4 compression methods have been compared based on
their compression rate and the corresponding PSNR
Experiment has been conducted by Y. Fisher, D. Rogovin,
and T. P. Shen (motive: Lenna with 512x512 pixels)
Compared methods
Wavelets
JPG (based on DCT)
Fractal (HV partition)
Fractal (Quadtree partition)
27 Prof. Dr. Paul Müller, University of Kaiserslautern
Comparison (2) - Evaluation
Compression Rates 1 – 5:
Best results obtained through wavelet transformation
Application of the complex fractal compression must be
reasonably questioned for efficiency reasons
Compression Rates 5 – 30:
All methods provide similar good results (excluding quadtree)
Compression Rates 30+:
Cleary demonstrates the limited use of DCT whose resulting
quality strongly decreases
Resulting quality of all 3 further methods decreases proportionally
to increasing compression rate
Generally the fractal compression provides the best
results at compression rates from 10-30
28 Prof. Dr. Paul Müller, University of Kaiserslautern
Comparison (3) - Samples 1
DCT (1:10) Fractal (1:10) Wavelet (1:10)
29 Prof. Dr. Paul Müller, University of Kaiserslautern
Comparison (4) - Samples 2
DCT (1:25) Fractal (1:25) Wavelet (1:25)
30 Prof. Dr. Paul Müller, University of Kaiserslautern
Comparison (5) - Samples 3
DCT (1:50) Fractal (1:50) Wavelet (1:50)
31 Prof. Dr. Paul Müller, University of Kaiserslautern
Comparison (6) - Samples 4
DCT (1:100) Fractal (1:100) Wavelet (1:100)
32 Prof. Dr. Paul Müller, University of Kaiserslautern
Literature References
Literature
Digitale Bildcodierung, Jens-Rainer Ohm - Springer ISBN: 3-540-
58579-6
Videokompressionsverfahren im Vergleich, Tosten Milde –d-
punkt, ISBN:3-920993-23-3
Demo
http://www.eurecom.fr/~image/DEMOS/FRACTAL/
Comparison of image compression methods
http://archiv.tu-
chemnitz.de/pub/1998/0010/data/vortrag/dth/pictures.html