Spectral imaging system for non-contact colour measurement

8
Optics & Laser Technology 33 (2001) 103–110 www.elsevier.com/locate/optlastec Spectral imaging system for non-contact colour measurement N. Brown , J. Peng, M.R. Jackson, R.M. Parkin Department of Mechanical Engineering, Mechatronics Research Group, Systems Engineering Research Centre, Faculty of Engineering, University of Loughborough, Leicestershire, LE11 3TU, UK Received 10 May 2000; received in revised form 30 October 2000; accepted 2 November 2000 Abstract This paper describes the development of a non-contact system for measuring colour of printed material at web speeds. The system proposed uses a non-contact spectrophotometer based on a holographic grating, in conjunction with a conventional monochrome area scan camera, from which colour spectral data is extracted, whilst a xenon ash is used to illuminate colour samples. Software and hardware details of the system are given, along with the underlying mathematics for colour space conversion and measurement. Conversion equations from X; Y; Z chromaticity co-ordinates to the RGB system are presented, and also equations to convert from the L a b colour space to X; Y; Z chromaticity co-ordinates. Experimental results are presented whereby the non-contact spectral system is shown to perform to a colour tolerance exceeding that of conventional colour video systems. c 2001 Elsevier Science Ltd. All rights reserved. Keywords: Colour; Video; Measurement 1. Introduction A need has arisen for precise on-line colour measure- ment of web-based printed material produced at speeds of up to 2 m s 1 . Gravure printing machines print colours se- quentially, such that a separate print roller is used for each colour, patterns being overlayed in order to produce the - nal design. Since printed patterns are often a mix of colours, which are dicult to separate, it is necessary to examine tone blocks at the edge of the printed material to determine printed ink colour. Tone blocks are rectangular areas of solid and graded colour; each printed from a single ink, and con- ventionally used to determine if printed colour is correct by a human observer with good colour vision [1]. The system works well, but requires samples of printed material to be removed from the line in order to be viewed under stan- dard lighting. The standard tolerance of the human system varies, but rarely exceeds E = 1 CIELAB, the generally accepted maximum tolerance being E =0:5 CIELAB [2]. The aim of this paper is to describe a machine vision system which is capable of monitoring printed ink colour within a laboratory environment which is transferable to the indus- Corresponding author. Tel.: +44-1509-263-171; fax: +44-1509- 223934. E-mail address: [email protected] (N. Brown). trial environment. The eventual system, the development groundwork for which is covered in this paper, will sample colour whilst the print line is running, and therefore alert- ing the operator to any drifts in printed colour. The current ink production system employed works within a tolerance of E =0:5 CIELAB, and it is intended that the printing process can be made to work within these tolerances as well. The printing proces currently achieves E = 12 CIELAB on the rst colour strike, i.e. the test run for each new de- sign. 2. Conventional colour video systems Conventional colour video systems have been used to good eect for precision colour measurement, where colour dierences are larger than those employed in printing [3,4]. The conventional RGB system, whilst frequently oering image reproduction which is apparently of good quality to the observer, suers from two shortcomings. Firstly, the RGB system cannot be used to map all visible colour, since colours exist outside the RGB colour space (Maxwell colour triangle) which may not be mapped using positive RGB val- ues. For a detailed explanation of the shortcomings of RGB colour and the progression to the CIELAB XYZ colour space the reader is referred to [5]. 0030-3992/01/$ - see front matter c 2001 Elsevier Science Ltd. All rights reserved. PII:S0030-3992(00)00127-4

Transcript of Spectral imaging system for non-contact colour measurement

Optics & Laser Technology 33 (2001) 103–110www.elsevier.com/locate/optlastec

Spectral imaging system for non-contact colour measurementN. Brown ∗, J. Peng, M.R. Jackson, R.M. Parkin

Department of Mechanical Engineering, Mechatronics Research Group, Systems Engineering Research Centre, Faculty of Engineering,University of Loughborough, Leicestershire, LE11 3TU, UK

Received 10 May 2000; received in revised form 30 October 2000; accepted 2 November 2000

Abstract

