colour.recovery.RGB_to_sd_camera_sensitivity_Jiang2013#

colour.recovery.RGB_to_sd_camera_sensitivity_Jiang2013(RGB: ArrayLike, illuminant: SpectralDistribution, reflectances: MultiSpectralDistributions, eigen_w: ArrayLike, shape: SpectralShape | None = None) SpectralDistribution[source]#

Recover a single camera RGB sensitivity for given camera RGB values using Jiang et al. (2013) method.

Parameters:
  • RGB (ArrayLike) – Camera RGB values corresponding with reflectances.

  • illuminant (SpectralDistribution) – Illuminant spectral distribution used to produce the camera RGB values.

  • reflectances (MultiSpectralDistributions) – Reflectance spectral distributions used to produce the camera RGB values.

  • eigen_w (ArrayLike) – Eigen-vectors \(v\) for the particular camera RGB sensitivity being recovered.

  • shape (SpectralShape | None) – Spectral shape of the recovered camera RGB sensitivity, illuminant and reflectances will be aligned to it if passed, otherwise, illuminant shape is used.

Returns:

Recovered camera RGB sensitivities.

Return type:

colour.RGB_CameraSensitivities

Examples

>>> from colour.colorimetry import (
...     SDS_ILLUMINANTS,
...     msds_to_XYZ,
...     sds_and_msds_to_msds,
... )
>>> from colour.characterisation import (
...     MSDS_CAMERA_SENSITIVITIES,
...     SDS_COLOURCHECKERS,
... )
>>> from colour.recovery import SPECTRAL_SHAPE_BASIS_FUNCTIONS_DYER2017
>>> illuminant = SDS_ILLUMINANTS["D65"]
>>> sensitivities = MSDS_CAMERA_SENSITIVITIES["Nikon 5100 (NPL)"]
>>> reflectances = [
...     sd.copy().align(SPECTRAL_SHAPE_BASIS_FUNCTIONS_DYER2017)
...     for sd in SDS_COLOURCHECKERS["BabelColor Average"].values()
... ]
>>> reflectances = sds_and_msds_to_msds(reflectances)
>>> R, G, B = tsplit(
...     msds_to_XYZ(
...         reflectances,
...         method="Integration",
...         cmfs=sensitivities,
...         illuminant=illuminant,
...         k=1,
...         shape=SPECTRAL_SHAPE_BASIS_FUNCTIONS_DYER2017,
...     )
... )
>>> R_w, G_w, B_w = tsplit(np.moveaxis(BASIS_FUNCTIONS_DYER2017, 0, 1))
>>> RGB_to_sd_camera_sensitivity_Jiang2013(
...     R,
...     illuminant,
...     reflectances,
...     R_w,
...     SPECTRAL_SHAPE_BASIS_FUNCTIONS_DYER2017,
... )  
SpectralDistribution([[  4.00000000e+02,   7.2066502...e-04],
                      [  4.10000000e+02,  -8.9698693...e-04],
                      [  4.20000000e+02,   4.6871961...e-03],
                      [  4.30000000e+02,   7.7694971...e-03],
                      [  4.40000000e+02,   6.9335511...e-03],
                      [  4.50000000e+02,   5.3134947...e-03],
                      [  4.60000000e+02,   4.4819958...e-03],
                      [  4.70000000e+02,   4.6393791...e-03],
                      [  4.80000000e+02,   5.1866668...e-03],
                      [  4.90000000e+02,   4.3828317...e-03],
                      [  5.00000000e+02,   4.2001231...e-03],
                      [  5.10000000e+02,   5.4065544...e-03],
                      [  5.20000000e+02,   9.6445141...e-03],
                      [  5.30000000e+02,   1.4277112...e-02],
                      [  5.40000000e+02,   7.9950718...e-03],
                      [  5.50000000e+02,   4.6429813...e-03],
                      [  5.60000000e+02,   5.3423840...e-03],
                      [  5.70000000e+02,   1.0519383...e-02],
                      [  5.80000000e+02,   5.2889443...e-02],
                      [  5.90000000e+02,   9.7851167...e-02],
                      [  6.00000000e+02,   9.9600382...e-02],
                      [  6.10000000e+02,   8.3840892...e-02],
                      [  6.20000000e+02,   6.9180858...e-02],
                      [  6.30000000e+02,   5.6967854...e-02],
                      [  6.40000000e+02,   4.2930308...e-02],
                      [  6.50000000e+02,   3.0241267...e-02],
                      [  6.60000000e+02,   2.3230047...e-02],
                      [  6.70000000e+02,   1.3721943...e-02],
                      [  6.80000000e+02,   4.0944885...e-03],
                      [  6.90000000e+02,  -4.4223475...e-04],
                      [  7.00000000e+02,  -6.1427769...e-04]],
                     SpragueInterpolator,
                     {},
                     Extrapolator,
                     {'method': 'Constant', 'left': None, 'right': None})