Of Colorspaces and Image Compression (Part II)

Last week we discussed briefly how we can represent color using either RGB or a colorspace that’s more easily amenable to decimation by a psychovisual model.


This week, we’ll have a look at just how tolerant the human visual system is to color (hue/saturation) variations.

Let’s start with the base image:


(That’s Gus on the left, and feu Mippy on the right). This is a RGB image, that you see in “real colors”.

If we separate the image in the three color components Y, Cr, and Cb, we get the following three images:




which are composed of all Y pixels, all Cr pixels, and Cb pixels, respectively.

The first thing we notice is that the first picture is “just the black-and-white version” of the picture. That is correct. The Y component correspond to the lightness, or brightness, of the image.

The two other images are low contrast, low detail images. These are the hue/saturation components of the image. They’re not intuitively “colors” because they correspond, in the YCrCb colorspace to “red differences” and “blue differences”, which aren’t colors at all.

* *

Now, let’s perform an experiment that will show just how insensitive we are to variations in hue and saturation: let’s apply a gaussian (smoothing) filter to the Cr and Cb planes, and reconstruct the image after:



Resulting in the reconstructed image:


* *

This shows, indeed, that we’re not very good at seeing spatially-limited variations of hue/saturation in an image. However, would have we done this on the Y plane, the picture would have looked blurred, and we would notice it quite a lot:


And this creates this surreal image where hue/saturation is precise, but the brightness, Y, is blurred.

* *

But if we smooth (or subsample) the saturation and hue components, it’s quite hard to spot differences if we do not have a reference for comparison. Under ordinary viewing conditions, we just do not see them. But with a reference, and a magnifier…


…the differences are visible, but not that much either.

* *

Next week, we’ll discuss how to exploit this to get a working compression algorithm, using JPEG as an example.

To be continued…

3 Responses to Of Colorspaces and Image Compression (Part II)

  1. […] Last week, we continued on color spaces, and we showed—although handwavingly—that we’re not very good at seeing color differences in hue and saturation, and that we’re only good at seeing difference in brightness. In this last part, we’ll have a look at how JPEG exploits that for image compression. […]

  2. […] compression by using a color-space that concentrates the information in the Y (or luma) component, smooths or subsamples the color components, then further destroys information that “shouldn’t […]

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: