colour.recovery.PCA_Jiang2013#

colour.recovery.PCA_Jiang2013(msds_camera_sensitivities: Mapping[str, MultiSpectralDistributions], eigen_w_v_count: Optional[int] = None, additional_data: bool = False) Union[Tuple[Tuple[ndarray, ndarray, ndarray], Tuple[ndarray, ndarray, ndarray]], Tuple[ndarray, ndarray, ndarray]][source]#

Perform the Principal Component Analysis (PCA) on given camera RGB sensitivities.

Parameters:
  • msds_camera_sensitivities (Mapping[str, MultiSpectralDistributions]) – Camera RGB sensitivities.

  • eigen_w_v_count (Optional[int]) – Eigen-values \(w\) and eigen-vectors \(v\) count.

  • additional_data (bool) – Whether to return both the eigen-values \(w\) and eigen-vectors \(v\).

Returns:

Tuple of camera RGB sensitivities eigen-values \(w\) and eigen-vectors :math:`v or tuple of camera RGB sensitivities eigen-vectors :math:`v.

Return type:

tuple

Examples

>>> from colour.colorimetry import SpectralShape
>>> from colour.characterisation import MSDS_CAMERA_SENSITIVITIES
>>> shape = SpectralShape(400, 700, 10)
>>> camera_sensitivities = {
...     camera: msds.copy().align(shape)
...     for camera, msds in MSDS_CAMERA_SENSITIVITIES.items()
... }
>>> np.array(PCA_Jiang2013(camera_sensitivities)).shape
(3, 31, 31)