colour.recovery.RGB_to_sd_Smits1999¶
- colour.recovery.RGB_to_sd_Smits1999(RGB)[source]¶
Recovers the spectral distribution of given RGB colourspace array using Smits (1999) method.
- Parameters
RGB (array_like, (3,)) – RGB colourspace array to recover the spectral distribution from.
- Returns
Recovered spectral distribution.
- Return type
Notes
Domain
Scale - Reference
Scale - 1
RGB
[0, 1]
[0, 1]
References
[]
Examples
>>> from colour.colorimetry import ( ... MSDS_CMFS_STANDARD_OBSERVER, SDS_ILLUMINANTS, ... SpectralShape, sd_to_XYZ_integration ... ) >>> from colour.utilities import numpy_print_options >>> XYZ = np.array([0.20654008, 0.12197225, 0.05136952]) >>> RGB = XYZ_to_RGB_Smits1999(XYZ) >>> cmfs = ( ... MSDS_CMFS_STANDARD_OBSERVER['CIE 1931 2 Degree Standard Observer']. ... copy().align(SpectralShape(360, 780, 10)) ... ) >>> illuminant = SDS_ILLUMINANTS['E'].copy().align(cmfs.shape) >>> sd = RGB_to_sd_Smits1999(RGB) >>> with numpy_print_options(suppress=True): ... sd SpectralDistribution([[ 380. , 0.0787830...], [ 417.7778 , 0.0622018...], [ 455.5556 , 0.0446206...], [ 493.3333 , 0.0352220...], [ 531.1111 , 0.0324149...], [ 568.8889 , 0.0330105...], [ 606.6667 , 0.3207115...], [ 644.4444 , 0.3836164...], [ 682.2222 , 0.3836164...], [ 720. , 0.3835649...]], interpolator=LinearInterpolator, interpolator_kwargs={}, extrapolator=Extrapolator, extrapolator_kwargs={...}) >>> sd_to_XYZ_integration(sd, cmfs, illuminant) / 100 array([ 0.1894770..., 0.1126470..., 0.0474420...])