A Low Cost Video Technique for Colour Measurement of Potato Chips

7
* To whom correspondence should be addressed. Lebensm.-Wiss. u.-Technol., 32, 216 } 222 (1999) A Low Cost Video Technique for Colour Measurement of Potato Chips Sandra Segnini*, Petr Dejmek and Rickard O G ste S. Segnini, P. Dejmek: Department of Food Engineering, Chemical Center, P.O. Box 124, Lund University, 22100 Lund (Sweden) R. O G ste: Department of Food Chemistry and Applied Nutrition, Lund University, 22100 Lund (Sweden) (Received December 7, 1998; accepted February 9, 1999) A computer-based video image analysis system has been developed to quantify the colour of potato chips in L*a*b* colour space. ¹ his system is not sensitive to light intensity, and the light re-ection e+ect from the undulating surface of the chips was not signi,cant to the colour measurement. ¹ he presence of undesirable spots on the chip surface was also quanti,ed. ¹he sensitivity of the technique to separate 0colours1 correlated well with the capability of the human eye. ¹he technique shows encouraging potential for use in studying the colour and appearance of other kinds of products. ( 1999 Academic Press Keywords: potato chips; colour measurement; L*a*b* space; image analysis; spots Introduction Colour is a determining factor in the de"nition of the quality of any food, and it is a feature that the consumer most immediately notices and that generally in#uences subjective sensory impression. In the case of potato chips, the colour is an important parameter that has to be controlled, together with the texture, during processing (1}3). In 1931, the International Commission on Lighting (CIE, Commission Internationale de l'Eclairage) de"ned for the purpose of colour measurement, the cone spectral sensi- tivities of an average observer and introduced several methods to describe colour objectively. A system based directly on intensities of red (R), green (G) and blue (B) monochromatic lights, was found to be mathematically inconvenient, and CIE instead decided on an arti"cial triplet of &primary lights', X, Y and Z that can be thought of as combinations of the monochromatic lights. Any colour can be described by a combination of positive X, Y and Z intensity values. Lightness is speci"ed by the Y primary alone (4, 5). For a given object, the observed light intensity depends on both the intensity and the spectral distribution of the illuminating light, and the spectral distribution of the object re#ectivity. Therefore, CIE de"ned the spectral properties of several standard illuminants. The most common one is standard illuminant D65, corresponding to the radiation of a black body at 6500 3C, which is intended to represent average daylight (5). From an evolutionary point of view, it is the properties of the object that are relevant, not the properties of illu- mination. The human vision system developed a way to correct for the quality of illumination, and to preserve di!erences in hue. A white paper is perceived as white even in reddish evening light. To allow similar possibili- ties in colour measurement, CIE de"ned several more human-related, less illumination-dependent measures of colour, of which the most common is L*a*b* (5). L*,a*, and b* values are calculated from XYZ values of a col- oured object under a given illuminant and XYZ values of a reference white object under the same illuminant. The L*a*b* colour description is perceptionally more uni- form than XYZ, and therefore more suitable for direct comparison with sensory data (5). Conventional colour meters usually provide readings both in XYZ and L*a*b* colour space. In a colour video camera, light re#ected from an object under a given illumination is detected by three sets of sensors (or one sensor with three alternating "lters), each with its own spectral sensitivities. The three resulting signals are nonlinearly transformed and combined. The outgoing video signal of the video camera does not preserve information on absolute light intensities. In ad- dition, the e!ect of the illuminant is manually or auto- matically corrected by a function called &white balance', in which the relative intensities of the three signals are 0023-6438/99/040216 #07 $30.00/0 Article No. fstl.1999.0536 ( 1999 Academic Press All articles available online at http://www.idealibrary.com.on 216

Transcript of A Low Cost Video Technique for Colour Measurement of Potato Chips

Page 1: A Low Cost Video Technique for Colour Measurement of Potato Chips

Lebensm.-Wiss. u.-Technol., 32, 216}222 (1999)

A Low Cost Video Technique for ColourMeasurement of Potato Chips

Sandra Segnini*, Petr Dejmek and Rickard OG ste

S. Segnini, P. Dejmek: Department of Food Engineering, Chemical Center, P.O. Box 124,Lund University, 22100 Lund (Sweden)

