Color Graphics in the Service of Light-Source Visualization and Design

In the world of lighting engineering, one of the most active areas of research and industrial application is in the definition of the color rendering properties of light sources. There is a current international standard, and several new methods have been proposed over the last decade. Ordinary consumers are frequently left with little or no knowledge of how to interpret the numerical data produced by any of these systems. This situation has been exacerbated with the advent of LED light sources with widely differing properties. Certain LEDs yield very different results depending on the particular metric in use. We have designed a color graphical system that allows a user to pick a set of (typically) 16 surface color samples, and to be given a realistic comparison of the colors when illuminated by two different light sources, shown on a side-by-side display on a color monitor. This provides a visual analogy to the computations built into the above-mentioned metrics, all of which are based on comparison techniques. This chapter will provide an insight into the design and operation of our lighting computer graphics visualization system. Men-tion will also be made of similar systems that may be found in the published literature.


Introduction
The purpose of the design is to display of a set of surface color patches as if they were illuminated by a specific light source, with the simultaneous display of two such sets to demonstrate the surface color differences arising from two different light sources. The approach was to implement a combination of computer graphics and image processing to generate displays providing the visualization of the color rendering properties of a range of different light sources, and to facilitate comparisons between light sources, both existing and conceptual.
Color rendering has been defined by the Commission Internationale de l'Eclairage: International Commission on Illumination (CIE) as the "effect of an illuminant on the perceived color of objects by conscious or subconscious comparison with their perceived color under a reference illuminant" [1]. The necessity for a means of defining the color rendering of light sources derives from the fact that human color vision possesses the property of metamerism. This can be defined as a perceived matching, for a given observer, of the colors of light sources having different (i.e. nonmatching) spectral power distributions [2]. In turn, an SPD (spectral power distribution) is the concentration, as a function of wavelength, of the radiant output in terms of radiant power or flux. For calculation purposes, the "given observer" is conventionally taken to be one of the standard observers as defined by the CIE [3].
In practice, what this means is that two light sources can look the same to a human observer while having different SPDs-which in turn will mean different color rendering properties. The color of the source itself is most often defined by the color temperature or correlated color temperature (CCT) [4] which will be defined and expanded on in Section 2. Figure 1 shows two clearly different SPDs which have the same CCT.
For about the last 15 years there have been three different systems in use that provide a numerical index purporting to represent the color rendering performance of a source. The CIE color rendering index (CRI, symbol R a ) was developed in the 1960s, with some relatively minor revisions since. At the time of writing, it is still the internationally-accepted metric [6]. The color quality scale (CQS, symbol Q a ) was published by NIST [7] in 2010 with the intention of updating and improving on the calculation techniques of the CRI. Most recently, the IES of North America has published its color fidelity index (symbol R f ) in its technical memorandum TM-30-15 [8] with further improvements to the computational methods. Section 2 provides a brief outline of the above-mentioned systems used in the classification of source color properties.
It will be apparent from the foregoing that a means for the visualization of the color properties of a source will be of definite benefit to all users-particularly those concerned with light-source development, as well as users with less grasp of the physical significance of the numerical indices in the above systems. This leads us to the central focus of this chapter, which is the design and implementation of a computer graphic system providing an accurate (i.e. visually realistic) display of selected surface colors when illuminated (separately) by any specified pair of light sources.
Our VIS (virtual imaging system) has been developed to display the color properties of a series of test color samples under different light sources. This chapter will briefly describe the design and construction of the computer-based model that can be used as a research tool for the simulation and demonstration of the color rendering properties of various artificial light sources. It will focus on the display of a set of surface color patches as if they were illuminated by a specific light source, and the simultaneous display of two such sets to demonstrate the surface color differences arising from the use of the two different light sources.
We note that modern applications for computer graphics are largely to be found in virtual reality products such as computer gaming. In these, the 3-dimensional representation of light flow, shadows, and surface highlights are critically important for the photo-realistic creation of virtual environments, and a full description of each surface's properties requires the use of concepts such as BRDF (the bidirectional reflectance distribution function). This is not the case in our VIS in which we operate on the colors of surfaces with the implied assumption of perfectly-diffusing (Lambertian) surface properties. For each surface color in our system the diffuse reflectance is represented simply by a table of values of the spectral reflectance (i.e. reflectance as a function of wavelength).
We describe the computer models developed for the representation and display of surface colors in general, and color rendering in particular. The designed system computes and displays the color of each sample from knowledge of the light-source spectrum and the spectral reflectance of each surface. It can simultaneously display the colors resulting from illumination by two different sources. In addition, the system computes the color appearance attributes for the two sets of colors using the CIECAM02 color appearance model [9].
Full details of this visualization system will be given in Section 3.

