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 colourspace to cone responses matrix.
FAIRCHILD1990_XYZ_TO_RGB_MATRIX : array_like, (3, 3)
Fairchild (1990) colour appearance model cone responses to CIE XYZ colourspace to matrix.
FAIRCHILD1990_RGB_TO_XYZ_MATRIX : array_like, (3, 3)
Adapts given CIE XYZ_1 colourspace stimulus from test viewing conditions to reference viewing conditions using Fairchild (1990) chromatic adaptation model.
Parameters: |
|
---|---|
Returns: | Adapted CIE XYZ_2 colourspace test stimulus. |
Return type: | ndarray, (3,) |
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 colourspace to cone responses.
Parameters: | XYZ (array_like, (3,)) – CIE XYZ colourspace matrix. |
---|---|
Returns: | Cone responses. |
Return type: | ndarray, (3,) |
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 colourspace.
Parameters: | RGB (array_like, (3,)) – Cone responses. |
---|---|
Returns: | CIE XYZ colourspace matrix. |
Return type: | ndarray, (3,) |
Examples
>>> RGB = np.array([22.1231935, 23.6054224, 22.9279534])
>>> 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, (3,) |
Examples
>>> LMS = np.array([20.0005206, 19.999783, 19.9988316])
>>> 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])