This paper describes the development of a non-contact system for measuring colour of printed material at web speeds. The systemproposed uses a non-contact spectrophotometer based on a holographic grating, in conjunction with a conventional monochrome area scancamera, from which colour spectral data is extracted, whilst a xenon 0ash is used to illuminate colour samples. Software and hardwaredetails of the system are given, along with the underlying mathematics for colour space conversion and measurement. Conversion equationsfrom X; Y; Z chromaticity co-ordinates to the RGB system are presented, and also equations to convert from the L∗a∗b∗ colour space toX; Y; Z chromaticity co-ordinates. Experimental results are presented whereby the non-contact spectral system is shown to perform to acolour tolerance exceeding that of conventional colour video systems. c© 2001 Elsevier Science Ltd. All rights reserved.

Keywords: Colour; Video; Measurement

1. Introduction

A need has arisen for precise on-line colour measure-ment of web-based printed material produced at speeds ofup to 2m s−1. Gravure printing machines print colours se-quentially, such that a separate print roller is used for eachcolour, patterns being overlayed in order to produce the 7-nal design. Since printed patterns are often a mix of colours,which are di8cult to separate, it is necessary to examinetone blocks at the edge of the printed material to determineprinted ink colour. Tone blocks are rectangular areas of solidand graded colour; each printed from a single ink, and con-ventionally used to determine if printed colour is correct bya human observer with good colour vision [1]. The systemworks well, but requires samples of printed material to beremoved from the line in order to be viewed under stan-dard lighting. The standard tolerance of the human systemvaries, but rarely exceeds ;E = 1 CIELAB, the generallyaccepted maximum tolerance being ;E = 0:5 CIELAB [2].The aim of this paper is to describe a machine vision systemwhich is capable of monitoring printed ink colour within alaboratory environment which is transferable to the indus-

∗ Corresponding author. Tel.: +44-1509-263-171; fax: +44-1509-223934.

E-mail address: [email protected] (N. Brown).

trial environment. The eventual system, the developmentgroundwork for which is covered in this paper, will samplecolour whilst the print line is running, and therefore alert-ing the operator to any drifts in printed colour. The currentink production system employed works within a toleranceof ;E = 0:5 CIELAB, and it is intended that the printingprocess can be made to work within these tolerances as well.The printing proces currently achieves ;E = 12 CIELABon the 7rst colour strike, i.e. the test run for each new de-sign.

2. Conventional colour video systems

Conventional colour video systems have been used togood eFect for precision colour measurement, where colourdiFerences are larger than those employed in printing [3,4].The conventional RGB system, whilst frequently oFeringimage reproduction which is apparently of good quality tothe observer, suFers from two shortcomings. Firstly, theRGB system cannot be used to map all visible colour, sincecolours exist outside the RGB colour space (Maxwell colourtriangle) which may not be mapped using positive RGB val-ues. For a detailed explanation of the shortcomings of RGBcolour and the progression to the CIELAB XYZ colourspace the reader is referred to [5].

0030-3992/01/$ - see front matter c© 2001 Elsevier Science Ltd. All rights reserved.PII: S 0030 -3992(00)00127 -4

104 N. Brown et al. / Optics & Laser Technology 33 (2001) 103–110

Nomenclature

CIE Commission Internationale De L’Keclairge (International Commission on Illumination) [1];E CIE standard colour diFerence (CIE standard units)k normalising factor (CIE 1964 standard (unitless))� wavelength (nm)L; a; b CIE standard colour space co-ordinate (L∗a∗b∗ system) (CIE standard units)L1;2; a1;2; b1;2 su8x denotes diFering colour space sets for comparison (CIE standard units)’(�) colour stimulus function for spectrum measured (CIE standard (unitless)) (�) spectral re0ectance (unitless)R; G; B red, green, blue colour content (unitless, scale 0–255:8 bit video, 0–100:CIE)S(�) relative illuminant spectral power distribution (unitless)X; Y; Z CIE standard chromaticity co-ordinate (XYZ system) (CIE standard units)Xn; Yn; Yn illuminant colour tristimulus values (CIE standard (unitless))Mx(�); My(�); Mz(�) CIE 1964 supplementary standard colormetric system tristimulus values (CIE standard units)

