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
andreflectances
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.3976716...e-04], [ 4.10000000e+02, -8.7040243...e-04], [ 4.20000000e+02, 4.6893657...e-03], [ 4.30000000e+02, 7.7522012...e-03], [ 4.40000000e+02, 6.9238417...e-03], [ 4.50000000e+02, 5.3089422...e-03], [ 4.60000000e+02, 4.4780109...e-03], [ 4.70000000e+02, 4.6386816...e-03], [ 4.80000000e+02, 5.1897663...e-03], [ 4.90000000e+02, 4.3906620...e-03], [ 5.00000000e+02, 4.2189259...e-03], [ 5.10000000e+02, 5.4270976...e-03], [ 5.20000000e+02, 9.6722601...e-03], [ 5.30000000e+02, 1.4272520...e-02], [ 5.40000000e+02, 7.9609053...e-03], [ 5.50000000e+02, 4.5917460...e-03], [ 5.60000000e+02, 5.2723695...e-03], [ 5.70000000e+02, 1.0479224...e-02], [ 5.80000000e+02, 5.3101298...e-02], [ 5.90000000e+02, 9.8185490...e-02], [ 6.00000000e+02, 9.9775094...e-02], [ 6.10000000e+02, 8.3935824...e-02], [ 6.20000000e+02, 6.9216733...e-02], [ 6.30000000e+02, 5.6902763...e-02], [ 6.40000000e+02, 4.2810635...e-02], [ 6.50000000e+02, 3.0064003...e-02], [ 6.60000000e+02, 2.3093789...e-02], [ 6.70000000e+02, 1.3756855...e-02], [ 6.80000000e+02, 4.1785101...e-03], [ 6.90000000e+02, -3.8014848...e-04], [ 7.00000000e+02, -5.7544253...e-04]], SpragueInterpolator, {}, Extrapolator, {'method': 'Constant', 'left': None, 'right': None})