Defines Fairchild (1990) chromatic adaptation model objects:
References
[1] | Fairchild, M. D. (1991). Formulation and testing of an incomplete-chromatic-adaptation model. Color Research & Application, 16(4), 243–250. doi:10.1002/col.5080160406 |
[2] | Fairchild, M. D. (2013). FAIRCHILD’S 1990 MODEL. In Color Appearance Models (3rd ed., pp. 4418–4495). Wiley. ASIN:B00DAYO8E2 |
Fairchild (1990) colour appearance model CIE XYZ tristimulus values to cone responses matrix.
FAIRCHILD1990_XYZ_TO_RGB_MATRIX : array_like, (3, 3)
Fairchild (1990) colour appearance model cone responses to CIE XYZ tristimulus values matrix.
FAIRCHILD1990_RGB_TO_XYZ_MATRIX : array_like, (3, 3)
Adapts given stimulus CIE XYZ_1 tristimulus values from test viewing conditions to reference viewing conditions using Fairchild (1990) chromatic adaptation model.
Parameters: |
|
---|---|
Returns: | Adapted CIE XYZ_2 tristimulus values of stimulus. |
Return type: | ndarray |
Warning
The input domain of that definition is non standard!
Notes
Examples
>>> XYZ_1 = np.array([19.53, 23.07, 24.97])
>>> XYZ_n = np.array([111.15, 100.00, 35.20])
>>> XYZ_r = np.array([94.81, 100.00, 107.30])
>>> Y_n = 200
>>> chromatic_adaptation_Fairchild1990(
... XYZ_1, XYZ_n, XYZ_r, Y_n)
array([ 23.3252634..., 23.3245581..., 76.1159375...])
Converts from CIE XYZ tristimulus values to cone responses.
Parameters: | XYZ (array_like) – CIE XYZ tristimulus values. |
---|---|
Returns: | Cone responses. |
Return type: | ndarray |
Examples
>>> XYZ = np.array([19.53, 23.07, 24.97])
>>> XYZ_to_RGB_fairchild1990(XYZ)
array([ 22.1231935..., 23.6054224..., 22.9279534...])
Converts from cone responses to CIE XYZ tristimulus values.
Parameters: | RGB (array_like) – Cone responses. |
---|---|
Returns: | CIE XYZ tristimulus values. |
Return type: | ndarray |
Examples
>>> RGB = np.array([22.12319350, 23.60542240, 22.92795340])
>>> RGB_to_XYZ_fairchild1990(RGB)
array([ 19.53, 23.07, 24.97])
Computes the degrees of adaptation \(p_L\), \(p_M\) and \(p_S\).
Parameters: |
|
---|---|
Returns: | Degrees of adaptation \(p_L\), \(p_M\) and \(p_S\). |
Return type: | ndarray |
Examples
>>> LMS = np.array([20.00052060, 19.99978300, 19.99883160])
>>> Y_n = 31.83
>>> degrees_of_adaptation(LMS, Y_n)
array([ 0.9799324..., 0.9960035..., 1.0233041...])
>>> degrees_of_adaptation(LMS, Y_n, 1 / 3, True)
array([ 1., 1., 1.])