Notes on the CIECAM02 Colour Appearance Model

by Billy Biggs <vektor@dumbterm.net>

The following is some of my notes and an implementation of the forward and reverse transforms for the CIECAM02 colour appearance model.

Implementation

This source code is provided under an MIT-style license and may be used in both commercial and non-commerical applications without fee. Thanks to Nathan Moroney of HP Labs for his contributions to this code.

The source code is in C and uses standard C types for all parameters.

The surround effect

The intensity of the surround of an image can greatly affect its appearance. The following is an example of the surround effect. The squares on the light background appear darker than those with a dark background, even though they have the same pixel values.

These squares have the same pixel values

The following is a prediction of the surround effect by the CIECAM02 appearance model. The idea for this demonstration comes from a class project done by some students at Stanford. The boxes below have the same JCh values in the CIECAM02 appearance model, but different pixel values.

These squares are the same colour according to CIECAM02, but different pixel values

The following is a comparison using red and blue squares instead of the achromatic squares above.

Same pixel values

Predicted as same by CEICAM02

Same pixel values

Predicted as same by CEICAM02

sRGB in CIECAM02

The following is an exploration of the representable range of colours in sRGB, and where they are in CIECAM02.

The following plots represent the number of pixels in sRGB having the given lightness values. We are counting from gamma corrected 8-bit sRGB, converting to linear RGB, then to XYZ with a white point of D65, and finally to CIECAM02 using an average surround.

Lightness of sRGB pixels

Chroma of sRGB pixels

Hue of sRGB pixels

The following image is a plot shows lightness on the vertical axis, and hue along the horizontal axis, and each pixel represents the sRGB pixel with highest chroma value. Black pixels are those where no colour was available.

Hues in sRGB

Icon  Name                    Last modified      Size  Description
[DIR] Parent Directory - [   ] ciecam02-0.3.c 03-Nov-2005 19:59 11K [   ] ciecam02-0.3.h 03-Nov-2005 19:59 4.0K [   ] ciecam02.c 03-Nov-2005 19:59 16K [   ] ciecam02.h 03-Nov-2005 20:00 3.8K [IMG] srgb-cam02c.png 14-Nov-2003 12:46 18K [IMG] srgb-cam02h.png 14-Nov-2003 12:46 20K [IMG] srgb-cam02j.png 14-Nov-2003 12:46 17K [IMG] srgb-hues-maxchroma-..> 14-Nov-2003 12:46 160K [IMG] srgb-hues-maxchroma.png 14-Nov-2003 12:57 181K [IMG] surround-achromatic-..> 19-Aug-2003 09:50 2.5K [IMG] surround-achromatic.png 19-Aug-2003 09:50 2.5K [IMG] surround-blue-ciecam..> 19-Aug-2003 09:50 2.5K [IMG] surround-blue.png 19-Aug-2003 09:50 2.5K [IMG] surround-red-ciecam0..> 19-Aug-2003 09:50 2.5K [IMG] surround-red.png 19-Aug-2003 09:50 2.5K [IMG] surround1.png 18-Aug-2003 12:29 2.5K [IMG] surround2.png 18-Aug-2003 12:29 2.5K