Color properties of light sources 2.1 The correlated color temperature
The color temperature of a light source is measured and expressed by the chromaticity coordinates (x, y) or (u, v) or (u 0 , v 0 ) for that source. 1 The color of "white light" sources can also be expressed in terms of the correlated color temperature (CCT) having the unit Kevin (K). The CCT of a test source is defined as the temperature of the black body (or, Planckian) radiator having a source color that matches (as closely as possible) the color of the test source [4].
Correlated color temperature (CCT) is a widely used term to identify the appearance of near-white light sources (as well as screen white on computer monitors). It is usually the first color parameter specified in lighting system design since the color of the source has a profound influence on the atmosphere created by the lighting. The CCTs for modern lighting systems are generally in the range 2700 K (correlating with traditional tungsten filament lamps) to 6500 K (which is the color of full midday daylight in summer). Most domestic users prefer "warm" lighting in the 2700-3000 K range, while educational and commercial installations more commonly use the "cooler" range, 4000-6500 K. Note that "warm" and "cool" here refer to the psychological ambience of the lighting in contradistinction to the values of CCT.
Technically, the CCT is defined by plotting the color of the source on a CIE (u, v) graph 2 to determine the closest point on the Planckian locus, and the value of the temperature at that point gives the CCT.

Color rendering and fidelity
Coming now to color rendering, the three previously-mentioned systems (represented by the indices Ra, Qa, and Rf respectively) have a number of elements in common as well as their own distinct features. Their most important common feature is that they all produce scales in which the maximum is 100 for the "best" sources. The Ra scale is open-ended at its lower end, and can run to negative values, whereas the other scales terminate at zero. The Ra scale was originally designed to provide a measure of the relative merits of the fluorescent-tube sources being widely adopted in the 1960s; and the other two scales have been normalized in the sense that they have been scaled to provide the same index values for the original set of fluorescents. The two later scales do, however, diverge considerably from Ra in assessing other newer sources, particularly LEDs.
The next main factor they share is that they are all based on the comparison of sets of test colors which are illuminated in turn by a test light source and a reference source of the same CCT. In all three cases the reference sources are chosen as Planckian radiators if the CCT < 5000 K or a CIE Daylight illuminant if CCT ≥ 5000 K. Note, however, that there is a modification in the case of the TM-30-15 (Rf) system, in which there is a graded transition between the two types of reference for the range 4500-5500 K. In all these systems, the color differences are computed in (different) designated three-dimensional color spaces.
It should be noted that, in all three approaches, the colors and color differences are computed numerically, using the measured SPDs of test sources and the defined SPDs of the reference illuminants. The various color samples are numerically defined by means of measurements of their spectral reflectances. The wavelength ranges and wavelength intervals of the SPDs and reflectances have to be compatible, most often 380-780 nm at either 5-nm or 1-nm intervals.
Another common feature is that each of these systems incorporates a chromatic adaptation transform since it is generally not possible to achieve identity of CCTs for the test and reference sources-but there are different transforms in use in each instance. Figure 2 summarizes the above features, showing the general format of the algorithm for a color rendering or fidelity metric. We next look at the specifics of the individual systems.

The CIE 13.3-1995 (CRI) method
In this system [6] the color rendering index (CRI) is based on the average colordifference of eight medium-chroma color samples, calculated in the (now deprecated) CIE 1964 U*V*W* color space. In order to increase the information available to users, an additional six color samples were defined, including four highly chromatic red, yellow, green and blue samples, plus colors representing foliage and human skin respectively. Table 1 gives the complete list of CIE test colors. It also shows two synthetic grays that we added for display purposes.
After accounting for chromatic adaptation with a Von Kries correction [10], the difference in color ΔEi for each sample is calculated and used in the definition of that color's "Special CRI" as: and the General CRI is the average of the first eight Ri values: A perfect score of 100 represents zero color difference in all of the eight samples under the test source and reference illuminant. We can note here that, in today's parlance, the CIE color rendering index Ra is more accurately termed a color fidelity  index since it gives a measure of the degree of departure from perfect agreement between the colors of surfaces under test and reference lighting conditions. As updates on this CIE method, the two more recently-developed methods have introduced more-accurate color spaces and chromatic adaptation transforms.

