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

Description

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.

Usage

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

Arguments

x

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

adapt

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

attach

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.

tol

for the CRI to be meaningful the chromaticities of the test and reference illuminants must be sufficiently close in the CIE 1960 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.

Details

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.

Value

computeCCT returns a single number <= 100. In case of ERROR it returns NA. If attach is TRUE a large list is attached to the returned number.

Source

The test color reflectance spectra are taken from:
http://www.lrc.rpi.edu/programs/nlpip/lightinganswers/lightsources/scripts/NLPIP_LightSourceColor_Script.m

References

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. http://en.wikipedia.org/wiki/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

Examples

1
2
computeCRI( subset(Fs.5nm,'F2') )       # returns 64.152
computeCRI( subset(Fs.5nm,'F4') )       # returns 51.352

colorSpec documentation built on Dec. 4, 2017, 9:03 a.m.