colour.XYZ_to_CAM16¶
-
colour.
XYZ_to_CAM16
(XYZ, XYZ_w, L_A, Y_b, surround=CAM16_InductionFactors(F=1.0, c=0.69, N_c=1.0), discount_illuminant=False)[source]¶ Computes the CAM16 colour appearance model correlates from given CIE XYZ tristimulus values.
This is the forward implementation.
Parameters: - XYZ (array_like) – CIE XYZ tristimulus values of test sample / stimulus in domain [0, 100].
- XYZ_w (array_like) – CIE XYZ tristimulus values of reference white in domain [0, 100].
- 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 induction factors.
- discount_illuminant (bool, optional) – Truth value indicating if the illuminant should be discounted.
Returns: CAM16 colour appearance model specification.
Return type: Warning
The input domain of that definition is non standard!
Notes
- Input CIE XYZ tristimulus values are in domain [0, 100].
- Input CIE XYZ_w tristimulus values are in domain [0, 100].
References
Examples
>>> XYZ = np.array([19.01, 20.00, 21.78]) >>> XYZ_w = np.array([95.05, 100.00, 108.88]) >>> L_A = 318.31 >>> Y_b = 20.0 >>> surround = CAM16_VIEWING_CONDITIONS['Average'] >>> XYZ_to_CAM16(XYZ, XYZ_w, L_A, Y_b, surround) CAM16_Specification(J=41.7180250..., C=11.9413446..., h=210.3838955..., s=25.3564036..., Q=193.0617673..., M=12.4128523..., H=267.0983345..., HC=None)