The NIST (CQS) method
The following is a short summary of the main features of this method which was described in full, and contrasted with the CIE method, by Davis and Ohno in 2010 [7]. The first point of difference is in the choice of test color samples, where the CQS is based on 15 high-chroma colors selected to be representative of major significant hues. Next a new, widely-accepted chromatic adaptation transform (CMCCAT2000) [11] has been adopted. Color differences for the 15 sample colors are computed in the CIELAB (L*a*b*) (CIE 1976) color space [4].
Each color difference is then modified by a saturation factor, such that a test source that increases object chroma is not penalized. To ensure that poor rendering of any color is given sufficient weight, the differences for the 15 samples are combined by a root-mean-square "averaging" method, to give the overall color difference, ΔE rms . The "rms average" score for the 15 sample colors is given by: In order to avoid negative index values (which may occur in Ra with particularly poor sources) a log-exponential conversion is used. This is further modified by a CCT factor (using a 3rd order polynomial function of CCT) which is applied to reduce the scores of sources with CCT below 3500 K. The final output is Qa-the color quality scale (or CQS).
This system also includes a color fidelity scale termed Qf which provides a metric of object color fidelity, in a similar way to Ra in the CIE system. Qf is calculated using exactly the same procedures as for Qa, except that it excludes the saturation factor, and the scaling factor for Qf in Eq. (3) is changed to 2.93.

The CIECAM02 color appearance model
A recent technical innovation is the development of the CAM02-UCS (uniform color space) [12], which is based on the CIECAM02 color appearance model [9], and is considered to be substantially better in uniformity than competitor color spaces. The CAM02-UCS also includes an improved chromatic adaptation transformation, which improves the accuracy of corrections when the comparison sources have slightly different chromaticities.
The CIECAM02 model uses a sequence of calculation steps (mostly non-linear) to derive a set of appearance attributes (lightness, chroma, and hue) that accord with human visual experience to describe the appearance of colored surfaces. The CAM02-UCS modifies the output of the process to enable the calculation of color differences that are accurate representations of perceived color difference. The details of the processes are not repeated here, and the interested reader is referred to the references [9,12]. The proposed VIS system contains a "display CIE" button, which is able to display color appearance based on CIECAM02 model.

The IES (TM-30-15) method
Here again, we give a short overview of the new method developed, in this case, by the IES of North America [8,13]. This method makes use of a significantly expanded range of test colors, 99 in all, representing samples from nature, human skin, textiles, paints, plastics, printed materials, and published color systems. They are termed color evaluation samples (CES) which were selected on the basis of uniformity of both color space and wavelength sampling.
The TM-30-15 method, in common with the other abovementioned methods, is based on the color differences between the test color samples under the test and reference sources, as determined in the CAM02-UCS color-difference space. These are averaged over all 99 samples, yielding the color fidelity index Rf, which has a range of 0-100, with 100 indicating an exact match with the reference, and 0 an extreme difference. In addition, the system computes a color gamut index Rg which indicates, on average, if there is an increase in color saturation (Rg > 100) or a decrease (Rg < 100).

Visualization system
Our virtual imaging system (VIS) is a prototype that has been designed around a Matlab ® GUI. The experiments were performed using MATLAB R2015b on a computer with Intel CPU TM i7-6700 at 3.41GHz and 32GB RAM. It is a powerful research/demonstration tool allowing the user to determine and display the color properties of light sources, such as color rendering index (Ra), correlated color temperature (CCT), RGB values for the displayed color samples, and comparisons of sample color differences under different sources. Figure 3 illustrates the basic structure, and Figure 4 shows the complete computer modeling and display system which includes the following features: 1. A spectral measurement system to measure SPDs (spectral power distributions) of light sources and spectral reflectances of surface color samples. In many instances such data can also be obtained from published tables of SPDs and reflectances.

2.
A color-managed computer display system that incorporates the following design features: a. Creation and display of the required virtual images by running the Matlab ® GUI.
b.A color management system incorporating monitor calibration and display control. c. A color-appearance computation model, based on the CIECAM02 color appearance model.   Note that, when the calibration steps included in this procedure are unavailable, it is still possible to obtain a useful display on any suitable monitor by the judicious use of the controls for gain (K1) and gamma that are part of the display GUI. (5)

Color display model
where L n = normalized luminance of screen primary (representation of each of the quantities [R 0 , G 0 , B 0 ] shown in Figure 4), D n = normalized digital pixel value, γ = monitor gamma, K 1 = monitor gain factor, K 2 = monitor offset, and K 1 + K 2 = 1.