R. OG ste: Department of Food Chemistry and Applied Nutrition, Lund University, 22100 Lund (Sweden)(Received December 7, 1998; accepted February 9, 1999)

A computer-based video image analysis system has been developed to quantify the colour of potato chips in L*a*b* colour space. ¹hissystem is not sensitive to light intensity, and the light re-ection e+ect from the undulating surface of the chips was not signi,cant to thecolour measurement. ¹he presence of undesirable spots on the chip surface was also quanti,ed. ¹he sensitivity of the technique toseparate 0colours1 correlated well with the capability of the human eye. ¹he technique shows encouraging potential for use in studyingthe colour and appearance of other kinds of products.

( 1999 Academic Press

Keywords: potato chips; colour measurement; L*a*b* space; image analysis; spots

Introduction

Colour is a determining factor in the de"nition of thequality of any food, and it is a feature that the consumermost immediately notices and that generally in#uencessubjective sensory impression. In the case of potato chips,the colour is an important parameter that has to becontrolled, together with the texture, during processing(1}3).In 1931, the International Commission on Lighting (CIE,Commission Internationale de l'Eclairage) de"ned for thepurpose of colour measurement, the cone spectral sensi-tivities of an average observer and introduced severalmethods to describe colour objectively. A system baseddirectly on intensities of red (R), green (G) and blue (B)monochromatic lights, was found to be mathematicallyinconvenient, and CIE instead decided on an arti"cialtriplet of &primary lights', X, Y and Z that can be thoughtof as combinations of the monochromatic lights. Anycolour can be described by a combination of positive X,Y and Z intensity values. Lightness is speci"ed by theY primary alone (4, 5).For a given object, the observed light intensity dependson both the intensity and the spectral distribution of theilluminating light, and the spectral distribution of theobject re#ectivity. Therefore, CIE de"ned the spectralproperties of several standard illuminants. The most

*To whom correspondence should be addressed.

0023-6438/99/040216#07 $30.00/0( 1999 Academic Press All ar

21

common one is standard illuminant D65, correspondingto the radiation of a black body at 6500 3C, which isintended to represent average daylight (5).From an evolutionary point of view, it is the properties ofthe object that are relevant, not the properties of illu-mination. The human vision system developed a way tocorrect for the quality of illumination, and to preservedi!erences in hue. A white paper is perceived as whiteeven in reddish evening light. To allow similar possibili-ties in colour measurement, CIE de"ned several morehuman-related, less illumination-dependent measures ofcolour, of which the most common is L*a*b* (5). L*, a*,and b* values are calculated from XYZ values of a col-oured object under a given illuminant and XYZ values ofa reference white object under the same illuminant. TheL*a*b* colour description is perceptionally more uni-form than XYZ, and therefore more suitable for directcomparison with sensory data (5). Conventional colourmeters usually provide readings both in XYZ andL*a*b* colour space.In a colour video camera, light re#ected from an objectunder a given illumination is detected by three sets ofsensors (or one sensor with three alternating "lters), eachwith its own spectral sensitivities. The three resultingsignals are nonlinearly transformed and combined. Theoutgoing video signal of the video camera does notpreserve information on absolute light intensities. In ad-dition, the e!ect of the illuminant is manually or auto-matically corrected by a function called &white balance',in which the relative intensities of the three signals are

Article No. fstl.1999.0536ticles available online at http://www.idealibrary.com.on

6

Page 2: A Low Cost Video Technique for Colour Measurement of Potato Chips

lwt/vol. 32 (1999) No. 4

