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...])
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...])
Bases: colour.adaptation.cmccat2000.CMCCAT2000_InductionFactors
CMCCAT2000 chromatic adaptation model induction factors.
Parameters: | F (numeric or array_like) – \(F\) surround condition. |
---|
Adapts given stimulus CIE XYZ tristimulus values from test viewing conditions to reference viewing conditions using CMCCAT2000 forward chromatic adaptation model.
Parameters: |
|
---|---|
Returns: | CIE XYZ_c tristimulus values of the stimulus corresponding colour. |
Return type: | ndarray |
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 stimulus corresponding colour CIE XYZ tristimulus values from reference viewing conditions to test viewing conditions using CMCCAT2000 reverse chromatic adaptation model.
Parameters: |
|
---|---|
Returns: | CIE XYZ_c tristimulus values of the adapted stimulus. |
Return type: | ndarray |
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 stimulus CIE XYZ tristimulus values using given viewing conditions.
This definition is a convenient wrapper around CMCCAT2000_forward() and CMCCAT2000_reverse().
Parameters: |
|
---|---|
Returns: | Adapted stimulus CIE XYZ tristimulus values. |
Return type: | ndarray |
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.06833960, 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 stimulus CIE XYZ_1 tristimulus values from test viewing conditions to reference viewing conditions using CIE 1994 chromatic adaptation model.
Parameters: |
|
---|---|
Returns: | Adapted CIE XYZ_2 tristimulus values of test stimulus. |
Return type: | ndarray |
Warning
The input domain of that definition is non standard!
Notes
Examples
>>> XYZ_1 = np.array([28.00, 21.26, 5.27])
>>> xy_o1 = np.array([0.4476, 0.4074])
>>> xy_o2 = np.array([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...])