20.01.2014 Views

5.7. Fractal compression Overview - ICSY

5.7. Fractal compression Overview - ICSY

5.7. Fractal compression Overview - ICSY

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

<strong>5.7.</strong> <strong>Fractal</strong> <strong>compression</strong> <strong>Overview</strong><br />

1. Introduction<br />

2. Principles<br />

3. Encoding<br />

4. Decoding<br />

5. Example<br />

6. Evaluation<br />

7. Comparison<br />

8. Literature References<br />

Prof. Dr. Paul Müller, University of Kaiserslautern<br />

1


Introduction (1) - General<br />

Use of self-similarities between<br />

picture ranges<br />

Geometrical and brightness<br />

modification to describe a range<br />

Perception and efficient coding<br />

of self-similarities (↔ redundant<br />

information) through fractal<br />

transformations<br />

No pixel values are stored, only<br />

transformation parameters<br />

Prof. Dr. Paul Müller, University of Kaiserslautern<br />

2


Introduction (2) - General<br />

<br />

Concept is based on the Fixpoint Theorem from Banach and IFS (Iterated<br />

Function Systems)<br />

<br />

<br />

<br />

<br />

Reconstruction is independent of original resolution, (e.g. enabling a zoom<br />

function without negative side effects such as interpolation)<br />

Lossy and extremely asymmetric <strong>compression</strong> method<br />

Developed by Michael F. Barnsley in 80´s at the Georgia Institute of Technology<br />

Barnsley"s company "Iterated Systems" owns the licenses for full-automatic fractal<br />

<strong>compression</strong><br />

Prof. Dr. Paul Müller, University of Kaiserslautern<br />

3


Introduction (3) - MRCM<br />

The Multi Reduction Copy Machine<br />

<br />

<br />

<br />

Optional number of lenses<br />

Optional rate of diminution<br />

Optional arrangement of copies<br />

Example: Sierpinsky Triangle<br />

3 Lenses<br />

Diminution to 25%<br />

Pyramidal arrangement<br />

The geometric transformation of the MRCM can be expressed<br />

by six parameters:<br />

The affine coefficients a,b,c,d cause a mirroring, rotation and<br />

diminution. The offset T (e,f) describes the geometric<br />

displacement.<br />

Prof. Dr. Paul Müller, University of Kaiserslautern<br />

4


Introduction (4) - MRCM Samples<br />

after 0 iteration after 1 iteration after 2 iterations<br />

after 3 iterations after 4 iterations after 5 iterations<br />

Prof. Dr. Paul Müller, University of Kaiserslautern<br />

5


Introduction (5) - The "inverse" problem<br />

Iteration converges to Sierpinsky Triangle ("Attractor")<br />

Optional size / resolution<br />

Independent of input image<br />

Compression – "inverse" problem<br />

extension of MRCM necessary for efficient coding<br />

Prof. Dr. Paul Müller, University of Kaiserslautern<br />

6


Principles (1) - Partitions<br />

2 Partitions<br />

<br />

<br />

Range blocks R i (often uniform<br />

size, non-overlapping)<br />

Domain blocks D i (optional size,<br />

overlapping)<br />

surjective function D i → R i<br />

Idea: Manipulation of<br />

(relatively) big domain blocks<br />

to describe range blocks<br />

Task: Finding the best<br />

matching domain-block for<br />

each range block<br />

Matching criteria essential for<br />

complexity<br />

Prof. Dr. Paul Müller, University of Kaiserslautern<br />

7


Principles (2a) - Transformations<br />

Geometric transformation of a domain block i (see MRCM):<br />

Transformation matrix (a,b,c,d)<br />

Usually operations are applied to rectangular areas (often<br />

quadratic areas) are used. Therefore the geometric<br />

transformations for a,b,c,d are limited to the following 8<br />

operations:<br />

Prof. Dr. Paul Müller, University of Kaiserslautern<br />

8


Principles (2b) - Transformations<br />

The luminance transformation tolerates a variance and change<br />

of the leading sign of the contrast, also the mean value of the<br />

brightness could be changed. To achieve a higher similarity<br />

between domain and range blocks, the brightness and variance<br />

are corrected after the geometric adaption. This can be done<br />

using the method of the smallest quadrates, by minimizing the<br />