adjusted. When an analogue video image is to be dis-played on a personal computer, the video signal is con-verted to three digital signals called R@ (red), G@ (green)and B@ (blue), conventionally stored in three 8-bit regis-ters and thus expressing one of 256 possible intensities ofeach colour. These R@, G@, B@ values are not identical tothe R, G, B intensities of the CIE system. The analogue-digital conversion algorithm is designed to produceR@G@B@ values, which when displayed through standardgraphic card on red, green and blue phosphors of a stan-dard monitor produce the same colour rendition as theoriginal object. The intensity of light emitted fromthe phosphors is not linearly related to the voltage on theelectron gun, and this nonlinearity is usually correctedfor in the conversion algorithm by a power law correc-tion. The exponent is called gamma and has usually thevalues of 1.7}2.5 (8).Computerized video image analysis to measure colourhas been used recently in a number of applications (3,6}7). Image analysis software can be used to extract R@,G@ and B@ signals from colour images. Scanlon et al. (3)used the computerized video image analysis for measur-ing the colour of potato chips, but they expressed colouras grey-levels, a measure of lightness.The objective of our research was to develop a new, easyand inexpensive procedure to quantify the colour ofpotato chips by using computerized video image analysis,and to test whether it is possible to faithfully reconstructthe CIE de"ned L*a*b* colours from images.In our procedure, the standard illuminant D65 is ap-proximated by daylight #uorescent tubes, and imageacquisition involves the use of a standard colour videocamera, a frame grabber device connected to the parallelport of a personal computer, and freeware to analyse theimages. This procedure o!ers some advantages over theconventional colourimeter, including no sample pretreat-ment, rapid generation of reproducible results, and thepossibility of quantifying colour homogeneity and othercharacteristics of the potato chip surface.

Materials and Methods

Consumer packed potato chips (LaK ttsaltade, OLW, ABSweden), and selected samples of commercially manufac-tured potato chips were used as samples, and Pantone'Colour Formula Guide (Pantone, Inc. U.S.A.) coloursheets (106}109C, 113}116C, 120}123C, 1205}1235C,127}130C, Hexachrome Yellow C, Hexachrome OrangeC, Hexachrome Magenta C, and Hexachrome Black C)were used to calibrate the system.

Conventional colour measurementA colourimeter, Dr. Lange Micro Colour (Dr. Lange,Germany), was used to measure the sample colour. Itstechnical characteristics are: 10 3 angle for the normalobserver, D65 as the standard illuminat, and a measuringsurface of 5 mm. This instrument readout can be set toany CIE units. The white reference used was according toDIN 5033 (white reference model Weib-Standard LZM

21

076), and its reference values were Xn"78.2, Yn"83.1,and Zn"89.9.

Video image analysis equipmentThis system can be described as an integration of threesections:

Sample illumination Samples were illuminated by usingtwo parallel #uorescent lamps with a colour temperatureof 6500 3C and a colour rendering index (Ra) of morethan 90% (Philips, Natural daylight 230 V 50 Hz).These lamps were used as a low cost realization of thestandard illuminant D65. Sources with Ra of more than90% are considered to have very good colour renderingproperties in practical applications (5).Both lamps were situated 12 cm from the sample, and thedistance between the lamps was 10 cm.

Video camera Images were acquired by a video cameraNV-G1 (VHS-C, Panasonic) using an 8:1 power lens, andauto-focus. The camera was located at a distance of18 cm from the sample position, and the images weretaken at zoom]6. A black cover was used over theequipment (lamps, video camera, samples) to avoid thelight and re#ection from the room. The white balance ofthe camera was set using the Dr. Lange white standard.

Image capture and analysis The video image was cap-tured by a frame grabber device (Snappy 2.0, LogitechPlay, U.S.A.) connected to the parallel port of a PC (IntelPentium 133MHz, 32MB RAM, 1.5GB Hard disk, Me-dia Network, Sweden) with a standard 15@ monitor (Sam-sung, Model SyncMaster 15Gle, Super VGA 1024x768,Korea) and a video card Diamond Stealth 64 Series(Diamond Multimedia System, Inc., U.S.A.). Images werestored on the hard disk of the PC during experiments andbacked up onto a CD- Recordable (Capacity 640MB, HPHewlett Packard, France) using CD Writer Plus 8100series (HP Hewlett Packard, France).A freeware program (UTHSCSA Image Tool 1.27, Uni-versity of Texas Health Science Center, San Antonio,U.S.A.) o!ered the possibility of extracting the values ofR@G@B@ signals, segmenting the image, and identifying andanalysing other characteristics of the potato chip appear-ance such as dark spots.Typically, a 100]142 mm "eld of vision was recorded,yielding a 640]480 pixel 24-bit image (901kB in bitmapformat). The automatic thresholding function was usedto de"ne and select the whole image of the chip as &area ofinterest' and its average R@, G@ and B@ intensities wererecorded.

Results transformationIn 1976 CIE recommended the use of imaginary primarylights XYZ for the description of colours (4). Recently,the International Telecommunication Union (ITU)

7