The other main shortcoming of RGB-based colour videosystems which was predicted, is that quantisation producedby analogue-to-digital conversion is such that step changesin colour produced by anRGB frame grabber are not of su8-cient precision for the purposes of the industrial application.High-resolution print imaging has been achieved using a0at-bed scanner [6], but this method is unsuitable for on-linemeasurement. For the purposes of this research, commercialsystems have been tested which are based on a tristimuluscalorimeter, and colour video, but ;E = 0:5 CIELAB wasfound to be the absolute maximum precision achievable inboth cases, often dropping to ;E=1:5 CIELAB due to drift.

3. Colour space conversion

The following equations are used to convert RGB tris-timulus values to XYZ [2].

X = 0:4303R+ 0:3416G + 0:1784B; (1)

Y = 0:2219R+ 0:7068G + 0:713B; (2)

Z = 0:0202R+ 0:1296G + 0:9393B (3)

R; G and B range as input to the standard equations is in-compatible with the 8 bit binary range 0–255, and must bere-scaled in the range 0–100. Bi-directional colour spaceconversion is required for software development, outlinedin Section 5, in order to test algorithms, and as such, areonly required to be accurate to 10 decimal places.

Solving RGB in terms of XYZ:

R= 1:2530966090Z − 0:2681784247Y + 0:0794706971X;(4)

G =−1:4664796955Z + 2:1983568792Y−1:0648210589X; (5)

B= 0:6446596073Z − 1:6340127330Y + 3:1363358154X:(6)

The CIE tristimulus values of a colour stimulus maybe obtained by multiplying the colour stimulus function’(�) [2]

X = k∫�’(�) Mx(�) d�; (7)

Y = k∫�’(�) My(�) d�; (8)

Z = k∫�’(�) Mz(�) d�; (9)

where

k = 100/∫

�S(�) My(�) d� : (10)

For the purposes described in this paper, spectral re0ectanceis used to obtain colour data, using

’(�) = (�)S(�) (11)

X; Y and Z values fall in the range 0–100. The above equa-tion was applied to a range of X; Y and Z values, whichshowed that R;G and B values before calculation shouldfall in the same range, 0–100. Consequently, 8 or 10 bit in-puts in the range 0–255 and 0–1023, respectively, must bescaled accordingly. In order to convert from XYZ to Lab thefollowing standard equations [2] are applied:

L= 116(YYn

)1=3

− 16; (12)

a= 500(XXn

)1=3

−(YYn

)1=3

; (13)

b= 200(YYn

)1=3

−(ZZn

)1=3

: (14)

For the experiments carried out as described in this paper,the situation does not arise, where(XXn;YYn;ZZn

)6 0:008856:

N. Brown et al. / Optics & Laser Technology 33 (2001) 103–110 105

However should such a situation arise, the normal formu-lae shown in (13) and (14) are replaced by the followingmodi7ed formulae:

a= 500[f(XXn

)− f

(YYn

)]; (15)

b= 200[f(YYn

)− f

(ZZn

)]; (16)

where

f(XXn

)= 7:787

(XXn

)+

16116

(XXn

)6 0:008856; (17)

f(YYn

)=(YYn

)1=3 (YYn

)¿ 0:008856; (18)

f(YXn

)=7:787

(YYn

)+

16116

(YYn

)6 0:008856; (19)

f(ZZn

)=(ZZn

)1=3 (ZZn

)¿ 0:008856; (20)

f(ZZn

)= 7:787

(ZZn

)+

16116

(ZZn

)6 0:008856: (21)

In order to develop the software described in this paper, abi-directional set of mapping equations was again required.Solving the previous set of equations in terms of Y=Yn, X=Xn,Z=Zn produced

YYn

=L3

1560896+

L2

97556+

12L24389

+64

24389; (22)

XXn

=a3

125000000+

3a2

29000000+

3a2

1812500+

3a:L2

6728000

+3aL

210250+

12a105125

+L3

1560896

+3L2

97556+

12L24389

+64

24389; (23)

ZZn

=−1

8000000

{(b− 200) ×

(L3

1560896

+3L2

97556+

64L24389

)1=3}3

: (24)

And to determine the absolute diFerence between twocolours in the Lab colour space we use the following equa-tion [1]:

