colour.recovery.RGB_to_sd_camera_sensitivity_Jiang2013#

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

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

Parameters:
  • RGB (Domain1) – 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

Notes

Domain

Scale - Reference

Scale - 1

RGB

1

1

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,
...         )
...     )
...     / 100
... )
>>> 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.20665029e-06],
                      [ 4.10000000e+02, -8.96986938e-06],
                      [ 4.20000000e+02,  4.68719619e-05],
                      [ 4.30000000e+02,  7.76949719e-05],
                      [ 4.40000000e+02,  6.93355114e-05],
                      [ 4.50000000e+02,  5.31349471e-05],
                      [ 4.60000000e+02,  4.48199586e-05],
                      [ 4.70000000e+02,  4.63937913e-05],
                      [ 4.80000000e+02,  5.18666681e-05],
                      [ 4.90000000e+02,  4.38283172e-05],
                      [ 5.00000000e+02,  4.20012318e-05],
                      [ 5.10000000e+02,  5.40655441e-05],
                      [ 5.20000000e+02,  9.64451417e-05],
                      [ 5.30000000e+02,  1.42771129e-04],
                      [ 5.40000000e+02,  7.99507187e-05],
                      [ 5.50000000e+02,  4.64298137e-05],
                      [ 5.60000000e+02,  5.34238406e-05],
                      [ 5.70000000e+02,  1.05193839e-04],
                      [ 5.80000000e+02,  5.28894436e-04],
                      [ 5.90000000e+02,  9.78511673e-04],
                      [ 6.00000000e+02,  9.96003826e-04],
                      [ 6.10000000e+02,  8.38408920e-04],
                      [ 6.20000000e+02,  6.91808589e-04],
                      [ 6.30000000e+02,  5.69678548e-04],
                      [ 6.40000000e+02,  4.29303089e-04],
                      [ 6.50000000e+02,  3.02412675e-04],
                      [ 6.60000000e+02,  2.32300470e-04],
                      [ 6.70000000e+02,  1.37219431e-04],
                      [ 6.80000000e+02,  4.09448851e-05],
                      [ 6.90000000e+02, -4.42234757e-06],
                      [ 7.00000000e+02, -6.14277697e-06]],
                     SpragueInterpolator,
                     {},
                     Extrapolator,
                     {'method': 'Constant', 'left': None, 'right': None})