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,
illuminantandreflectanceswill be aligned to it if passed, otherwise,illuminantshape is used.
- Returns:
Recovered camera RGB sensitivities.
- Return type:
colour.RGB_CameraSensitivities
Notes
Domain
Scale - Reference
Scale - 1
RGB1
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.2066502...e-06], [ 4.10000000e+02, -8.9698693...e-06], [ 4.20000000e+02, 4.6871961...e-05], [ 4.30000000e+02, 7.7694971...e-05], [ 4.40000000e+02, 6.9335511...e-05], [ 4.50000000e+02, 5.3134947...e-05], [ 4.60000000e+02, 4.4819958...e-05], [ 4.70000000e+02, 4.6393791...e-05], [ 4.80000000e+02, 5.1866668...e-05], [ 4.90000000e+02, 4.3828317...e-05], [ 5.00000000e+02, 4.2001231...e-05], [ 5.10000000e+02, 5.4065544...e-05], [ 5.20000000e+02, 9.6445141...e-05], [ 5.30000000e+02, 1.4277112...e-04], [ 5.40000000e+02, 7.9950718...e-05], [ 5.50000000e+02, 4.6429813...e-05], [ 5.60000000e+02, 5.3423840...e-05], [ 5.70000000e+02, 1.0519383...e-04], [ 5.80000000e+02, 5.2889443...e-04], [ 5.90000000e+02, 9.7851167...e-04], [ 6.00000000e+02, 9.9600382...e-04], [ 6.10000000e+02, 8.3840892...e-04], [ 6.20000000e+02, 6.9180858...e-04], [ 6.30000000e+02, 5.6967854...e-04], [ 6.40000000e+02, 4.2930308...e-04], [ 6.50000000e+02, 3.0241267...e-04], [ 6.60000000e+02, 2.3230047...e-04], [ 6.70000000e+02, 1.3721943...e-04], [ 6.80000000e+02, 4.0944885...e-05], [ 6.90000000e+02, -4.4223475...e-06], [ 7.00000000e+02, -6.1427769...e-06]], SpragueInterpolator, {}, Extrapolator, {'method': 'Constant', 'left': None, 'right': None})