;E =√

(L1 − L2)2 + (a1 − a2)2 + (b1 − b2)2: (25)

Fig. 1. Imaging hardware calibration with sodium lamp.

4. Apparatus

Fig. 1 shows the layout of the optical inspection rig whichwas constructed in order to provide a rigid platform for im-age grabbing. Extension tubes 7tted to the camera were usedto increase magni7cation. The spectral imaging device [7]can be seen positioned between the camera and calibrationlamp (a sodium lamp is used for initial system calibrationbecause spectral information and suitable apparatus is read-ily available). The camera used when 7tted with a 50mmlens and 150mm of extension tubes, gives a 7eld of view of4mm, for a 1=3′′ CCD of 570×650 pixels. Fig. 2 shows thelaboratory set-up for image capture and analysis for colourdefect assessment.

5. Software

Software has been developed for print analyses [8] to ex-amine for 0aws, and to examine spectral samples oF-line[9]. What was required for this experimentation was a spec-tral imaging package which could acquire the spectral im-ages from a framegrabber on line, in order to determineprint quality. Rapid software prototyping is achievable inMatlabJ (high-level language) and Simulink (Graphicalprogramming interface for MatlabJ). Software develop-ment becomes easier than with lower-level languages likeC, yet the developed software can be compiled to C andeventually as a binary executable. C code generation is au-tomatic with the proviso that glue code is sometimes neededto interface MatlabJ to system hardware, in conjunctionwith manufacturers’ libraries. 1 This approach combines thepower of a high-level language with the I=O capabilities ofC such that a system may be developed which can performimage processing, and print machine monitoring without

1 Flashpoint Software Developers Toolkit, Integral Technologies, Inc.9855 Crosspoint Blvd., Suite 140, Indianapolis, IN 4652, USA.

106 N. Brown et al. / Optics & Laser Technology 33 (2001) 103–110

Fig. 2. Imaging apparatus system diagram.

spending excessive time coding every mathematical func-tion in C. I=O functions are already available for MatlabJ

from a number of sources in conjunction with data acquisi-tion hardware. These systems are expensive, however, duein part to their limited market, expense of development, andgeneral purpose nature. Leaner special purpose code is re-quired if it is to perform satisfactorily for system monitor-ing at web speeds. The software data 0ow diagram is shownbelow in Fig. 3. Reference to the equations shown in Sec-tion 3 will reveal the internal workings of the colour spaceconversion software elements.

6. Calibration

When there are not enough spectral data points to down-sample, we are faced with the problem of 7nding intermedi-ate data points with which to calibrate the system. In orderto calibrate for white tile re0ectance, it is necessary to in-clude the white tile re0ectance data as included by the man-ufacturer. Unfortunately, these data are produced in steps of10 nm. Bartleson et al. [2] recommends either the use of athird degree polynomial curve 7t or a Lagrange interpola-tion. A Lagrange interpolation appears to produce the mostprecise output of the two with respect to general curve trend,

and as such has been integrated into the experimental soft-ware described herein in order to compensate for diFeringwavelength spacings in future calibration data for white ref-erence tiles. It is necessary to calibrate for dark current, andthis is carried out before each colour sample. Dark currentis in eFect a DC oFset introduced by a blanked oF CCD,which becomes more extreme with temperature. For the ex-periments outlined here, dark current was calibrated beforefor each colour sample. A white reference is used for cali-bration purpose, and is illuminated with a xenon strobe. Ahalogen light source was originally used, but xenon is pre-ferred due to its longer life, and the ability to produce amore intense light. Sample capture time is limited when thesystem is to be integrated into the industrial environmentfor use on a moving web, and the use of xenon illuminationmakes the system design more straightforward for captureof small areas moving at web speeds.

7. Conventional video precision

It was decided that an evaluation of colour video cam-era resolution should be made in order to provide a com-parison with the non-contact spectroscopic system. Since10 bit per channel cameras are coming on to the market at

N. Brown et al. / Optics & Laser Technology 33 (2001) 103–110 107

Fig. 3. Overall software data 0ows.