following expression:<br />

whereby d(x,y) is the domain block and r(x,y) is the range<br />

block.<br />

From the geometric and luminance transformation follows the<br />

resulting transformation:<br />

Prof. Dr. Paul Müller, University of Kaiserslautern<br />

9


Principles (3) - Fixpoint Theorem<br />

Idea based on the Fixpoint Theorem from Banach also<br />

known as "Contraction Mapping Theorem" (CMT)<br />

Quotes that:<br />

<br />

<br />

any contractive auto-mapping function within a metrical space<br />

contains a fix point<br />

Iterative application of function converges to fix point<br />

Original picture is defined a "Banchachscher fix point" and<br />

transformation needs to fulfill the CMT accomplishments<br />

to ensure reconstruction<br />

Quality of result after each iteration is usually measured<br />

by the "Collage Theorem"<br />

Prof. Dr. Paul Müller, University of Kaiserslautern<br />

10


Principles (4) - Metrics<br />

<strong>Fractal</strong> Compression produces a certain error since<br />

perfect reconstruction is (usually) not possible<br />

Error can be kept on an appropriate level by any function<br />

accomplishing metrical properties (e.g. accumulation of<br />

single pixel differences)<br />

Finite input (as pictures) is commonly based on the L2<br />

metric<br />

Based on the applied metric, the so called "Peak Signal to<br />

Noise Ratio" (PSNR), describes the difference between<br />

two picture (-areas)<br />

Prof. Dr. Paul Müller, University of Kaiserslautern<br />

11


Principles (5) - PSNR<br />

Peak Signal to Noise Ratio<br />

<br />

Measured in dB<br />

The higher the value, the smaller the perceivable<br />

difference<br />

For a value ≥ 40 dB, no difference can be perceived<br />

between copy and original anymore<br />

Prof. Dr. Paul Müller, University of Kaiserslautern<br />

12


Principles (6) - Collage Theorem<br />

<strong>Fractal</strong> Compression is based on sub-optimal parameters →<br />

error occurrence<br />

Collage Theorem defines an upper error limit<br />

Basically a conclusion from the Contraction Mapping Theorem:<br />

The distance |x-w(x)| is also called "Collage Error"<br />

Task: To apply a contraction W : F → F that minimizes the<br />

distance |x-x f |<br />

Minimization is achieved by minimizing the error of each partial<br />

transformation (also called Collage Coding)<br />

Prof. Dr. Paul Müller, University of Kaiserslautern<br />

13


Encoding (1) - Range block Partition<br />

Basically 3 different methods are used for the range block<br />

partition<br />

Uniform Partition:<br />

<br />

<br />

Same size for each block (e.g. 4x4, 8x8 pixel)<br />

Simple but inefficient<br />

Quadtree Partition:<br />

<br />

<br />

Based on squares with adaptive sizes to information content<br />

relatively simple and relatively efficient<br />

HV- Partition:<br />

<br />

<br />

Based on quadrangles with adaptive sizes to information content<br />

Advanced but efficient<br />

Prof. Dr. Paul Müller, University of Kaiserslautern<br />

14


Encoding (2) - Range block partition example<br />

Prof. Dr. Paul Müller, University of Kaiserslautern<br />

15


Encoding (3) - Domain block partition<br />

By defining a set of range blocks the choice of potential<br />

domain blocks becomes reduced<br />

Compromise between number and size has to be taken<br />

Too many and/or too small domain blocks:<br />

<br />

<br />

Very good results<br />

Poor performance<br />

Too few and/or too big domain blocks:<br />

<br />

<br />

Poor results<br />

Great performance<br />

Optimal block matching strategy is not reasonable (see<br />

example)<br />

Prof. Dr. Paul Müller, University of Kaiserslautern<br />

16


Encoding (4) - Codebook generation<br />

Assignment of domain to range blocks is also known as<br />

"Codebook Generation" (thus, the assignment table itself<br />

is called "Codebook")<br />

Pixels are vertically and horizontally scanned<br />

Legal operations are applied on domain blocks and best<br />

match is written in codebook<br />

Prof. Dr. Paul Müller, University of Kaiserslautern<br />

17


Decoding (1) - iterative buffer strategy<br />

Decoding requires a small part of the coding complexity only<br />

