colour.recovery.RGB_to_msds_Smits1999#
- colour.recovery.RGB_to_msds_Smits1999(RGB: ArrayLike, basis: MultiSpectralDistributions | None = None) NDArrayFloat[source]#
Recover spectral values from RGB colourspace array using the Smits (1999) decomposition algorithm.
This is a vectorised implementation supporting multi-dimensional arrays.
- Parameters:
RGB (ArrayLike) – RGB colourspace array to recover spectral values from. The last dimension must be size 3.
basis (MultiSpectralDistributions | None) – Multi-spectral distributions basis with signals: white, cyan, magenta, yellow, red, green, blue. Defaults to
MSDS_SMITS1999.
- Returns:
Recovered spectral values with shape
(*RGB.shape[:-1], wavelengths).- Return type:
Notes
Domain
Scale - Reference
Scale - 1
RGB1
1
References
[Smi99]
Examples
>>> import numpy as np >>> RGB = np.array( ... [ ... [0.45623196, 0.03080455, 0.04093343], ... [0.05438271, 0.29877169, 0.07188444], ... [0.01863137, 0.05139773, 0.28887675], ... ] ... ) >>> RGB_to_msds_Smits1999(RGB).shape (3, 10) >>> float(RGB_to_msds_Smits1999(RGB)[0, 0]) 0.0829...