the time of writing, it would be wise to determine the ab-solute colour de7nition for both 8 bit and 10 bit systems. Itmust be remembered that the ;E calculations carried outare a ‘best-case scenario’, taken assuming a D65 illuminantand 10◦ observer. In a real application, the colour resolutioncould be much worse, due to factors such as

1. chromatic aberration in lenses, and in particular changeof optical properties with temperature (spectral systemovercomes this by calibrating for CCD dark current ev-ery 60 s);

2. noise in cables, noise in circuits (Johnson noise, shotnoise, 0icker noise);

3. extrinsic noise (conductive, capacitive, inductive and ra-diative coupling);

4. optical noise — ambient light, sunlight (calibrated forwith the spectral system);

5. drift in camera and lens set-up after calibration (mechan-ical in aperture);

6. data loss in A=D due to quantisation; and7. illumination drift (not a problem with calibrated xenon

0ash in the proposed spectral system).

Of course, factors such as illumination drift can be de-signed out with on-line calibration, but an appreciation ofthe above unknowns is necessary from the outset to en-sure the design of the best image capture system. Noise ef-fects are reduced with the spectral system since the signalto noise ratio is much higher for colour information thanwith conventional video, and using the spectral image anaverage of 7ve sample points is taken across a 5mm sec-tion of the colour sample, providing a more stable output foreach colour sample than with a block of conventional RGBdata.

108 N. Brown et al. / Optics & Laser Technology 33 (2001) 103–110

Table 1Mean ;E precision for colour video

Mean ;E CIELAB Mean ;E CIELAB mean improvement ratiofor 8 bit camera for 10 bit camera (;E CIELAB 10 bit=

;E CIELAB 8 bit)

3.1 0.8 4.0

8. Results — conventional video

Each batch of experiments began by forming a dataset of30 random RGB values. These values then ranged accordingto the number of bits, and then bit shifted by one bit inone of the channels in order to determine the best colourresolution. The shifted bit and the reference colour for 8 and10 bit calculations are taken from the same 3× 30 matricessuch that ;E is taken in the same area of the CIELAB colourspace. The mean result is shown in Table 1. This shows theminimum ;E output error due to quantisation, and hence thebest precision with which an RGB system may be expectedto operate.

9. Results — spectral system

Currently, an average of 7ve samples is taken (to reducenoise) towards the centre of the image (to reduce the eFectsof chromatic aberration towards the edges of the front endoptics), and the resultant averaged image ‘slice’ is portedfrom the image grabbing code, which is described in de-tail with data 0ows in Section 6. In each tristimulus plot,curves are represented as follows. The input spectral curve isshown, along with the tristimulus curve. The crossed pointsshow the eFect of convoluting the arrays containing thetristimulus and the original spectrum. The area under thesecurves is found using piece wise integration to 7nd values ofX; Y and Z for the image. Sample software output is givenin Figs. 4–6 showing the curves used to produce X; Y andZ , respectively. For the curves shown, the sample under testis blue, and the corresponding distribution of spectral en-ergy can be clearly seen towards the shorter wavelengths. Atotal of 99 spectral samples were taken of 3 standard inks,blue, mauve and green, whose colour values are controlledto within ;E = 0:5 CIELAB prior to colour mixing anduse on the Gravure print line. These samples were takensuccessively, total experimental time being 1 h per sample.They show that despite a degree of system noise, with nore7nement, the system was already much more precise thanRGB video, with an inherent overall mean 0utter of only;E= 0:1313 CIELAB. Fig. 7 shows the ;E CIELAB 0ut-ter for the sample during experimentation. As can be seenfrom Fig. 7, eFects of noise and instability as outlined inSection 7 are reduced to a minimum. Fig. 8 shows the ;E0utter for the sample using a mauve standard ink duringexperimentation. Fig. 9 shows the ;E 0utter for the greensample during experimentation.

Fig. 4. Spectrum, Mx tristimulus and output for blue sample.

Fig. 5. Spectrum, My tristimulus and output for blue sample.

10. Discussion

Tests were carried out using a non-contact spectropho-tometer type device, commercially available (1999) calledthe ‘Imspector’. These early tests suggested that colour res-olution was very good, and that such a system could performwell at web speeds, the technology for monochrome ma-chine vision being well-established. The idea of an approach

