colour.adaptation.chromatic_adaptation_Zhai2018#
- colour.adaptation.chromatic_adaptation_Zhai2018(XYZ_b: Domain100, XYZ_wb: Domain100, XYZ_wd: Domain100, D_b: ArrayLike = 1, D_d: ArrayLike = 1, XYZ_wo: ArrayLike | None = None, transform: Literal['CAT02', 'CAT16'] | str = 'CAT02') Range100[source]#
Adapt the specified stimulus CIE XYZ tristimulus values from test viewing conditions to reference viewing conditions using the Zhai and Luo (2018) chromatic adaptation model.
According to the definition of \(D\), a one-step chromatic adaptation transform (CAT) such as CAT02 can only transform colours from an incomplete adapted field into a complete adapted field. When CAT02 is used to transform from incomplete to incomplete adaptation, \(D\) has no baseline level to refer to. Smet et al. (2017) proposed a two-step CAT concept to replace existing one-step transforms such as CAT02, providing a clearer definition of \(D\). A two-step CAT involves a baseline illuminant (BI) representing the baseline state between the test and reference illuminants. In the first step, the test colour is transformed from the test illuminant to the baseline illuminant (\(BI\)), then subsequently transformed to the reference illuminant. Degrees of adaptation under other illuminants are calculated relative to the adaptation under the \(BI\). As \(D\) approaches zero, the observer’s adaptation point moves towards the \(BI\). Therefore, the chromaticity of the \(BI\) is an intrinsic property of the human visual system.
- Parameters:
XYZ_b (Domain100) – Sample colour \(XYZ_{\beta}\) tristimulus values under input illuminant \(\beta\).
XYZ_wb (Domain100) – Input illuminant \(\beta\) tristimulus values.
XYZ_wd (Domain100) – Output illuminant \(\delta\) tristimulus values.
D_b (ArrayLike) – Degree of adaptation \(D_{\beta}\) of input illuminant \(\beta\).
D_d (ArrayLike) – Degree of adaptation \(D_{\delta}\) of output illuminant \(\delta\).
XYZ_wo (ArrayLike | None) – Baseline illuminant (\(BI\)) \(o\) tristimulus values.
transform (Literal['CAT02', 'CAT16'] | str) – Chromatic adaptation transform matrix.
- Returns:
CIE XYZ tristimulus values of the stimulus corresponding colour.
- Return type:
Notes
Domain
Scale - Reference
Scale - 1
XYZ_b100
1
XYZ_wb100
1
XYZ_wd100
1
XYZ_wo100
1
Range
Scale - Reference
Scale - 1
XYZ_d100
1
References
[ZL18]
Examples
>>> XYZ_b = np.array([48.900, 43.620, 6.250]) >>> XYZ_wb = np.array([109.850, 100, 35.585]) >>> XYZ_wd = np.array([95.047, 100, 108.883]) >>> D_b = 0.9407 >>> D_d = 0.9800 >>> XYZ_wo = np.array([100, 100, 100]) >>> chromatic_adaptation_Zhai2018( ... XYZ_b, XYZ_wb, XYZ_wd, D_b, D_d, XYZ_wo ... ) array([39.1856164..., 42.1546179..., 19.2367203...]) >>> XYZ_d = np.array([39.18561644, 42.15461798, 19.23672036]) >>> chromatic_adaptation_Zhai2018( ... XYZ_d, XYZ_wd, XYZ_wb, D_d, D_b, XYZ_wo ... ) array([48.9 , 43.62, 6.25])