Tech News
← Back to articles

Show HN: A luma dependent chroma compression algorithm (image compression)

read original related products more articles

In this article I will describe a technique that can often compress the chroma data of an image to less than 0.5 bits per pixel on average, without visible artifacts.

What is chroma?

A common technique in the field of image and video compression is to convert RGB images to YCrCb before compression. Instead of representing color as red, green and blue channels, we represent them as luminance (Y) and chrominance (Cr and Cb) channels.

One of the main advantages is that Y contains most of the information, while the chroma channels can be represented in a lower resolution without the human eye detecting it (something that was actually used as early as in the 1930’s-1960’s for color television, where the chroma channels occupied less signal bandwidth than the luma channel).

Figure 1: A color image (upper left) and its Y (upper right), Cr (lower left) and Cb (lower right) components. Source: Kodak lossless true color image suite.

Note: Throughout the article we assume that the luma channel (Y) is available when compressing and reconstructing the chroma data. The luma information would typically be compressed in some other clever manner (e.g. using a frequency transform like the DCT), but we ignore the details of how that is done in this article.

Key observation: Chroma is similar to luma

If you look at the chroma channels for a color image (like the one above), you will notice that the chroma channels are quite similar to the luma channel. For instance objects and edges appear in the same places, and fine patterns in the chroma channels are also present in the luma channel. I.e. we should be able to derive the chroma channels from the luma channel, using some clever mapping function.

Approximating chroma from luma

Finding a good and accurate mapping function that works for the entire image would be very hard, but if we reduce the problem to smaller sub-blocks of the image (e.g. 16×16 pixels), the problem becomes easier.

... continue reading