colour.CIECAM02_to_XYZ

colour.CIECAM02_to_XYZ(CIECAM02_specification, XYZ_w, L_A, Y_b, surround=CIECAM02_InductionFactors(F=1, c=0.69, N_c=1), discount_illuminant=False)[source]

Converts from CIECAM02 specification to CIE XYZ tristimulus values.

This is the inverse implementation.

Parameters
  • CIECAM02_specification (CIECAM02_Specification) – CIECAM02 colour appearance model specification. Correlate of Lightness \(J\), correlate of chroma \(C\) or correlate of colourfulness \(M\) and hue angle \(h\) in degrees must be specified, e.g. \(JCh\) or \(JMh\).

  • XYZ_w (array_like) – CIE XYZ tristimulus values of reference white.

  • L_A (numeric or array_like) – Adapting field luminance \(L_A\) in \(cd/m^2\), (often taken to be 20% of the luminance of a white object in the scene).

  • Y_b (numeric or array_like) – Relative luminance of background \(Y_b\) in \(cd/m^2\).

  • surround (CIECAM02_InductionFactors, optional) – Surround viewing conditions.

  • discount_illuminant (bool, optional) – Discount the illuminant.

Returns

XYZCIE XYZ tristimulus values.

Return type

ndarray

Raises

ValueError – If neither C or M correlates have been defined in the CIECAM02_specification argument.

Warning

The output range of that definition is non standard!

Notes

Domain

Scale - Reference

Scale - 1

CIECAM02_specification.J

[0, 100]

[0, 1]

CIECAM02_specification.C

[0, 100]

[0, 1]

CIECAM02_specification.h

[0, 360]

[0, 1]

CIECAM02_specification.s

[0, 100]

[0, 1]

CIECAM02_specification.Q

[0, 100]

[0, 1]

CIECAM02_specification.M

[0, 100]

[0, 1]

CIECAM02_specification.H

[0, 360]

[0, 1]

XYZ_w

[0, 100]

[0, 1]

Range

Scale - Reference

Scale - 1

XYZ

[0, 100]

[0, 1]

References

[Fai04], [LL13], [MFH+02], [Wikipedia07b]

Examples

>>> specification = CIECAM02_Specification(J=41.731091132513917,
...                                        C=0.104707757171031,
...                                        h=219.048432658311780)
>>> XYZ_w = np.array([95.05, 100.00, 108.88])
>>> L_A = 318.31
>>> Y_b = 20.0
>>> CIECAM02_to_XYZ(specification, XYZ_w, L_A, Y_b)  
array([ 19.01...,  20...  ,  21.78...])