Selection of colors for display
The present VIS is a prototype that was designed around the CIE Ra (CRI) system. It compares a selected set of surface colors, shown under any two light sources, selected from an expandable light-source data-base. This at present comprises about 50 different sources, including 6 CIE standard illuminants. The sources may be selected to be related (i.e. having similar CCT) or unrelated, at the users' choice. Figure 5 illustrates the operation of the system displaying 16 colors on each virtual color chart. The 16 test colors shown here are the 14 CIE test colors [6] listed in Table 1, with the addition of two synthetic neutral gray colors (outlined in red in Figure 5). In this image, the left half-screen simulates their appearance under tungsten filament (illuminant A) lighting, and the right half is under D65 daylight.
The spectral reflectances of the test colors are given in the wavelength range 380-780 nm. Figure 6 shows the use of the Plot Reflectances window to display the reflectances for current selection of test colors (in this case, the 14 defined by CIE). 7. Luxeon white LED sources, 3016, 4000, 4100, 5500 and 6500 K LEDs [15].

Selection of illuminants
The illuminants in groups 1-4 are published by CIE [4]. The others have been digitized from their SPD graphs for the range 380-780 nm at 5 nm interval [14,15].
The system includes a window for the display of the currently selected illuminant spectra as shown in Figure 7.

Monitor calibration
The majority of displays today are designed on the assumption of 24-bit color (i.e. 8 bits per color channel) and conform with the sRGB standard. This standard (also known as IEC 61966-2-1:1999) uses the ITU-R BT.709 primaries together with a display gamma of 2.2. It was developed at a time of dominance of the display market by CRTs, but makers of LCD and OLED screens have also adopted it (by applying appropriate signal-processing techniques) for the sake of uniformity in the industry. 3 Figure 5. Main display window of the VIS showing illuminant a (left) and D65 (right). 3 The interested reader may wish to refer to the following commercial website that also contains a good description of the characteristics of modern monitors, and methods of measurement/calibration: http:// www.displaymate.com/.
The display controls in our VIS have been provided to compensate for variations that can occur in individual monitors, and will give best results with a calibrated monitor (i.e. one with known characteristics). These controls may also be used to  "tweak" any uncalibrated display by following a systematic trial-and error process while displaying the 16 defined colors in both halves of the screen, and paying particular attention to the appearance of the Dark Gray and Light Gray patches.
Monitor calibration is a necessary step for the accurate rendition of the sample colors on the computer display. It was decided that this project would (at least initially) make use of CRT (cathode ray tube) monitors since there is a wellestablished body of literature on CRT transfer functions [16], as summarized in Eq. (6). Part of the setting-up procedure allows users to select the preferred gamma and gain (K1) values, normally close to 2.2 for gamma and 1.0 for gain. The adjustment of these settings will allow the user to optimize most modern color monitors for display purposes, but-as mentioned-calibration is required in critical applications. Figure 8 shows two examples to illustrate the use of the display settings for user-control of the display. Figure 8(b) shows the effects of a bad adjustment of the controls.

The CIECAM02 color appearance model
One purpose of the original design was to investigate the correlation between the computed color differences and the subjectively-judged color differences as seen by a set of observers viewing the display on a calibrated monitor. For that reason, the sample colors can be computed in the CIECAM02 color appearance model, the origins and applications of which are explained in the relevant CIE technical report [9].
As seen in Figure 4, the system will normally be holding the [R 0 ,G 0 ,B 0 ] values for each of the sample colors being displayed. In the usual operating mode, these colors are computed separately for both the test and reference sources. The opportunity therefore exists to calculate the color appearance attributes for corresponding pairs of samples (being displayed for the two different sources).
The CIECAM02 model computes the color appearance of each sample in terms of the appearance attributes [J, C, h] representing the lightness, chroma and hue, respectively. These are calculated from the CIE-1931 tristimulus values [X, Y, Z] by use of a somewhat complex series of non-linear transformations described in the CIE specification [9]. A number of parameters are used to model the viewing conditions experienced by the observers, as outlined below. These in turn are used to define the exact form of the non-linear relationships in the model. The procedure is outlined schematically in Figure 9.
In order to provide an analogy to the widely-used CIELAB (L*, a*, b*) color coordinates, it is possible to define the appearance coordinates [J, a C , b C ] using the transformations of chroma C and hue h given in Eqs. (6). Note, however, that the CIECAM02 coordinates are considered to provide a more accurate model of visual experience than the earlier CIELAB model.
In using the CIECAM02 model, it is necessary to define the following viewing conditions: • L A -the adapting field luminance.
• Y b -the relative luminance of the source background in the source conditions.
• c-the impact of the surround = 0.69 for average surround, or = 0.59 for dim surround.
• N c -the chromatic induction factor = 1.0 for average surround, or = 0.9 for dim surround. Figure 9. Color display appearance model.