Page 3: A Low Cost Video Technique for Colour Measurement of Potato Chips

Fig. 1 Original potato chip image (a) and image segmentedinto spot-free chip and spots (b)

lwt/vol. 32 (1999) No. 4

recommended the use of the following coe$cients for thetransformation of the RGB values to the XYZ system, orvice-versa (8):

RGBPXYZ

X

>

Z

"

0.431#0.342#0.178

0.222#0.707#0.071

0.020#0.130#0.939

*

R

G

B

Eqn[1]

and for XYZPRGB

R

G

B

"

3.063!1.939!0.476

!0.969#1.876#0.042

0.068!0.229#1.069

*

X

>

Z

Eqn[2]

The XYZ system can be transformed to the relative,intensity independent tristimulus values calledchromaticity coordinates (x, y, z) or to L*a*b* colourspace recommended by CIE 1976 (5). The comparisonbetween two L*a*b* colour spaces was done using thecolour di!erence (*E*

!") proposed by CIE in 1976 (5).

Light intensity and sample orientation ewectsThe sensitivity of the system to light intensity was testedby taking pictures of the white reference at a distance of2 to 12 cm from the camera. Each image was analysedand the colour was measured.The e!ect of light re#ection, which depends on the posi-tion of the light source relative to the surface of thepotato chips, was tested. On each of "ve randomlychosen commercial chips, a square area of 20]20 mmwas designated and its average colour measured. Sub-sequently, the chip was rotated 90, 180, and 2703 aroundthe centre of the square and the colour measured.

Spot analysisUsing the UTHSCSA Image Tool 1.27 software, thespots were measured as the percentage of area of spots inrelation to the area of the chip (the average chip was 14 to18.5 cm2 corresponding to 30 to 40 000 pixels). This wasdone automatically as follows:

(i) the potato chip picture is transformed into a grey-scale image;

(ii) the image is segmented into &objects' of a given rangeof lightness/ darkness, here into &spot-free chip ob-jects' and &spot objects', Fig. 1. a, b. The segmenta-tion can be performed automatically on the basis ofa lightness histogram, making use of the fact that thenumber of points on the image that have a colourintermediate between the &chip colour' and the &spotcolour' is small. We have used here a "xed lightnesslimit corresponding to L*"28

(iii) the &object analysis function' gives the total area andaverage colour of &spot-free chip objects' and 'spotobjects'. In agreement with the established practice,spots smaller than 16 mm2 are excluded from theanalysis (the software allows for the automatic exclu-sion of objects smaller than a chosen limit).

21

Statistical analysisStatistical evaluation of results were done using Stat-graphics Plus for Windows software. Methods appliedwere analysis of variance and t-test with 95% con"dencelevel.

Results and Discussion

Transformation of computer R@G@B@ into CIE spacePotato chips as such are not suitable as a means ofcalibration, due to their colour nonhomogeneity and fastcolour changes due to oxidation. We have therefore usedyellow hue and black sheets of the Pantone' guide, andthe Dr Lange white reference for calibration. The videoimage analysis technique gives the R@G@B@ values in thetheoretical range of 0}255. However, using the defaultsetting of Snappy, the range of values was 0}213 inpractice. Colourimeter values were converted to RGBusing Eqn [2], and the results are presented in Fig. 2a.There was a clear linear relationship between R@G@B@values from the video image analysis technique and theRGB values from the colourimeter with an R2'0.92 inall of the regressions. The observed linear relationshipamong RGB values in our system indicated that we didnot need to apply the expected gamma correction (8).Based on the correction factor given by the slopes inFig. 2a, the recommended transformation CIE XYZitu

8

Page 4: A Low Cost Video Technique for Colour Measurement of Potato Chips

Fig. 2 Comparison results between the video image analysistechnique and the conventional colourimeter using the whitereference and the Pantone' colours. (a) relationship betweenraw image R@G@B@ and colourimeter RGB values; (b) correlationbetween calibrated image and colourimeter XYZ values

Fig. 3 Image derived XYZ values for the white reference atdi!erent distances from the camera

lwt/vol. 32 (1999) No. 4

(D65) (Eqn [1]) can be modi"ed to give:

X

>

Z

"

0.21708#0.13640#0.07705

0.11178#0.28197#0.03073

0.01007#0.05185#0.40646

*

R@

G@

B@

Eqn[3]

The comparison between the XYZ values from the videoimage analysis technique obtained using the above trans-formation, and the values from the conventional colour-imeter is shown in Fig. 2b. The XYZ values for the whitereference calculated from the video image analysis tech-nique were Xn"82.6, Yn"81.5, and Zn"89.5.

Intensity and position ewectsFigure 3 shows the colour values in the XYZ system forthe white reference measured at di!erent positions fromthe camera and lamps. The XYZ values did not signi"-cantly alter with the position of the white reference inrelation to the lamps, which means that the system is notsensitive to light intensity.

21

Colour measurement is a!ected by light re#ection on thesample, especially in potato chips, which do not havea #at surface. Conventional colour measurement usinga colourimeter requires the homogenization, maceration,or pulverization of the potato chips (9), to reduce the lightre#ection e!ects. The video image analysis techniqueo!ers the possibility of reducing the e!ect of the undula-ting surface by averaging over the whole potato chip.Evaluated images of potato chips rotated 0, 90, 180 and2703 gave a standard deviation of 0.92 (range 0.26}1.59),0.33 (0.09}0.54), and 0.77 (0.29}1.36) for L*, a*, b* coor-dinates, respectively. The corresponding colour di!er-ence (*E*!") (5) was 1.42, which is a measure of totalreproducibility measurement of the colour of the potatochips by our video image analysis. The minimum L*di!erence distinguishable by the human eye is about 1 (5);therefore, the colour measuring using the video imageanalysis technique is, for practical purposes, independentof the potato chip position in relation to the equipment.

Analysis of the potato chip appearanceAn interesting aspect of the video image analysis tech-nique is to use it as a tool to analyse the surface charac-teristics or some sensory attributes of the potato chips.We have been provided by the manufacturer with 200 gsamples of chips selected by their quality control as:

(i) &acceptable chips', which had an optimally accept-able potato chip colour to the consumers, and noapparent spots;

(ii) &chips with spots', which were chips with acceptablecolour, but still not acceptable to the consumers dueto the presence of spots;

(iii) &nonacceptable chips', darker, browner, so-calledsugar coloured chips, not acceptable to the con-sumer.

We measured 10 chips of each category. The colourquanti"cation of acceptable or nonacceptable chipswas expressed in L*a*b* colour space in Fig. 4. The

9

Page 5: A Low Cost Video Technique for Colour Measurement of Potato Chips

Fig. 4 L*a*b* colour space of the potato chip samples. Thepoints correspond to individual measurements. (L): nonaccept-able chips; (v): acceptable chips

Fig. 5 Appearance analysis of three selected groups of potatochips. (a) lightness corresponding to the sugar coloured at-tribute; (b) presence of spots as percentage of the total area. Thevalues correspond to the average and standard error of 10replicates

Fig. 6 Colour measurement of the potato chips sorted by thehuman eye. (a) lightness in relation to the subjective scale (b) a*colour values versus the subjective scale; and (c) b* versus thesubjective human scale. The subjective scale was done using 40chips from the same bag, and the points represent individualmeasurements

lwt/vol. 32 (1999) No. 4

acceptable chips occupied a space of 77(L*(83,!9(a*(!4, and 39(b*(47, while the colourspace of the nonacceptable chips was 60(L*(70,!0.7(a*(5; and 42(b*(52. The di!erences be-tween the two types of potato chips were highly signi"-cant in terms of the colour di!erence E*

!"(P(0.0001),

and di!erences in L* (P(0.0001), a* (P(0.0001), and(P(0.0001).The presence of spots is an undesirable aspect of thepotato chips surface. As seen in Fig. 5a, the &acceptable

22

chips' were lighter than the &chips with spots' (outside thearea of the spots), and these were lighter than &nonaccept-able chips'. There were statistical di!erences among all ofthese potato chips samples (P(0.0001). Figure 5b showsthe quanti"cation of the spots as a percentage of the totalarea. There was a statistically signi"cant di!erence in theresults (P(0.001), where the &chips with spots' had thehighest percentage of area corresponding to spots; mean-while the acceptable chips did not have spots.

Sensitivity of the video image analysis techniqueTo study the sensitivity of the video image analysis tech-nique in relation to the human perception of colours, the

0

Page 6: A Low Cost Video Technique for Colour Measurement of Potato Chips

Fig. 7 Average positions of each subjective scale group inL*a*b* space

Fig. 8 Correlation of colour di!erence (*E*

!") with the subjec-

tive scale. The white bar corresponds with the standard devi-ation of reproducibility of colour di!erence

lwt/vol. 32 (1999) No. 4

following experiment was conducted. Forty potato chipswere taken at random from a commercial package andsorted subjectively (by author SS) into 10 categories,from lightest to darkest colour (for more than 10 catego-ries, the samples could not be sorted with any con"-dence). Their colour was measured using the video imageanalysis technique, and the L*, a*, and b* results areshown in Fig. 6a}c. There was a clear relation betweenthe L*, a*, or b* and the scale by human eye. The videoimage analysis technique can di!erentiate among potatochip colours as sensitively as the human eye. The averageof the L*a*b* values for each scale group is shown inFig. 7. These nonselected chips occupied a space of75(L*(83, !5(a*(1, and 35(b*(40. Thedarker potato chips (scale 9 and 10) occupied a colourspace similar to the selected nonacceptable chips, whilethe rest of the chips occupied a colour space close to theselected acceptable chips.The measure of colour best suitable for comparison withsubjective judgment was shown to be the colour di!er-ence (*E*

ab), which is the distance between two points inL*a*b* colour space (5). Figure 8 shows the colour di!er-ence of each group in relation to the lightest chips. Thestandard deviation of reproducibility of colour di!erencewas 1.42 (white bar in Fig. 8). The video image analysistechnique can di!erentiate well, each subjective group ofchips as rated by the human eyes.The sensibility of the technique to separate &colours'correlated well with the capability of the human eye. Thevideo image analysis technique had some advantagesover the conventional colourimeter, namely, the possibil-ity of studying the chips without sample preparation, andquantifying characteristics such as spots on the potatochips surface. The results obtained from this study indi-

22

cate an encouraging potential of the technique, which canbe used also to study the colour and appearance of otherkinds of products.Standard personal hardware provides su$cient perfor-mance for the analysis to be perceived as instantaneous.A later version of Image Tool, v 2, allows for automationof whole series of measurements through simple macrolanguage. If better representativity is sought, many chipscan be analysed in a single image.

Acknowledgement

The authors wish to acknowledge "nancial support fromOLW Chips AB (Sweden), Procordia Food AB (Sweden),and Swedish Board for Technical Development, andtechnical support from Andras M. Kene.

References

1 SMITH, O. Potato chips. In: TALBURT, W. F. AND SMITH, O.(Eds) Potato Processing. The Avi Publishing Company, Inc.,pp. 305}402 (1975)

2 ORR, P. H. AND JANARDAN, K. G. A procedure to correlatecolour measuring systems using potato chips samples. Ameri-can Potato Journal, 67, 674}654 (1990)

3 SCANLON, M. G., ROLLER, R., MAZZA, G. AND PRITCHARD,

M. K. Computerized video image analysis to quantify colourof potato chips. American Potato Journal, 71, 717}733 (1994)

4 CLYDESCALE, F. M. Colorimetry: methodology and applica-tions. CRC Critical Reviews in Food Science and Nutrition, 10,243}301 (1978)

5 HUNT, R. W. G. Measuring Colour. 2nd ed. Ellis Horwood,Ltd. (1991)

6 KIM, K. M. AND CHUN, J. K. Video image analysis of breadduring baking. In: Jowitt, R. (Ed) 7th International Congresson Engineering & Food. She$eld, UK: Academic Press, pp.H65}H67 (1997)

1

Page 7: A Low Cost Video Technique for Colour Measurement of Potato Chips

lwt/vol. 32 (1999) No. 4

7 COSTA, R., OLIVEIRA, R. AND GEKAS, V. Application ofimage analysis to the study of water losses from potatoslices during frying. In: JOWITT, R. (Ed.) 7thInternational Congress on Engineering & Food, pp.A157}A160 (1997)

22

8 POYNTON, C. The rehabilitation of gamma. In:http//www.poynton.com/&poynton (12 Feb, 1998)

9 Francis, F. J. and Clydescale, F. M. Micellaneous: part II,Potato Products. Food Product Development, ColourMeasurement of Foods: XXXII, 2, 85}89 (1972)

2