colour.spectral_similarity_index#
- colour.spectral_similarity_index(sd_test: colour.colorimetry.spectrum.SpectralDistribution, sd_reference: colour.colorimetry.spectrum.SpectralDistribution, round_result: bool = True) NDArrayFloat [source]#
Return the Academy Spectral Similarity Index (SSI) of given test spectral distribution with given reference spectral distribution.
- Parameters
sd_test (colour.colorimetry.spectrum.SpectralDistribution) – Test spectral distribution.
sd_reference (colour.colorimetry.spectrum.SpectralDistribution) – Reference spectral distribution.
round_result (bool) – Whether to round the result/output. This is particularly useful when using SSI in an optimisation routine. Default is True.
- Returns
Academy Spectral Similarity Index (SSI).
- Return type
References
Examples
>>> from colour import SDS_ILLUMINANTS >>> sd_test = SDS_ILLUMINANTS["C"] >>> sd_reference = SDS_ILLUMINANTS["D65"] >>> spectral_similarity_index(sd_test, sd_reference) 94.0