Skip to content

c00kiemon5ter/Fractal-Image-Compression

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Fractal Image Compression

Fractal compression is a lossy image compression method using 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. Fractal compression differs from pixel-based compression schemes such as JPEG, GIF and MPEG since no pixels are saved. Once an image has been converted into fractal code, the image can be recreated to fill any screen size without the loss of sharpness that occurs in conventional compression schemes.

Notes

  • compression:

    • read image

    • split into NxM range and domain blocks

    • compare range with domain blocks

    • store most similar blocks along with transformations applied

      • similar blocks construct a pattern space
      • produce a fractal model from the pattern space
    • store the matched image with the position it draws

  • optimizations

    • limit color space store color information separately similarity doesn't care about color

      • negate image
      • monochrome image
      • grayscale image
    • scale down images before comparing less pixel-by-pixel compares

    • classify images edges color space histogram

    • perceptual hash algorithms compare phashes only check under a thresold value (quality?)