colour_hdri.matrix_camera_space_to_XYZ#
- colour_hdri.matrix_camera_space_to_XYZ(xy: ArrayLike, CCT_calibration_illuminant_1: float, CCT_calibration_illuminant_2: float, M_color_matrix_1: ArrayLike, M_color_matrix_2: ArrayLike, M_camera_calibration_1: ArrayLike, M_camera_calibration_2: ArrayLike, analog_balance: ArrayLike, M_forward_matrix_1: ArrayLike, M_forward_matrix_2: ArrayLike, chromatic_adaptation_transform: Literal['Bianco 2010', 'Bianco PC 2010', 'Bradford', 'CAT02 Brill 2008', 'CAT02', 'CAT16', 'CMCCAT2000', 'CMCCAT97', 'Fairchild', 'Sharp', 'Von Kries', 'XYZ Scaling'] | str = 'Bradford') NDArrayFloat [source]#
Return the Camera Space to CIE XYZ matrix for given xy white balance chromaticity coordinates.
- Parameters:
xy (ArrayLike) – xy white balance chromaticity coordinates.
CCT_calibration_illuminant_1 (float) – Correlated colour temperature of CalibrationIlluminant1.
CCT_calibration_illuminant_2 (float) – Correlated colour temperature of CalibrationIlluminant2.
M_color_matrix_1 (ArrayLike) – ColorMatrix1 tag matrix.
M_color_matrix_2 (ArrayLike) – ColorMatrix2 tag matrix.
M_camera_calibration_1 (ArrayLike) – CameraCalibration1 tag matrix.
M_camera_calibration_2 (ArrayLike) – CameraCalibration2 tag matrix.
analog_balance (ArrayLike) – AnalogBalance tag vector.
M_forward_matrix_1 (ArrayLike) – ForwardMatrix1 tag matrix.
M_forward_matrix_2 (ArrayLike) – ForwardMatrix2 tag matrix.
chromatic_adaptation_transform (Literal['Bianco 2010', 'Bianco PC 2010', 'Bradford', 'CAT02 Brill 2008', 'CAT02', 'CAT16', 'CMCCAT2000', 'CMCCAT97', 'Fairchild', 'Sharp', 'Von Kries', 'XYZ Scaling'] | str) – Chromatic adaptation transform.
- Returns:
Camera Space to CIE XYZ matrix.
- Return type:
Notes
The reference illuminant is D50 as defined per
colour_hdri.models.datasets.dng.CCS_ILLUMINANT_ADOBEDNG
attribute.
References
[AdobeSystems12b], [AdobeSystems12a], [AdobeSystems15a], [McG12]
Examples
>>> M_color_matrix_1 = np.array( ... [ ... [0.5309, -0.0229, -0.0336], ... [-0.6241, 1.3265, 0.3337], ... [-0.0817, 0.1215, 0.6664], ... ] ... ) >>> M_color_matrix_2 = np.array( ... [ ... [0.4716, 0.0603, -0.0830], ... [-0.7798, 1.5474, 0.2480], ... [-0.1496, 0.1937, 0.6651], ... ] ... ) >>> M_camera_calibration_1 = np.identity(3) >>> M_camera_calibration_2 = np.identity(3) >>> analog_balance = np.ones(3) >>> M_forward_matrix_1 = np.array( ... [ ... [0.8924, -0.1041, 0.1760], ... [0.4351, 0.6621, -0.0972], ... [0.0505, -0.1562, 0.9308], ... ] ... ) >>> M_forward_matrix_2 = np.array( ... [ ... [0.8924, -0.1041, 0.1760], ... [0.4351, 0.6621, -0.0972], ... [0.0505, -0.1562, 0.9308], ... ] ... ) >>> matrix_camera_space_to_XYZ( ... np.array([0.32816244, 0.34698169]), ... 2850, ... 6500, ... M_color_matrix_1, ... M_color_matrix_2, ... M_camera_calibration_1, ... M_camera_calibration_2, ... analog_balance, ... M_forward_matrix_1, ... M_forward_matrix_2, ... ) array([[ 2.1604087..., -0.1041... , 0.2722498...], [ 1.0533324..., 0.6621... , -0.1503561...], [ 0.1222553..., -0.1562... , 1.4398304...]])