Optics Communications 272 (2007) 320–324 www.elsevier.com/locate/optcom
Improvement on reflective color measurement using a tri-color LED by multi-point calibration P.K. Yang a
a,*
, J.C. Chen b, Y.H. Chuang
c
Department of Opto-electronic System Engineering, Ming-Hsin University of Science and Technology, Hsinchu, Taiwan b Institute of Electronic Engineering, Ming-Hsin University of Science and Technology, Hsinchu, Taiwan c Arima Optoelectronics Corp., Taoyuan, Taiwan Received 26 July 2006; received in revised form 23 November 2006; accepted 27 November 2006
Abstract We present a reflective color measurement using a tri-color LED. The color of the tested sample was determined by measuring three reflected intensities in different colors. Modulation/demodulation technique was used to distinguish three reflected intensities. The three reflected signals can be processed by a computer to give the (x, y) coordinate in CIE chromaticity diagram. Since three-points measurements give poor estimate on the whole spectral reflectance, the predicted results deviate much from those measured from some well-calibrated instrument. We have also successfully developed a calibrating procedure to correct it. Ó 2006 Elsevier B.V. All rights reserved. PACS: 42.66.Ne; 42.79.e; 42.87.d Keywords: Color measurement; Tri-color LED; Calibration
1. Introduction Color sensors are useful in classifying fruits, paints, and cloth according to the color of their appearance in quality control. Color sensors are also used on assembly lines to detect color marks on parts and product packaging, monitor the color of adhesive tape as it manufactured, and confirm that the correct rubber seals are applied. Other special application examples include clinical evaluation of the burn injuries [1], color-based pH measurements [2], and odor discrimination [3]. If the robot is capable of identifying colors, he can do more things for human. According to the tri-stimulus theory of color perception [4,5], color can be represented by three parameters. In 1931, the Commission of Internationale de l’Eclairage
(CIE) introduced three primaries called X, Y, and Z which are calculated by R X ¼ rðkÞP ðkÞxðkÞdk R Y ¼ rðkÞP ðkÞy ðkÞdk ð1Þ R Z ¼ rðkÞP ðkÞzðkÞdk; where r(k) denotes the spectral reflectance and P(k) is the incident spectral power distribution of the illuminant. xðkÞ, y ðkÞ, and zðkÞ in Eq. (1) are the CIE color matching functions. The CIE XYZ model has an advantage over other color model such as RGB where negative weights may be needed to specify some colors. CIE chromaticity coordinate is then given by x ¼ X =ðX þ Y þ ZÞ y ¼ Y =ðX þ Y þ ZÞ:
*
Corresponding author. Tel.: +886 35593142 3387; fax: +886 35593142 3388. E-mail address:
[email protected] (P.K. Yang). 0030-4018/$ - see front matter Ó 2006 Elsevier B.V. All rights reserved. doi:10.1016/j.optcom.2006.11.051
ð2Þ
Color-measuring techniques can be categorized into direct and indirect methods. Direct method, working as our eye, uses three detectors whose responsivity can be expressed as the linear combination of color matching functions
P.K. Yang et al. / Optics Communications 272 (2007) 320–324
(referred to as Luther condition). Therefore direct method measures (X, Y, Z) values. Indirect method measures the reflected power spectrum r(k)P(k) and then convert it to the color coordinate values by the integrals in Eq. (1). Direct method needs specially coated color filter to modify the detector to satisfy the Luther condition. Indirect one needs expensive gratings to split light into different frequency. Another novel method by measuring the reflectance r(k) from multi-color LEDs had been demonstrated [1,6]. The instrument is cheap and can be easily fabricated. However the measured results have not been compared with the wellcalibrated commercial instrument. In this paper we built a setup using a single tri-color LED and found that the measured color coordinates deviated from those measured by a well-calibrated commercial instrument (here we used PR650 produced by Photo Research Inc.). We successfully developed a calibrating procedure to reduce the difference between them. 2. Experimental The detecting scheme is shown in Fig. 1. We used a tricolor (red, blue, green) LED as the light emitter. The LED is of common-cathode and packaged in the three-in-one pirahna style. The peak wavelengths were measured to be kR = 628 nm, kG = 514 nm, and kB = 463 nm and chromaticity coordinates to be (0.700, 0.300), (0.127, 0.709), and (0.135, 0.057) for red, blue, and green, respectively. The characteristics of the tri-color LED are summarized in
321
Fig. 2. Detecting geometry adopted in measuring color by PR650 (left side) and by our setup (right side).
Table 1. Three reflected signals were measured by modulation/demodulation technique to effectively reject environmental noise. Red, blue, and green lights were modulated at 640 Hz, 2.8 kHz, and 1.5 kHz. Silicon PN photodiodes (BRW20R produced by Vishay Semiconductor, Germany) with the trans-impedance amplifier were used to detect the reflected light. The three output signals from the low pass filters in Fig. 1 had been maximized by adjusting the phase delay in the reference signals, x1(/1), x2(/2) and x3(/3). The reflected signals were sent to a computer through a analog-to-digital interface and then processed to yield the chromaticity coordinate (x, y). In Fig. 1, the central frequencies of three band-pass filters with Q around 10 are carefully adjusted to match the three modulated frequencies and the 3 dB frequency of the low-pass filters are set to be around 10 Hz. The geometry for color detection was chosen to be 0/45 configuration, where the LED light was incident normally to the test surface and detector received light reflected with a angle of 45° to the surface normal. The color measured by PR650 was also conducted at the similar geometry using a standard illuminant of D65 as shown in Fig. 2. 3. Calculation of the color coordinate
Fig. 1. Schematic of a reflective color sensor. BP: band-pass filter; LP: low pass filter; PD: photodiode; TIA: trans-impedance amplifier.
A standard white surface can equally reflect all incident light, the spectral reflectance is theoretically flat. The reflectance r(k) can be determined by the ratio of the light from the test object to that from the white surface and can be obtained by taking two measurements, one for a white surface and the other for the test surface. Although the spectral reflectance from a white surface is flat, the reflectance may has a value smaller than one. To precisely determine spectral reflectance r(k), instead of a white paper, we need to use a Al or Ag-coated mirror with almost an unit reflectance in all visible wavelength. The calculated spectral reflectance using a Al-coated mirror as a unit-reflectance reference may differ from that using a white paper by a
Table 1 Characteristics of the RGB tri-color LED LED color
Peak wavelength (nm)
CIE chromaticity coordinate
Spectral line-width (Dk, nm) (FWHM)
Viewing angle (deg.)
Modulated frequency (Hz)
Red Green Blue
638 514 463
(0.700, 0.300) (0.127, 0.709) (0.135, 0.057)
22 30 24
40 40 40
640 2.8 k 1.5 k
322
P.K. Yang et al. / Optics Communications 272 (2007) 320–324
constant factor. Multiplying spectral reflectance by an arbitrary proportional constant will give the same chromaticity coordinate (x, y) by Eq. (2). Therefore it is still enough to use a white paper as a reference when measuring the reflectance to calculate the chromaticity coordinate. Following the steps suggested by Laming et al. [6], the (X, Y, Z) can be estimated by X ffi rðkR ÞP ðkR ÞxðkR Þ þ rðkG ÞP ðkG ÞxðkG Þ þ rðkB ÞP ðkB ÞxðkB Þ Y ffi rðkR ÞP ðkR Þy ðkR Þ þ rðkG ÞP ðkG Þy ðkG Þ þ rðkB ÞP ðkB Þy ðkB Þ : Z ffi rðkR ÞP ðkR ÞzðkR Þ þ rðkG ÞP ðkG ÞzðkG Þ þ rðkB ÞP ðkB ÞzðkB Þ ð3Þ Since our measurement for PR650 was conducted under a standard D65 illuminant, we used spectrum of D65 for P(k) in our calculation. CIE chromaticity coordinate is then given by Eq. (2). In Fig. 3, the open circles denote the chromaticity coordinates for seven test samples measured by the PR650 and the solid squares represent coordinates for the same samples determined from three reflected signals by Eqs. (3) and (2). Three points marked by star symbols represent the chromaticity coordinates for the three colors emitting from the LED. The arrows denote the measured color difference between our setup and PR650. The deviation may be ascribed to insufficient estimate of spectral reflectance since we only measured three points in r(k). Introducing more LEDs in different wavelengths is expected to improve the estimate on the whole reflectance spectrum. However, once color projected on the retina has been absorbed by the three groups of cones, any knowledge of its spectral composition is lost. The only things remaining are three levels of activity in the red, green, and blue cones. Two
Fig. 3. Results without calibration. The open circles denote the chromaticity coordinates for seven test samples measured by PR650 and the solid squares represent coordinates for the same samples determined from three reflected signals by Eqs. (3) and (2). The arrows denote the measured color difference between our setup and PR650. The star symbols denote the three color coordinates for LEDs.
lights produce the same color sensation provided they arouse the same levels of activity in the cones even if they are of different spectral compositions. Therefore the spectral reflectance provides sufficient but not necessary condition in determining the color of test object. We thought three reflected signals at different wavelengths provide enough information and precise color coordinate can be obtained after suitable calibration. Instead of introducing more LEDs to better reconstruct the spectral reflectance, we developed some useful procedures to calibrate the measured color coordinate. 4. Calibration of color coordinate 4.1. Single-point calibration In Fig. 3, all predicted color coordinate values seem ‘‘blue-shifted’’ relative to those measured from PR650. The deviation may be first corrected by shifting all measured coordinates by a constant vector which is given by xð1Þ ¼ x þ Dxð1Þ y ð1Þ ¼ y þ Dy ð1Þ ;
ð4Þ
where shifting vector (Dx(1), Dy(1)) can be determined from a single point (x1,PR650, y1,PR650) measurement from PR650 by ! ! x1;PR650 x1 Dxð1Þ ¼ : ð5Þ y 1;PR650 y 1 Dy ð1Þ The above calibrating procedure will bring the coordinate (x1, y1) to match that measured by PR650. The results after single-point calibration are shown in Fig. 4 where the color
Fig. 4. Results after single-point calibration. The open circles denote the chromaticity coordinates for seven test samples measured by PR650 and the solid squares represent coordinates for the same samples after singlepoint calibration. The arrows denote the color difference between the results after calibration and those from PR650. The point used for calibration is marked by 1.
P.K. Yang et al. / Optics Communications 272 (2007) 320–324
difference has been greatly reduced as compared with that in Fig. 3. 4.2. Three-point calibration Looking at Fig. 4, the points near the green color still have larger color difference than those in other regions after single-point calibration. To further correct this, we need more than one-point data measured from PR650. If three samples are measured both by our setup and PR650, we have three points for calibration. First, we used (x1,PR650, y1,PR650) to get new coordinate (x(1), y(1)) by Eqs. (4) and (5). The second calibration is assumed to be xð2Þ ¼ xð1Þ þ Dxð2Þ y ð2Þ ¼ y ð1Þ þ Dy ð2Þ :
ð6Þ
The second corrections Dx(2) and Dy(2) can be expanded by ð1Þ ð1Þ the xð1Þ x1 and y ð1Þ y 1 . Keeping only first-order (linear) term, the relation can be written in a matrix form of ! ! ð1Þ ð1Þ a11 a12 x x1 Dxð2Þ ¼ : ð7Þ ð1Þ a21 a22 Dy ð2Þ y ð1Þ y 1 Then (x2,PR650, y2,PR650) and (x2,PR650, y2,PR650) were used to find the four aij coefficients in Eq. (7) by solving ! ! ð1Þ ð1Þ ð1Þ x2;PR650 x1 a11 a12 x2 x1 ¼ ð1Þ ð1Þ ð1Þ a21 a22 y 2;PR650 y 1 y2 y1 ! ! ð8Þ ð1Þ ð1Þ ð1Þ x3;PR650 x1 a11 a12 x3 x1 ¼ : ð1Þ ð1Þ ð1Þ a21 a22 y 3;PR650 y 1 y3 y1
Fig. 5. Results after three-point calibration. The open circles denote the chromaticity coordinates for seven test samples measured by the PR650 and the solid squares represent coordinates for the same samples after three-point calibration. The arrows denote the color difference between the results after calibration and those from PR650. The three points used for calibration are marked by 1, 2, and 3.
323
The correction vector (Dx(2), Dy(2)) defined in Eq. (7) with aij coefficients solved by Eq. (8) will further bring coordinate (x2, y2) and (x3, y3) to match those measured by PR650 without changing the matching condition for (x1, y1). The results after three-point calibration are shown in Fig. 5. Obviously the three-points calibration works very well since all color difference have been reduced to a very small value. 5. Discussions The calibrated result shown in Fig. 5 looks satisfactory. For more precise calibration, we can expand the correcð1Þ tions Dx(2) and Dy(2) by the power series of xð1Þ x1 and ð1Þ ð1Þ y y 1 and keep up to the square terms. The relation can be expressed in a matrix form of 0 1 ð1Þ xð1Þ x1 B C ð1Þ C ! y ð1Þ y 1 B B C ð2Þ a a a a a Dx 11 12 13 14 15 B C ð1Þ 2 ð1Þ ¼ B C: ðx x Þ 1 C a21 a22 a23 a24 a25 B Dy ð2Þ B C ð1Þ 2 ðy ð1Þ y 1 Þ @ A ð1Þ
ð1Þ
ðxð1Þ x1 Þðy ð1Þ y 1 Þ ð9Þ
In this case, six points measured by a PR650 are needed to determine Dx(1), Dy(1) in Eq. (4) and ten aij coefficients in Eq. (9). By the same reason, keeping up to the cubic terms and expand corrections Dx(2) and Dy(2) by a power series of ð1Þ ð1Þ xð1Þ x1 and y ð1Þ y 1 will need ten points measured by PR650. The more standard samples are measured by PR650, the more precise calibration will be obtained. The reflective color sensor can be used without illumination. Spectral reflectance r(k) can be measured in the dark environment. The object’s appearing color will change if different illuminant is employed. The illuminant’s information is introduced by P(k) in Eq. (1) when calculating the color coordinate. The spectrometer in conventional colormeasuring instrument measures r(k) P(k), the product of r(k) and P(k), and the measured spectrum will depend on the illuminating light source. In a reflective color sensor, only r(k) is measured. With the information of r(k), we can calculate the object’s color under any illuminant whose power spectrum is given. The minimum reflectance from LED is zero. The point marked by 4 in Fig. 5 is located at the border the triangle constructed by connecting the three LEDs’ chromaticity coordinates marked by star symbols. The experimental data shows that the reflected blue light approaches zero for the sample corresponding to this point. If the color under measurement is located at the border of the triangle, one reflectance should be zero. In principle, for the point outside the triangle, the reflectance will become negative. However this is impossible, so only for points inside the triangle the reflectance can be precisely determined. LEDs with narrow spectral bandwidth possess high saturation and can constitute larger triangle area than
324
P.K. Yang et al. / Optics Communications 272 (2007) 320–324
many light sources such as the fluorescent light. In Fig. 5, the blue and red LEDs’ chromaticity coordinates are located at the border of the horseshoe-like CIE diagram while the green one appears inside the horseshoe. Narrowing the spectral line-width of the green LED using techniques such as the resonant-cavity LED [7] or using laser diodes instead of LEDs will help to enlarge the area of the triangle and increase the detecting range. In summary, an inexpensive reflective color-measuring setup was constructed using a tri-color LED. Inasmuch as the three-point measurement gives poor estimate on the reflectance spectrum, the calculated color coordinate will deviate much from that measured by a commercial color-measuring instrument. Instead of increasing the number of LED to better estimate the reflectance spectrum, we developed a procedure to calibrate the color coordinates. The calibration worked successfully if few samples’ chromaticity coordinates were first measured from a well-calibrated instrument.
Acknowledgements We acknowledge the financial support from the National Science Council of Republic of China under grant NSC 94-2112-M-159-001. References [1] M.A. Afromowitz, G.S. Van Liew, D.M. Heimbach, IEEE T. Bio: Med. Eng. BME 34 (1987) 114. [2] T. Nakamoto, M. Yosihioka, Y. Tanaka, K. Kobayashi, T. Moriizumi, S. Ueyama, W.S. Yerazunis, Sensor Actuat B 115 (2006) 202. [3] K.T. Lau, S. Baldwin, R.L. Shepherd, P.H. Dietz, W.S. Yerzunis, D. Diamond, Talanta 63 (2003) 167. [4] R.P. Feynman, R.B. Leighton, M.L. Sands, The Feynman Lectures on Physics, vol. 1, Addison–Wesley, Redwood, City, Calif., 1989 (Chapter 35–36). [5] R.S. Berns, Billmeyer and Saltzman’s Principles of Color Technology, third ed., John Wiley & Sons Inc., New York, 2000. [6] J.E. Laming, A. Martino, IEEE Photon. Technol. Lett. 5 (1993) 583. [7] M.M. Dumitrescu, M.J. Saarinen, M.D. Guina, M.V. Pessa, IEEE J. Sel. Top. Quant. 8 (2002) 219.