frudawski

cieCAM02inv

The cieCAM02inv function determines the colour appearance model parameters of the CIECAM02 inverse model, as in CIE 159:2004. For the forward model, see cieCAM02. Any errors in the data set or in results generated with the Lighting Toolbox are not in the liability of the CIE nor me, see licence.

Usage:

XYZ = cieCAM02inv(cam,wp,cond,La,Yb)

Or:

XYZ = cieCAM02inv(cam,p)

Where:

ParameterDescription
XYZIs the return vector triplet or matrix of the sample(s).
camIs the input struct of the colour appearance model:
J = lightness
C = chroma
H = hue quadrature
M = colourfulness
Q = brightness
s = saturation
a = corresponding cartesian coordinates: a_c, a_M, a_s
b = corresponding cartesian coordinates: b_c, b_M, b_s
wpDefines the test illuminant white point, vector triplet [X Y Z].
condDefines the surround condition:
‘ave’ average surround (default)
‘dim’ dim surround
‘dark’ dark surround
LaIs the corresponding luminance of the adapting field, numeric. Default: XYZ(2)/5
YbIs the corresponding background luminance, numeric. Default: Yb = wp(2)/5
pIs the alternative input struct with several parameters for the inverse model function, see cieCAM02.

Examples

CIECAM02 inverse transformation:

% define parameters
XYZ = [19.31 23.93 10.14];
wp = [98.88 90.00 32.02];
cond = 'ave';
La = 20;
Yb = 18;
% CIECAM02 transfromation
cam = cieCAM02(XYZ,wp,cond,La,Yb);
% change viewing condition
La = 50;
wp = ciewhitepoint('D50').*100;
% inverse transformation
XYZ = cieCAM02inv(cam,XYZ,wp,cond,La,Yb)

Result:

XYZ = 17.809   26.924   23.874

CIECAM02 inverse transformation with CIECAM02 parameter struct:

% define parameters
XYZ = [19.31 23.93 10.14];
wp = [98.88 90.00 32.02];
cond = 'ave';
La = 20;
Yb = 18;
% CIECAM02 transfromation
[cam,p] = cieCAM02(XYZ,wp,cond,La,Yb);
% inverse transformation
XYZ = cieCAM02inv(cam,p)

See also: cieCAM02

Result:

XYZ = 19.310   23.930   10.140

Reference

CIE 159:2004: A colour appearance model for colour management systems: CIECAM02. Commission Internationale de l'Éclairage (CIE), Vienna Austria, 2004, ISBN: 978 3 901906 29 9.

Leave a comment

* I accept the use of cookies as well as the terms in the privacy policy. I accept that data provided by me is processed and saved. I know that comments are saved and published after review.