Decoding is based on two scalable buffers A and B<br />

The following 5 steps are executed until the implemented loop<br />

condition (specifying a quality parameter) is fulfilled:<br />

<br />

<br />

<br />

<br />

<br />

Step 1: block boarders of domain- and range blocks are read and<br />

written into buffer (starting with Buffer A)<br />

Step 2: Resolution reduction of domain blocks to size of range<br />

blocks, eventually geometric adaptation<br />

Step 3: Multiplication of reduced domain blocks with contrast and<br />

addition of brightness value on each pixel of the reduced range<br />

blocks<br />

Step 4: Saving of the resulting picture in the opposite buffer<br />

Step 5: if differences between buffer A and B are beyond the<br />

specified tolerance go back to Step 1 using the buffer with the<br />

resulting picture.<br />

Prof. Dr. Paul Müller, University of Kaiserslautern<br />

18


Decoding (2) - Alternative Strategies<br />

Alternative decoding modes are e.g.:<br />

<br />

<br />

<br />

Thumbnails: provides smaller preview pictures<br />

Pyramidal Arrangement: resolution is doubled each iteration<br />

(reasonable and requires less space)<br />

Best Time Algorithms: optimize the total decoding time for<br />

reconstruction of complete picture<br />

Remark:<br />

Maximum quality of the reconstructed picture can only be<br />

slightly influenced by the choice of the decoding method.<br />

The quality essentially depends on the complexity of the<br />

algorithms that search appropriate transformation<br />

parameters.<br />

Prof. Dr. Paul Müller, University of Kaiserslautern<br />

19


Example (1) - Block coding<br />

Picture: Lenna, 256x256 pixel, 256 grayscales<br />

(→ 512x512 = 262.122 byte)<br />

Partitions:<br />

Range Blocks - uniform partition (8x8 pixel = 1.024)<br />

Domain blocks - uniform, overlapping (16x16 pixel =<br />

58.081, optimal but extremely complex choice)<br />

Transformations:<br />

Rotations: 0°,90°,180°,270°<br />

Mirroring<br />

Diminution factor = 25% (fixed by partition choices)<br />

Brightness transformation<br />

Prof. Dr. Paul Müller, University of Kaiserslautern<br />

20


Example (2) - Complexity and size<br />

Complexity<br />

<br />

<br />

Geometrical Adaptation:<br />

• # range blocks (1.024) x # of domain blocks (58.081) x # geom.<br />

transformations (8)<br />

= 475.799.552 operations<br />

Brightness- and contrast adaptation:<br />

• # range blocks (1.024) x # domain blocks (58.081)<br />

= 59.474.944 operations<br />

Size<br />

# transformations (1.024) x<br />

