colour.CAM16_to_XYZ¶
-
colour.
CAM16_to_XYZ
(CAM16_specification, XYZ_w, L_A, Y_b, surround=CAM16_InductionFactors(F=1.0, c=0.69, N_c=1.0), discount_illuminant=False)[source]¶ Converts CAM16 specification to CIE XYZ tristimulus values.
This is the reverse implementation.
Parameters: - CAM16_specification (CAM16_Specification) – CAM16 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 (CAM16_InductionFactors, optional) – Surround viewing conditions.
- discount_illuminant (bool, optional) – Discount the illuminant.
Returns: XYZ – CIE XYZ tristimulus values.
Return type: ndarray
Raises: ValueError
– If neither C or M correlates have been defined in theCAM16_specification
argument.Warning
The output range of that definition is non standard!
Notes
CAM16_specification
can also be passed as a compatible argumentcolour.utilities.as_namedtuple()
definition.- Input CIE XYZ_w tristimulus values are in domain [0, 100].
- Output CIE XYZ tristimulus values are in range [0, 100].
References
Examples
>>> specification = CAM16_Specification(J=41.718025051415616, ... C=11.941344635245843, ... h=210.38389558131118) >>> XYZ_w = np.array([95.05, 100.00, 108.88]) >>> L_A = 318.31 >>> Y_b = 20.0 >>> CAM16_to_XYZ(specification, XYZ_w, L_A, Y_b) array([ 19.01..., 20... , 21.78...])