colour.recovery.RGB_to_msds_camera_sensitivities_Jiang2013#

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

Recover the camera RGB sensitivities 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.

  • basis_functions – Basis functions for the method. The default is to use the built-in sRGB basis functions, i.e., colour.recovery.BASIS_FUNCTIONS_DYER2017.

  • shape (SpectralShape | None) – Spectral shape of the recovered camera RGB sensitivities, 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)
>>> RGB = msds_to_XYZ(
...     reflectances,
...     method="Integration",
...     cmfs=sensitivities,
...     illuminant=illuminant,
...     k=1,
...     shape=SPECTRAL_SHAPE_BASIS_FUNCTIONS_DYER2017,
... )
>>> RGB_to_msds_camera_sensitivities_Jiang2013(
...     RGB,
...     illuminant,
...     reflectances,
...     BASIS_FUNCTIONS_DYER2017,
...     SPECTRAL_SHAPE_BASIS_FUNCTIONS_DYER2017,
... ).values  
array([[  7.0437846...e-03,   9.2126044...e-03,  -7.6408087...e-03],
       [ -8.7671560...e-03,   1.1272669...e-02,   6.3743419...e-03],
       [  4.5812685...e-02,   7.1800041...e-02,   4.0000169...e-01],
       [  7.5939115...e-02,   1.1562093...e-01,   7.1152155...e-01],
       [  6.7768573...e-02,   1.5340644...e-01,   8.5266831...e-01],
       [  5.1934131...e-02,   1.8857547...e-01,   9.3895784...e-01],
       [  4.3807056...e-02,   2.6108660...e-01,   9.7213072...e-01],
       [  4.5345321...e-02,   3.7544039...e-01,   9.6145068...e-01],
       [  5.0694514...e-02,   4.4765815...e-01,   8.8648114...e-01],
       [  4.2837825...e-02,   4.5071344...e-01,   7.5177077...e-01],
       [  4.1052030...e-02,   6.1657728...e-01,   5.5273073...e-01],
       [  5.2843697...e-02,   7.8019954...e-01,   3.8226917...e-01],
       [  9.4265543...e-02,   9.1767425...e-01,   2.4035461...e-01],
       [  1.3954459...e-01,   1.0000000...e+00,   1.5537481...e-01],
       [  7.8143883...e-02,   9.2772027...e-01,   1.0440935...e-01],
       [  4.5380529...e-02,   8.5670156...e-01,   6.5122285...e-02],
       [  5.2216496...e-02,   7.5232292...e-01,   3.4295447...e-02],
       [  1.0281652...e-01,   6.2580973...e-01,   2.0949510...e-02],
       [  5.1694176...e-01,   4.9274616...e-01,   1.4852461...e-02],
       [  9.5639793...e-01,   3.4336481...e-01,   1.0898318...e-02],
       [  9.7349477...e-01,   2.0858770...e-01,   7.0049439...e-03],
       [  8.1946141...e-01,   1.1178483...e-01,   4.4718000...e-03],
       [  6.7617415...e-01,   6.5907196...e-02,   4.1013538...e-03],
       [  5.5680417...e-01,   4.4626835...e-02,   4.1852898...e-03],
       [  4.1960111...e-01,   3.3367103...e-02,   4.4916588...e-03],
       [  2.9557834...e-01,   2.3948776...e-02,   4.4593273...e-03],
       [  2.2705062...e-01,   1.8778777...e-02,   4.3169731...e-03],
       [  1.3411835...e-01,   1.0695498...e-02,   3.4119265...e-03],
       [  4.0019556...e-02,   5.5551238...e-03,   1.3679492...e-03],
       [ -4.3224053...e-03,   2.4973119...e-03,   3.8030327...e-04],
       [ -6.0039541...e-03,   1.5467822...e-03,   5.4039435...e-04]])