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: Optional[SpectralShape] = 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 (Optional[SpectralShape]) – 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.2281577...e-03,   9.2250648...e-03,  -9.8836897...e-03],
       [ -8.5045760...e-03,   1.1277748...e-02,   3.8624865...e-03],
       [  4.5819113...e-02,   7.1552094...e-02,   4.0406829...e-01],
       [  7.5745635...e-02,   1.1530030...e-01,   7.1177452...e-01],
       [  6.7651854...e-02,   1.5311354...e-01,   8.5161378...e-01],
       [  5.1872905...e-02,   1.8828774...e-01,   9.3658053...e-01],
       [  4.3753995...e-02,   2.6093723...e-01,   9.7049828...e-01],
       [  4.5323885...e-02,   3.7531459...e-01,   9.5883525...e-01],
       [  5.0708454...e-02,   4.4750685...e-01,   8.8451412...e-01],
       [  4.2900523...e-02,   4.5047800...e-01,   7.5069924...e-01],
       [  4.1222513...e-02,   6.1672868...e-01,   5.5327277...e-01],
       [  5.3027385...e-02,   7.8015416...e-01,   3.8368507...e-01],
       [  9.4506252...e-02,   9.1751657...e-01,   2.4143664...e-01],
       [  1.3945472...e-01,   1.0000000...e+00,   1.5616071...e-01],
       [  7.7784852...e-02,   9.2719372...e-01,   1.0462050...e-01],
       [  4.4865285...e-02,   8.5627976...e-01,   6.5035086...e-02],
       [  5.1515558...e-02,   7.5193757...e-01,   3.3979292...e-02],
       [  1.0239098...e-01,   6.2562412...e-01,   2.0583993...e-02],
       [  5.1884509...e-01,   4.9264953...e-01,   1.4571020...e-02],
       [  9.5935619...e-01,   3.4322427...e-01,   1.0656116...e-02],
       [  9.7488799...e-01,   2.0857245...e-01,   6.8892462...e-03],
       [  8.2012477...e-01,   1.1178699...e-01,   4.3808407...e-03],
       [  6.7630666...e-01,   6.5977834...e-02,   4.0420907...e-03],
       [  5.5598866...e-01,   4.4719007...e-02,   4.2502316...e-03],
       [  4.1829651...e-01,   3.3471790...e-02,   4.6139542...e-03],
       [  2.9375101...e-01,   2.4044889...e-02,   4.7376860...e-03],
       [  2.2564606...e-01,   1.8870707...e-02,   4.6336440...e-03],
       [  1.3441624...e-01,   1.0702974...e-02,   3.4919622...e-03],
       [  4.0827617...e-02,   5.5529047...e-03,   1.3990786...e-03],
       [ -3.7143757...e-03,   2.5093564...e-03,   3.9765262...e-04],
       [ -5.6225656...e-03,   1.5643397...e-03,   5.8472693...e-04]])