[ # bits for source coding (16) +<br />

# bits for geometrical transformations (3) +<br />

# bits for Brightness- and Contrast adaptation (12) ]<br />

= 3.986 bytes<br />

+ control data<br />

→ total ~ 8.192 byte<br />

→ Compression rate of 16,5<br />

Prof. Dr. Paul Müller, University of Kaiserslautern<br />

21


Example (3) - Sample pictures<br />

Original (0 iteration)<br />

after 1st iteration<br />

after 2nd iteration<br />

after 10th iteration<br />

Prof. Dr. Paul Müller, University of Kaiserslautern<br />

22


Evaluation (1) - General<br />

Powerful alternative to block orientated methods such as<br />

e.g. DCT<br />

Remarkable <strong>compression</strong> rates<br />

Excellent zoom function / presentation of natural photos<br />

and sharp edges<br />

Negative effect at too high <strong>compression</strong> rates (see sample<br />

pictures)<br />

Complexity still too high to be considered a reasonable<br />

alternative to Wavelets (even though special HW support<br />

is applied)<br />

Popularity and use furthermore reduced by license fees<br />

Prof. Dr. Paul Müller, University of Kaiserslautern<br />

23


Evaluation (2) - Performance<br />

Performance and complexity mainly depend on implemented<br />

search strategies<br />

The following three statements might give an impression of the<br />

present situation and the development of the performance:<br />

1988 – Barnsley about encoding a "complex" photo:<br />

Complexity of about 100 hours on 2 Workstations<br />

1997 – Diploma Thesis: <strong>Fractal</strong> Image <strong>compression</strong> / adaptive<br />

algorithms<br />

Complexity of only the range block partition of a 512x 512 BW<br />

photo still varies between 1,5 – 57 minutes<br />

2002 – Class: Digital Image Processing (University of<br />

Dortmund, Germany)<br />

Complexity of a "regular" photo still ranges from 50 – 147<br />

seconds<br />

Prof. Dr. Paul Müller, University of Kaiserslautern<br />

24


Evaluation (3) - Fields of application<br />

<strong>Fractal</strong> <strong>compression</strong> is mainly used for picture and video<br />

files<br />

Nevertheless, good results can also be achieved for audio<br />

files<br />

Application only seems reasonable when consumer/user<br />

does not get involved with coding complexity<br />

2 commercial examples:<br />

<br />

<br />

Star Trek II (1982): Background landscapes were created by IFS<br />

Encarta (1992): fractal encoded images of a multimedia<br />

encyclopedia from Microsoft<br />

Hybrid coding methods gain interest (e.g. the additional<br />

use of DCT to obtain a scalable overall quality level for<br />

any picture)<br />

Prof. Dr. Paul Müller, University of Kaiserslautern<br />

25


Comparison (1) - Experiment<br />

4 <strong>compression</strong> methods have been compared based on<br />

their <strong>compression</strong> rate and the corresponding PSNR<br />

Experiment has been conducted by Y. Fisher, D. Rogovin,<br />

and T. P. Shen (motive: Lenna with 512x512 pixels)<br />

Compared methods<br />

<br />

<br />

<br />

<br />

Wavelets<br />

JPG (based on DCT)<br />

<strong>Fractal</strong> (HV partition)<br />

<strong>Fractal</strong> (Quadtree partition)<br />

Prof. Dr. Paul Müller, University of Kaiserslautern<br />

26


Comparison (2) - Evaluation<br />

Compression Rates 1 – 5:<br />

<br />

<br />

Best results obtained through wavelet transformation<br />

Application of the complex fractal <strong>compression</strong> must be<br />

reasonably questioned for efficiency reasons<br />

Compression Rates 5 – 30:<br />

<br />

All methods provide similar good results (excluding quadtree)<br />

Compression Rates 30+:<br />

<br />

<br />

Cleary demonstrates the limited use of DCT whose resulting<br />

quality strongly decreases<br />

Resulting quality of all 3 further methods decreases proportionally<br />

to increasing <strong>compression</strong> rate<br />

Generally the fractal <strong>compression</strong> provides the best<br />

results at <strong>compression</strong> rates from 10-30<br />

Prof. Dr. Paul Müller, University of Kaiserslautern<br />

27


Comparison (3) - Samples 1<br />

DCT (1:10) <strong>Fractal</strong> (1:10) Wavelet (1:10)<br />

Prof. Dr. Paul Müller, University of Kaiserslautern<br />

28


Comparison (4) - Samples 2<br />

DCT (1:25) <strong>Fractal</strong> (1:25) Wavelet (1:25)<br />

Prof. Dr. Paul Müller, University of Kaiserslautern<br />

29


Comparison (5) - Samples 3<br />

DCT (1:50) <strong>Fractal</strong> (1:50) Wavelet (1:50)<br />

Prof. Dr. Paul Müller, University of Kaiserslautern<br />

30


Comparison (6) - Samples 4<br />

DCT (1:100) <strong>Fractal</strong> (1:100) Wavelet (1:100)<br />

Prof. Dr. Paul Müller, University of Kaiserslautern<br />

31


Literature References<br />

Literature<br />

Digitale Bildcodierung, Jens-Rainer Ohm - Springer ISBN: 3-540-<br />

58579-6<br />

<br />

Demo<br />

<br />

Videokompressionsverfahren im Vergleich, Tosten Milde –dpunkt,<br />

ISBN:3-920993-23-3<br />

http://www.eurecom.fr/~image/DEMOS/FRACTAL/<br />

Comparison of image <strong>compression</strong> methods<br />

<br />

http://archiv.tuchemnitz.de/pub/1998/0010/data/vortrag/dth/pictures.html<br />

Prof. Dr. Paul Müller, University of Kaiserslautern<br />

32

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!