0

I am a novice in Image compression or for that matter image processing. I am trying to learn fractal image compression from a famous book by Yuval Fsiher. At the end of the book he has given the entire compression-decompression code in C. I mostly work in CUDA. The present C code by Fisher only deals with raw images.

  1. My main focus is to understand the compression process and then modify the above code such that it also works with BMP (color & grayscale) images
  2. Subsequently, I want to speed-up the code by converting selected functions into CUDA kernels.I am planning to focus on the range-domain comparisons that is highly compute-intensive.

So I have the following issues:

Is it necessary to study BMP image format before proceeding to compress it or I can treat it just as a matrix and compress it using Fractal Image Compression. The fractal compression works on the concept of finding similarities in range-domain maps using IFS (Iterated Function System) which is basically a collection of Affine transformations.

mmain
  • 333
  • 3
  • 19
MuneshSingh
  • 162
  • 1
  • 10
  • You won't want to operate directly on the BMP file format. There are plenty of sample codes out there to convert BMP format to raw pixel data matrix. – Robert Crovella Nov 08 '14 at 16:50

1 Answers1

1

Fractal Compression is completely independent of source file storage format. Once you've loaded the BMP into an image or buffer it will be raw pixels (same as if you read a PNG or JPEG). If your BMP is uncompressed it is very easy to read; it's raw pixels once you're past the header. But a flexible reader also supports different pixel depths and compression, so it's best to find a library that does this for you unless you only need to work with your own test images.

Dithermaster
  • 6,223
  • 1
  • 12
  • 20
  • That means, I can consider BMP image file just as any other file and then apply the fractal compression on the entire file. Will it serve the purpose? Will it be any different from applying fractal compression past header on the pixel data exclusively? I suspect that IFS that deals with Affine transformations (mappings between range-domain pairs) need to be applied exclusively on pixel data and not on some combination of control (header,bitmap info, pallette, etc) data and pixel data combined. I hope I am able to make my point across to you. – MuneshSingh Nov 11 '14 at 03:43
  • You don't apply IFS to linear file data, you apply it to 2D image data. So regardless of the file format, you need to convert it to a 2D image before you do IFS compression. – Dithermaster Nov 11 '14 at 21:18