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

[ICO]NameLast modifiedSizeDescription

[PARENTDIR]Parent Directory   -  
[IMG]surround2.png 2003-08-18 09:29 2.5K 
[IMG]surround1.png 2003-08-18 09:29 2.5K 
[IMG]surround-red.png 2003-08-19 06:50 2.5K 
[IMG]surround-red-ciecam0..>2003-08-19 06:50 2.5K 
[IMG]surround-blue.png 2003-08-19 06:50 2.5K 
[IMG]surround-blue-ciecam..>2003-08-19 06:50 2.5K 
[IMG]surround-achromatic.png2003-08-19 06:50 2.5K 
[IMG]surround-achromatic-..>2003-08-19 06:50 2.5K 
[IMG]srgb-hues-maxchroma.png2003-11-14 09:57 181K 
[IMG]srgb-hues-maxchroma-..>2003-11-14 09:46 160K 
[IMG]srgb-cam02j.png 2003-11-14 09:46 17K 
[IMG]srgb-cam02h.png 2003-11-14 09:46 20K 
[IMG]srgb-cam02c.png 2003-11-14 09:46 18K 
[TXT]ciecam02.h 2005-11-03 17:00 3.8K 
[TXT]ciecam02.c 2005-11-03 16:59 16K 
[TXT]ciecam02-0.3.h 2005-11-03 16:59 4.0K 
[TXT]ciecam02-0.3.c 2005-11-03 16:59 11K