colour.recovery.PCA_Jiang2013#

colour.recovery.PCA_Jiang2013(msds_camera_sensitivities: Mapping[str, MultiSpectralDistributions], eigen_w_v_count: int | None = None, additional_data: bool = False) Tuple[Tuple[NDArrayFloat, NDArrayFloat, NDArrayFloat], Tuple[NDArrayFloat, NDArrayFloat, NDArrayFloat]] | Tuple[NDArrayFloat, NDArrayFloat, NDArrayFloat][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 (int | None) – 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 \(v\) or tuple of camera RGB sensitivities eigen-vectors \(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)