computeSSI: Compute the Spectrum Similarity Index of light spectra

Description Usage Arguments Details Value References See Also Examples

Description

Compute the Spectrum Similarity Index (SSI), an index between 0 and 100, of a colorSpec object with type equal to 'light'. It compares a test spectrum with a reference spectrum (an ideal). The value 100 means a perfect match to the reference, and a smaller value mean a poorer match (similar to CRI). Only values in the interval [375,675] nm are used; for details see Holm.

Usage

1
2
## S3 method for class 'colorSpec'
computeSSI( x, reference=NULL, digits=0, isotherms='mccamy', locus='robertson' )

Arguments

x

a colorSpec object with type equal to 'light', and M test spectra

reference

a colorSpec object with type equal to 'light', and either 1 or M reference spectra. reference can also be NULL (the default), which means to generate each reference spectrum from the corresponding test spectrum.

digits

the number of digits after the decimal point in the returned vector. According to Holm the output should be rounded to the nearest integer, which corresponds to digits=0. To return full precision, set digits=Inf.

isotherms

this is only used when reference=NULL. It is passed to computeCCT() in order to compute the CCT of each test spectrum.

locus

this is only used when reference=NULL. It is passed to computeCCT() in order to compute the CCT of each test spectrum.

Details

If reference contains a single spectrum, then each test spectrum is compared to that one reference spectrum. If reference contains M spectra, then the i'th test spectrum is compared to the i'th reference spectrum.

If reference=NULL then for each test spectrum the CCT is computed and used to compute a reference spectrum with the same CCT. It is either a Planckian (black-body) or daylight illuminant, see Holm for details. The test spectrum and auto-computed reference spectrum are then compared.

Value

computeSSI() returns a numeric vector of length M, where M is the number of spectra in x. The vector's names is set from specnames(x) and a compact code for the corresponding reference spectrum.

If the type of x is not 'light', or reference is not valid, then the function returns NULL.

References

J. Holm and T. Maier and P. Debevec and C. LeGendre and J. Pines and J. Erland and G. Joblove and S. Dyer and B. Sloan and J. di Gennaro and D. Sherlock. A Cinematographic Spectral Similarity Index. SMPTE 2016 Annual Technical Conference and Exhibition. pp. 1-36. (2016).

See Also

type(), computeCCT(), planckSpectra(), daylightSpectra(), specnames()

Examples

1
2
3
computeSSI( planckSpectra( 1000*(2:6) )  )
##  P2000_SSI[2027K] P3000_SSI[3057K] P4000_SSI[D4063] P5000_SSI[D5061] P6000_SSI[D6063] 
##                99               98               93               92               92 

Example output

This is colorSpec.  Version: 0.8-3.  Author: Glenn Davis [aut, cre].  Built: R 3.4.4; ; 2019-05-11 03:46:31 UTC; unix
P2000_SSI[P2027] P3000_SSI[P3057] P4000_SSI[D4063] P5000_SSI[D5061] 
              99               98               93               92 
P6000_SSI[D6063] 
              92 

colorSpec documentation built on June 24, 2019, 9:03 a.m.