Non-linear masking examples

Billy Biggs <vektor@dumbterm.net>

[ Page 1 ] [ Page 2 ] [ Page 3 ]

For some more background on this page, see the parent page on non-linear masking.

Recently my friend Tony went to Amsterdam and Japan, taking a lot of photos. Some came out too dark, and so I used them for experimenting with colour correction methods.

I used two techniques. Both of these use the lightness of the image to decide how to correct it. One method is completely based on operations in CIECAM02, and the other is just a function on the gamma-corrected RGB values, but using the lightness function from the IPT colourspace.

Unfortunately, the CIECAM02-based images, which I thought would look better, seem to appear too bright for many of the darker images. Maybe this is because I am not using the surround and background attributes to my advantage?

Original

This is the original photo from the digital camera, shot using only its own built-in white point correction.

Gaussian blur

The blurred image used as a mask. This is a gaussian blur in linear RGB space with a kernel size of 10% of the image width.

CIECAM02 correction

To perform the correction using CIECAM02, we take the corresponding pixel from the mask and calculate its CIECAM02 lightness. We then apply the correction function only on the lightness value of the current pixel in the image.

Our images are sRGB, so we use D65 as the white point in both the forward and inverse transforms, and use an average surround.

RGB correction

To perform the correction in RGB space, we first take the corresponding pixel from the mask and calculate its lightness in IPT space. We then apply the correction function directly on the gamma corrected R, G and B channels of the image.

This shot clearly needed some adjustment, but the CIECAM02 version had more halo artifacts than we would have liked.

An example where the correction really helps and any halos end up looking natural.