computeCRI: Compute Color Rendering Index (CRI) of Light Spectra

Description Usage Arguments Details Value Source References See Also Examples

View source: R/colorSpec.CRI.R


Compute the CIE 1974 color rendering index (CRI) of a light spectrum, called the the test illuminant.
From the given spectrum a reference illuminant is selected with the same CCT (Correlated Color Temperature). A selected set of 8 color samples is rendered in XYZ (1931) with both illuminants and 8 color differences are computed in a special CIEUVW color space. For each color difference a CRI is computed, where 100 is a perfect color match. The final CRI is the average of these 8 CRI values.


## S3 method for class 'colorSpec'
computeCRI( x, adapt=TRUE, attach=FALSE, tol=5.4e-3 )



an colorSpec R object with type equal to 'light', and exactly 1 spectrum


if TRUE, then a special chromatic adaption is performed, see Details


if TRUE, then a large list of intermediate calculations is attached to the returned number, as attribute data. This attached list includes data for all special 14 color samples, although the last 6 do not affect the returned CRI.


for the CRI to be meaningful the chromaticities of the test and reference illuminants must be sufficiently close in the CIE 1960 uniform chromaticity space. If the tolerance is exceeded, the function returns NA. The default tol=5.4e-3 is the one recommended by the CIE, but the argument allows the user to override it.


The CCT of x is computed by computeCCT() with method='lm'; the package minpack.lm is required.
If adapt is TRUE the 8 test uv points are chromatically adapted from the test illuminant to the reference illuminant using a special von Kries type transformation; see Oleari and Wikipedia. The test UVW values are computed relative to the reference illuminant.
If adapt is FALSE the 8 test uv points are not chromatically adapted, and the test UVW values are computed relative to the test illuminant.


computeCRI() returns a single number 100. In case of ERROR it returns NA. If attach is TRUE a large list of intermediate calculations is attached to the returned number.


The test color reflectance spectra are taken from:


Oleari, Claudio, Gabriele Simone. Standard Colorimetry: Definitions, Algorithms and Software. John Wiley. 2016. pp. 465-470.

Günther Wyszecki and W. S. Stiles. Color Science: Concepts and Methods, Quantitative Data and Formulae, Second Edition. John Wiley & Sons, 1982. Table 1(3.11). p. 828.

Wikipedia. Color rendering index.

Hunt, R. W. G. and M. R. Pointer. Measuring Colour. 4th edition. John Wiley & Sons. 2011. Appendix 7.

See Also

type, xyz1931, computeCCT


computeCRI( subset(Fs.5nm,'F2') )       # returns 64.15751
computeCRI( subset(Fs.5nm,'F4') )       # returns 51.36485

colorSpec documentation built on April 2, 2018, 5:05 p.m.