Returns the chromatic adaptation matrix from test viewing conditions CIE XYZ_w colourspace matrix to reference viewing conditions CIE XYZ_wr colourspace matrix.
Parameters: |
|
---|---|
Returns: | Chromatic adaptation matrix. |
Return type: | ndarray, (3, 3) |
Raises: | KeyError – If chromatic adaptation method is not defined. |
Examples
>>> XYZ_w = np.array([1.09846607, 1., 0.3558228])
>>> XYZ_wr = np.array([0.95042855, 1., 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., 0.3558228])
>>> XYZ_wr = np.array([0.95042855, 1., 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 CIE XYZ colourspace stimulus from test viewing conditions CIE XYZ_w colourspace matrix to reference viewing conditions CIE XYZ_wr colourspace matrix. [6]_
Parameters: |
|
---|---|
Returns: | CIE XYZ_c colourspace matrix of the stimulus corresponding colour. |
Return type: | ndarray, (3,) |
Examples
>>> XYZ = np.array([0.07049534, 0.1008, 0.09558313])
>>> XYZ_w = np.array([1.09846607, 1., 0.3558228])
>>> XYZ_wr = np.array([0.95042855, 1., 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.1008, 0.09558313])
>>> XYZ_w = np.array([1.09846607, 1., 0.3558228])
>>> XYZ_wr = np.array([0.95042855, 1., 1.08890037])
>>> method = 'Bradford'
>>> chromatic_adaptation_VonKries(XYZ, XYZ_w, XYZ_wr, method)
array([ 0.0854032..., 0.1140122..., 0.2972149...])
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...])
Bases: colour.adaptation.cmccat2000.CMCCAT2000_InductionFactors
CMCCAT2000 chromatic adaptation model induction factors.
Parameters: | F (numeric) – \(F\) surround condition. |
---|
Adapts given CIE XYZ colourspace stimulus from test viewing conditions CIE XYZ_w colourspace matrix to reference viewing conditions CIE XYZ_wr colourspace matrix using CMCCAT2000 forward chromatic adaptation model.
Parameters: |
|
---|---|
Returns: | CIE XYZ_c colourspace matrix of the stimulus corresponding colour. |
Return type: | ndarray, (3,) |
Warning
The input and output domains of that definition are non standard!
Notes
Examples
>>> XYZ = np.array([22.48, 22.74, 8.54])
>>> XYZ_w = np.array([111.15, 100.00, 35.20])
>>> XYZ_wr = np.array([94.81, 100.00, 107.30])
>>> L_A1 = 200
>>> L_A2 = 200
>>> CMCCAT2000_forward(XYZ, XYZ_w, XYZ_wr, L_A1, L_A2)
array([ 19.5269832..., 23.0683396..., 24.9717522...])
Adapts given CIE XYZ colourspace matrix of the stimulus corresponding colour from reference viewing conditions CIE XYZ_wr colourspace matrix to test viewing conditions CIE XYZ_w colourspace matrix using CMCCAT2000 reverse chromatic adaptation model.
Parameters: |
|
---|---|
Returns: | CIE XYZ_c stimulus colourspace matrix. |
Return type: | ndarray, (3,) |
Warning
The input and output domains of that definition are non standard!
Notes
Examples
>>> XYZ_c = np.array([19.53, 23.07, 24.97])
>>> XYZ_w = np.array([111.15, 100.00, 35.20])
>>> XYZ_wr = np.array([94.81, 100.00, 107.30])
>>> L_A1 = 200
>>> L_A2 = 200
>>> CMCCAT2000_reverse(XYZ_c, XYZ_w, XYZ_wr, L_A1, L_A2)
array([ 22.4839876..., 22.7419485..., 8.5393392...])
Adapts given CIE XYZ colourspace matrix using given viewing conditions.
This definition is a convenient wrapper around CMCCAT2000_forward() and CMCCAT2000_reverse().
Parameters: |
|
---|---|
Returns: | Adapted CIE XYZ colourspace matrix. |
Return type: | ndarray, (3,) |
Warning
The input and output domains of that definition are non standard!
Notes
Examples
>>> XYZ = np.array([22.48, 22.74, 8.54])
>>> XYZ_w = np.array([111.15, 100.00, 35.20])
>>> XYZ_wr = np.array([94.81, 100.00, 107.30])
>>> L_A1 = 200
>>> L_A2 = 200
>>> chromatic_adaptation_CMCCAT2000(XYZ, XYZ_w, XYZ_wr, L_A1, L_A2, method='Forward')
array([ 19.5269832..., 23.0683396..., 24.9717522...])
Using the CMCCAT2000 reverse model:
>>> XYZ = np.array([19.52698326, 23.0683396, 24.97175229])
>>> XYZ_w = np.array([111.15, 100.00, 35.20])
>>> XYZ_wr = np.array([94.81, 100.00, 107.30])
>>> L_A1 = 200
>>> L_A2 = 200
>>> chromatic_adaptation_CMCCAT2000(XYZ, XYZ_w, XYZ_wr, L_A1, L_A2, method='Reverse')
array([ 22.48, 22.74, 8.54])
Adapts given CIE XYZ_1 colourspace stimulus from test viewing conditions to reference viewing conditions using CIE 1994 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([28.0, 21.26, 5.27])
>>> xy_o1 = (0.4476, 0.4074)
>>> xy_o2 = (0.3127, 0.3290)
>>> Y_o = 20
>>> E_o1 = 1000
>>> E_o2 = 1000
>>> chromatic_adaptation_CIE1994(XYZ_1, xy_o1, xy_o2, Y_o, E_o1, E_o2)
array([ 24.0337952..., 21.1562121..., 17.6430119...])