Defines Von Kries chromatic adaptation model objects:
References
[1] | Fairchild, M. D. (2013). Chromatic Adaptation Models. In Color Appearance Models (3rd ed., pp. 4179–4252). Wiley. ASIN:B00DAYO8E2 |
Computes the chromatic adaptation matrix from test viewing conditions to reference viewing conditions.
Parameters: |
|
---|---|
Returns: | Chromatic adaptation matrix. |
Return type: | ndarray |
Raises: | KeyError – If chromatic adaptation method is not defined. |
Examples
>>> XYZ_w = np.array([1.09846607, 1.00000000, 0.35582280])
>>> XYZ_wr = np.array([0.95042855, 1.00000000, 1.08890037])
>>> chromatic_adaptation_matrix_VonKries(XYZ_w, XYZ_wr)
array([[ 0.8687653..., -0.1416539..., 0.3871961...],
[-0.1030072..., 1.0584014..., 0.1538646...],
[ 0.0078167..., 0.0267875..., 2.9608177...]])
Using Bradford method:
>>> XYZ_w = np.array([1.09846607, 1.00000000, 0.35582280])
>>> XYZ_wr = np.array([0.95042855, 1.00000000, 1.08890037])
>>> method = 'Bradford'
>>> chromatic_adaptation_matrix_VonKries(XYZ_w, XYZ_wr, method)
array([[ 0.8446794..., -0.1179355..., 0.3948940...],
[-0.1366408..., 1.1041236..., 0.1291981...],
[ 0.0798671..., -0.1349315..., 3.1928829...]])
Adapts given stimulus from test viewing conditions to reference viewing conditions.
Parameters: |
|
---|---|
Returns: | CIE XYZ_c tristimulus values of the stimulus corresponding colour. |
Return type: | ndarray |
Examples
>>> XYZ = np.array([0.07049534, 0.10080000, 0.09558313])
>>> XYZ_w = np.array([1.09846607, 1.00000000, 0.35582280])
>>> XYZ_wr = np.array([0.95042855, 1.00000000, 1.08890037])
>>> chromatic_adaptation_VonKries(XYZ, XYZ_w, XYZ_wr)
array([ 0.0839746..., 0.1141321..., 0.2862554...])
Using Bradford method:
>>> XYZ = np.array([0.07049534, 0.10080000, 0.09558313])
>>> XYZ_w = np.array([1.09846607, 1.00000000, 0.35582280])
>>> XYZ_wr = np.array([0.95042855, 1.00000000, 1.08890037])
>>> method = 'Bradford'
>>> chromatic_adaptation_VonKries(XYZ, XYZ_w, XYZ_wr, method)
array([ 0.0854032..., 0.1140122..., 0.2972149...])