ArticleslgStudy

computer science

Fractal compression

Fractal compression is a computer science topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand Fractal compression rather than just read about it. In short: Fractal compression is a lossy compression method for digital images, based on fractals. The method is best suited for textures and natural images, relying on the fact that parts of an image often resemble other parts of the same image.

Fractal compression — main illustration
Fractal compression — illustration

Key takeaways

  • Fractal compression belongs to computer science; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect Fractal compression to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of Fractal compression from memory before moving on to harder problems.

Reference excerpt

Fractal compression is a lossy compression method for digital images, based on fractals. The method is best suited for textures and natural images, relying on the fact that parts of an image often resemble other parts of the same image. Fractal algorithms convert these parts into mathematical data called "fractal codes" which are used to recreate the encoded image.

Iterated function systems

Fractal image representation may be described mathematically as an iterated function system (IFS).

For binary images We begin with the representation of a binary image, where the image may be thought of as a subset of ℝ2. An IFS is a set of contraction mappings ƒ1,...,ƒN,

fi:ℝ2→ℝ2. According to these mapping functions, the IFS describes a two-dimensional set S as the fixed point of the Hutchinson operator

H(A)=⋃i=1Nfi(A),A⊂ℝ2. That is, H is an operator mapping sets to sets, and S is the unique set satisfying H(S) = S. The idea is to construct the IFS such that this set S is the input binary image. The set S can be recovered from the IFS by fixed point iteration: for any nonempty compact initial set A0, the iteration Ak+1 = H(Ak) converges to S. The set S is self-similar because H(S) = S implies that S is a union of mapped copies of itself:

S=f1(S)∪f2(S)∪⋯∪fN(S) So we see the IFS is a fractal representation of S.

Extension to grayscale IFS representation can be extended to a grayscale image by considering the image's graph as a subset of ℝ3. For a grayscale image u(x,y), consider the set S = {(x,y,u(x,y))}. Then similar to the binary case, S is described by an IFS using a set of contraction mappings ƒ1,...,ƒN, but in ℝ3,

fi:ℝ3→ℝ3.

Encoding A challenging problem of ongoing research in fractal image representation is how to choose the ƒ1,...,ƒN such that its fixed point approximates the input image, and how to do this efficiently. A simple approach for doing so is the following partitioned iterated function system (PIFS):

Partition the image domain into range blocks Ri of size s×s. For each Ri, search the image to find a block Di of size 2s×2s that is very similar to Ri. Select the mapping functions such that H(Di) = Ri for each i. In the second step, it is important to find a similar block so that the IFS accurately represents the input image, so a sufficient number of candidate blocks for Di need to be considered. On the other hand, a large search considering many blocks is computationally costly. This bottleneck of searching for similar blocks is why PIFS fractal encoding is much slower than, for example, DCT and wavelet based image representation. The initial square partitioning and brute-force search algorithm presented by Jacquin provides a starting point for further research and extensions in many possible directions—different ways of partitioning the image into range blocks of various sizes and shapes; fast techniques for quickly finding a close-enough matching domain block for each range block rather than brute-force searching, such as fast motion estimation algorithms; different ways of encoding the mapping from the domain block to the range block; etc. Other researchers attempt to find algorithms to automatically encode an arbitrary image as RIFS (recurrent iterated function systems) or global IFS, rather than PIFS; and algorithms for fractal video compression including motion compensation and three dimensional iterated function systems. Fractal image compression has many similarities to vector quantization image compression.

Features With fractal compression, encoding is extremely computationally expensive because of the search used to find the self-similarities. Decoding, however, is quite fast. While this asymmetry has so far made it impractical for real time applications, when video is archived for distribution from disk storage or file downloads fractal compression becomes more competitive. At common compression ratios, up to about 50:1, fractal compression provides similar results to DCT-based algorithms such as JPEG. At high compression ratios fractal compression may offer superior quality. For satellite imagery, ratios of over 170:1 have been achieved with acceptable results. Fractal video compression ratios of 25:1–244:1 have been achieved in reasonable compression times (2.4 to 66 sec/frame). Compression efficiency increases with higher image complexity and color depth, compared to simple grayscale images.

Resolution independence and fractal scaling An inherent feature of fractal compression is that images become resolution independent after being converted to fractal code. This is because the iterated function systems in the compressed file scale indefinitely. This indefinite scaling property of a fractal is known as "fractal scaling".

Fractal interpolation The resolution independence of a fractal-encoded image can be used to increase the display resolution of an image. This process is also known as "fractal interpolation". In fractal interpolation, an image is encoded into fractal codes via fractal compression, and subsequently decompressed at a higher resolution. The result is an up-sampled image in which iterated function systems have been used as the interpolant. Fractal interpolation maintains geometric detail very well compared to traditional interpolation methods like bilinear interpolation and bicubic interpolation. Since the interpolation cannot reverse Shannon entropy however, it ends up sharpening the image by adding random instead of meaningful detail. One cannot, for example, enlarge an image of a crowd where each person's face is one or two pixels and hope to identify them.

… excerpt ends here. Continue reading the full article.

Illustrations

Fractal compression: 2 triangles, example to show how fractal compression works
2 triangles, example to show how fractal compression works

Worked examples

Example 1 — a first encounter with Fractal compression

Start with the simplest possible case. Write down what Fractal compression claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In computer science, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to Fractal compression before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about Fractal compression ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of Fractal compression

In research
Fractal compression appears in computer science research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses Fractal compression in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
Fractal compression is common in secondary-school and first-year university syllabi. It links to neighbouring topics Data compression, Fractals, Image compression, so understanding it makes those chapters shorter.
In everyday life
Look for Fractal compression outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.
Ask Teacher Smith questions about this articleOpens your AI tutor with a question about “Fractal compression” →

How to study Fractal compression in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what Fractal compression means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain Fractal compression out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is Fractal compression in simple terms?

Fractal compression is a lossy compression method for digital images, based on fractals. The method is best suited for textures and natural images, relying on the fact that parts of an image often resemble other parts of the same image.

Why does Fractal compression matter?

Because it connects several computer science ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study Fractal compression?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on Fractal compression.

Tags

  • Data compression
  • Fractals
  • Image compression
  • Lossy compression algorithms

Keep exploring