colour.recovery.smits1999 Module¶
Smits (1999) - Reflectance Recovery¶
Defines objects for reflectance recovery using Smits (1999) method.
References
[1] | Smits, B. (1999). An RGB-to-Spectrum Conversion for Reflectances. Journal of Graphics Tools, 4(4), 11–22. doi:10.1080/10867651.1999.10487511 |
-
colour.recovery.smits1999.
SMITS1999_PRIMARIES
= array([[ 0.64, 0.33], [ 0.3 , 0.6 ], [ 0.15, 0.06]])¶ Current Smits (1999) method implementation colourspace primaries.
SMITS1999_PRIMARIES : ndarray, (3, 2)
-
colour.recovery.smits1999.
SMITS1999_WHITEPOINT
= (0.3333333333333333, 0.3333333333333333)¶ Current Smits (1999) method implementation colourspace whitepoint.
SMITS1999_WHITEPOINT : tuple
-
colour.recovery.smits1999.
SMITS1999_XYZ_TO_RGB_MATRIX
= array([[ 2.68965517, -1.27586207, -0.4137931 ], [-1.02210817, 1.97828662, 0.04382156], [ 0.06122449, -0.2244898 , 1.16326531]])¶ Current Smits (1999) method implementation RGB colourspace to CIE XYZ tristimulus values matrix.
SMITS1999_XYZ_TO_RGB_MATRIX : array_like, (3, 3)
-
colour.recovery.smits1999.
XYZ_to_RGB_Smits1999
(XYZ, chromatic_adaptation_transform=u'Bradford')[source]¶ Convenient object to convert from CIE XYZ tristimulus values to RGB colourspace in conditions required by the current Smits (1999) method implementation.
Parameters: - XYZ (array_like) – CIE XYZ tristimulus values.
- chromatic_adaptation_transform (unicode, optional) – {‘CAT02’, ‘XYZ Scaling’, ‘Von Kries’, ‘Bradford’, ‘Sharp’, ‘Fairchild, ‘CMCCAT97’, ‘CMCCAT2000’, ‘CAT02_BRILL_CAT’, ‘Bianco’, ‘Bianco PC’}, Chromatic adaptation method.
Returns: RGB colour array.
Return type: ndarray
Notes
- Input CIE XYZ tristimulus values are in domain [0, 1].
Examples
>>> XYZ = np.array([0.07049534, 0.10080000, 0.09558313]) >>> XYZ_to_RGB_Smits1999(XYZ) array([ 0.0214496..., 0.1315460..., 0.0928760...])
-
colour.recovery.smits1999.
RGB_to_spectral_Smits1999
(RGB)[source]¶ Recovers the spectral power distribution of given RGB colourspace array using Smits (1999) method.
Parameters: RGB (array_like, (3,)) – RGB colourspace array. Returns: Recovered spectral power distribution. Return type: SpectralPowerDistribution Examples
>>> RGB = np.array([0.02144962, 0.13154603, 0.09287601]) >>> RGB_to_spectral_Smits1999(RGB) <...SpectralPowerDistribution object at 0x...>