computeSSI {colorSpec} | R Documentation |
Compute the Spectrum Similarity Index of light spectra
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
## S3 method for class 'colorSpec'
computeSSI( x, reference=NULL, digits=0, isotherms='mccamy', locus='robertson' )
Arguments
x |
a colorSpec object with |
reference |
a colorSpec object with |
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 |
isotherms |
this is only used when |
locus |
this is only used when |
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
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