N. Brown et al. / Optics & Laser Technology 33 (2001) 103–110 109

Fig. 6. Spectrum, Mz tristimulus and output for blue sample.

Fig. 7. ;E CIELAB 0utter for blue sample.

to imaging through use of a non-contact spectrophotometerhas been reinforced since this experimental work was carriedout [10], since colour resolution for colour cameras is widelyseen as a subject for further development within industry andacademia, such that the current state of the art in colour videois insu8cient for our purposes. A spectrophotometer-basedsolution is the most accurate colour determination systemavailable at present, and should introduce a degree of con-tingency into the design. (The sensitivity of a spectropho-tometer may be reduced if necessary, but the sensitivity ofan RGB system would be harder to improve, realistically

Fig. 8. ;E CIELAB 0utter for mauve sample.

Fig. 9. ;E CIELAB 0utter for green sample.

quantisation limits this to less than ;E = 0:79 CIELABfor a 10 bit system.) Consequently, the non-contact spec-trophotometer approach using the Imspector apparatus wasthe only feasible approach at this time to solve the problemof colour determination for Gravure printing. It is intendedthat a range of samples are taken of each colour to determinemean drift, such that the limiting factor in the precision ofthe spectral system is any slight 0utter present in the system.For the three samples under test, the non-contact spectralsystem showed a mean stability of better than ;E = 0:14CIELAB.

110 N. Brown et al. / Optics & Laser Technology 33 (2001) 103–110

11. Conclusions

Experiments were carried out in image grabbing, im-age processing, and colour space conversion. The outcomestrongly suggests that the image capture task is well withinthe capabilities of conventional image processing hardware.Computing and image processing hardware for the colourmeasurement system has been developed and used to pro-duce the results described previously. For the purpose ofon-line colour measurement at web speeds, there is a strongcase for the use of a non-contact spectrophotometer system,in conjunction with xenon 0ash illumination. Using ;E asa reference for comparison, the maximum useful precisionobtainable using this method is improved by a factor of morethan 4 when compared to conventional 10 bit RGB video.

Acknowledgements

The authors would like to thank Esko Harrala, of SpecimSpectral Imaging Ltd., for providing useful material to helpwith apparatus calibration, and industrial partners Engle-wood plc, RPC Containers Ltd and Shelton Vision SystemsLtd, for their support. The project is funded under the TheEngineering and Physical Sciences Research Council(EPSRC) Innovative Manufacturing Initiative (IMI), project

title ‘Intelligent Processing of Web Based materials’, IMIReference Number: GR=M17358.

References

[1] Green LA. Vymura Colour Course. Vymura plc. Cheshire: Hyde,1995.

[2] Bartleson CJ, Bertrand G, Chalmers AN. Colorimetry, 2nd ed.Publication CIE 15.2-1986.

[3] Ewing RP, Horton R. Quantitative color image analysis of agronomicimages. Agronomy J 1999;91(1):148–53.

[4] Desok K, Gregory CW, Smith GJ, Mohler JL. Immunohistochemicalquantitation of androgen receptor expression using color video imageanalysis. Cytometry 1999;35(1):2–10.

[5] Wyszecki G, Stiles WS. Colour science: concepts and methods, dataand formulae. New York: Wiley, 1982.

[6] Grice J, Allebach JP. The print quality toolkit: an integrated printquality assessment tool. J Imaging Sci Technol 1999;43(2):187–99.

[7] Hyvarinen T, Herrala E, Dall’Ava A. Direct sight imagingspectrograph, a unique add-on brings spectral imaging to industrialapplications. Specim Spectral Imaging Ltd, Oulu, Finland.

[8] Lim W, Mani S. Application of digital image analyses to measureprint quality. J Coatings Technol 1999;71(894):73–80.

[9] Ornberg RL, Woerner BM, Edwards, DA, Analysis of stainedobjects in histological sections by spectral imaging and diFerentialabsorption. J Histochem Cytochem 1999;47(10):1307–13.

[10] Proceedings, UK Industrial Vision Association (UKIVA) Seminar“On Line Automated Inspection for Printing and Packaging”, MiltonKeynes, UK, May 25th 1999.