non-destructive evaluation of quality and ammonia content in whole and fresh-cut lettuce by computer...

9
Non-destructive evaluation of quality and ammonia content in whole and fresh-cut lettuce by computer vision system Bernardo Pace a,1 , Maria Cefola a,1, , Paolo Da Pelo b , Floriana Renna b , Giovanni Attolico b a Institute of Sciences of Food Production, CNR-National Research Council of Italy, Via G. Amendola, 122/O-70126 Bari, Italy b Institute on Intelligent Systems for Automation, CNR-National Research Council of Italy, Via G. Amendola, 122/O-70126 Bari, Italy abstract article info Article history: Received 5 May 2014 Accepted 24 July 2014 Available online 6 August 2014 Keywords: Computer vision system Non-destructive evaluation Quality levels Ammonia Prediction models The paper describes the developed hardware and software components of a computer vision system that extracts colour parameters from calibrated colour images and identies non-destructively the different quality levels ex- hibited by lettuce (either whole or fresh-cut) during storage. Several colour parameters extracted by computer vision system have been evaluated to characterize the product quality levels. Among these, brown on total and brown on white proved to achieve a good identication of the different quality levels on whole and fresh-cut let- tuce (P-value b 0.0001). In particular, these two parameters were able to discriminate three levels: very good or good products (quality levels from 5 to 4), samples at the limit of marketability (quality level of 3) and waste items (quality levels from 2 to 1). Quality levels were also chemically and physically characterized. Among the parameters analysed, ammonia content proved to discriminate the marketable samples from the waste in both product's typologies (either fresh-cut or whole); even the two classes of waste were well discriminated by ammonia content (P-value b 0.0001). A function that infers quality levels from the extracted colour parameters has been identied using a multi- regression model (R 2 = 0.77). Multi-regression also identied a function that predicts the level of ammonia (an indicator of senescence) in the iceberg lettuce from a colour parameter provided by the computer vision system (R 2 = 0.73), allowing a non-destructive evaluation of a chemical parameter that is particularly useful for the objective assessment of lettuce quality. The developed computer vision system offers exible and simple non-destructive tool that can be employed in the food processing industry to monitor the quality and shelf life of whole and fresh-cut lettuce in a reliable, objective and quantitative way. © 2014 Elsevier Ltd. All rights reserved. 1. Introduction Computer vision systems (CVS) are an engineering technology that combines mechanics, optical instrumentation, electromagnetic sensing, digital video and image processing technology (Patel, Kar, Jha, & Khan, 2012). It studies methods and techniques that enable computer to auto- matically and non-destructively extract relevant contents from images and to interpret their most signicant characteristics to achieve aims such as classication, grading, quality assessment, and defect detection (Gomes & Leta, 2012). CVS have been widely used to evaluate qualita- tive parameters or defects of different fruits and vegetables, since colour is a very informative property that can be measured by CVS to deter- mine the market acceptance and to provide useful hints about the global quality of products (i.e. freshness, maturity). CVS, with respect to color- imeters, enable the evaluation of the colour property at a pixel resolu- tion: this provides the opportunity of determining characteristics (such as shape, texture, presence of defects) that can be exploited to reach a fast, objective and consistent grading of products (Du & Sun, 2006; Savakar & Anami, 2009; Zheng & Sun, 2008). Moreover, CVS can observe the whole surface of products avoiding the subjective choice of sample points typical of colour measures by colorimeter. Recently, CVS were used to assess quality and marketability of artichokes (Amodio, Cabezas-Serrano, Peri, & Colelli, 2011) and fresh-cut nectar- ines (Pace, Cefola, Renna, & Attolico, 2011). Moreover, CVS have proved to be able to predict the nutritional quality of coloured vegetable (Pace et al., 2013). In the last years, for the increased requirements for quality by con- sumers, the food industry has paid numerous efforts to measure and control the colour of their products. Thus, the research on the objective assessment of food colour is an expanding eld (Wu & Sun, 2013; Zhang et al., 2014). In this context, CVS could be applied for the objective qual- ity evaluation of whole and fresh-cut lettuce during storage. Generally, during postharvest storage of lettuce, visible damages occur, often asso- ciated to browning due to the oxidation phenomena and root develop- ment. These colour changes are spread all around the vegetable's surface, making the subjective evaluation of surface damages a time- Food Research International 64 (2014) 647655 Corresponding author. Tel./fax: +39 080 5929304/9374. E-mail address: [email protected] (M. Cefola). 1 First authorship is equally shared. http://dx.doi.org/10.1016/j.foodres.2014.07.037 0963-9969/© 2014 Elsevier Ltd. All rights reserved. Contents lists available at ScienceDirect Food Research International journal homepage: www.elsevier.com/locate/foodres

Upload: independent

Post on 27-Nov-2023

0 views

Category:

Documents


0 download

TRANSCRIPT

Food Research International 64 (2014) 647–655

Contents lists available at ScienceDirect

Food Research International

j ourna l homepage: www.e lsev ie r .com/ locate / foodres

Non-destructive evaluation of quality and ammonia content in wholeand fresh-cut lettuce by computer vision system

Bernardo Pace a,1, Maria Cefola a,1,⁎, Paolo Da Pelo b, Floriana Renna b, Giovanni Attolico b

a Institute of Sciences of Food Production, CNR-National Research Council of Italy, Via G. Amendola, 122/O-70126 Bari, Italyb Institute on Intelligent Systems for Automation, CNR-National Research Council of Italy, Via G. Amendola, 122/O-70126 Bari, Italy

⁎ Corresponding author. Tel./fax: +39 080 5929304/93E-mail address: [email protected] (M. Cefola).

1 First authorship is equally shared.

http://dx.doi.org/10.1016/j.foodres.2014.07.0370963-9969/© 2014 Elsevier Ltd. All rights reserved.

a b s t r a c t

a r t i c l e i n f o

Article history:Received 5 May 2014Accepted 24 July 2014Available online 6 August 2014

Keywords:Computer vision systemNon-destructive evaluationQuality levelsAmmoniaPrediction models

The paper describes the developed hardware and software components of a computer vision system that extractscolour parameters from calibrated colour images and identifies non-destructively the different quality levels ex-hibited by lettuce (either whole or fresh-cut) during storage. Several colour parameters extracted by computervision system have been evaluated to characterize the product quality levels. Among these, brown on total andbrown on white proved to achieve a good identification of the different quality levels on whole and fresh-cut let-tuce (P-value b 0.0001). In particular, these two parameters were able to discriminate three levels: very good orgood products (quality levels from 5 to 4), samples at the limit of marketability (quality level of 3) and wasteitems (quality levels from 2 to 1). Quality levels were also chemically and physically characterized. Among theparameters analysed, ammonia content proved to discriminate the marketable samples from the waste in bothproduct's typologies (either fresh-cut or whole); even the two classes of waste were well discriminated byammonia content (P-value b 0.0001).A function that infers quality levels from the extracted colour parameters has been identified using a multi-regression model (R2 = 0.77). Multi-regression also identified a function that predicts the level of ammonia(an indicator of senescence) in the iceberg lettuce from a colour parameter provided by the computer visionsystem (R2 = 0.73), allowing a non-destructive evaluation of a chemical parameter that is particularly usefulfor the objective assessment of lettuce quality.The developed computer vision system offers flexible and simple non-destructive tool that can be employed inthe food processing industry to monitor the quality and shelf life of whole and fresh-cut lettuce in a reliable,objective and quantitative way.

© 2014 Elsevier Ltd. All rights reserved.

1. Introduction

Computer vision systems (CVS) are an engineering technology thatcombines mechanics, optical instrumentation, electromagnetic sensing,digital video and image processing technology (Patel, Kar, Jha, & Khan,2012). It studiesmethods and techniques that enable computer to auto-matically and non-destructively extract relevant contents from imagesand to interpret their most significant characteristics to achieve aimssuch as classification, grading, quality assessment, and defect detection(Gomes & Leta, 2012). CVS have been widely used to evaluate qualita-tive parameters or defects of different fruits and vegetables, since colouris a very informative property that can be measured by CVS to deter-mine themarket acceptance and to provide useful hints about the globalquality of products (i.e. freshness, maturity). CVS, with respect to color-imeters, enable the evaluation of the colour property at a pixel resolu-tion: this provides the opportunity of determining characteristics

74.

(such as shape, texture, presence of defects) that can be exploited toreach a fast, objective and consistent grading of products (Du & Sun,2006; Savakar & Anami, 2009; Zheng & Sun, 2008). Moreover, CVS canobserve the whole surface of products avoiding the subjective choiceof sample points typical of colour measures by colorimeter. Recently,CVS were used to assess quality and marketability of artichokes(Amodio, Cabezas-Serrano, Peri, & Colelli, 2011) and fresh-cut nectar-ines (Pace, Cefola, Renna, & Attolico, 2011). Moreover, CVS have provedto be able to predict the nutritional quality of coloured vegetable (Paceet al., 2013).

In the last years, for the increased requirements for quality by con-sumers, the food industry has paid numerous efforts to measure andcontrol the colour of their products. Thus, the research on the objectiveassessment of food colour is an expandingfield (Wu& Sun, 2013; Zhanget al., 2014). In this context, CVS could be applied for the objective qual-ity evaluation of whole and fresh-cut lettuce during storage. Generally,during postharvest storage of lettuce, visible damages occur, often asso-ciated to browning due to the oxidation phenomena and root develop-ment. These colour changes are spread all around the vegetable'ssurface, making the subjective evaluation of surface damages a time-

648 B. Pace et al. / Food Research International 64 (2014) 647–655

consuming and hard work. This explains the opportunity of developingan automatic system for the evaluation of surface's damages to replacesubjective inspection (Zhang et al., 2014). Zhou et al. (2004) used CVSto evaluate the acceptability during storage of shredded lettuce on thebase of percentage of brownish colours; the CVS proposed by Zhouused a commercial 1-CCD camera to acquire colour images that werestored using a (lossy) jpeg format. Their image analysis was mainlydone in the HSV colour space that, with respect to the machine depen-dent RGB, is a human-oriented colour space: in fact its components(hue, saturation, value) are of intuitive comprehension for human be-ings even if they do not mimic the human evaluation of colour distanceas specifically designed colour spaces such as CIELab. The range of eachHSV colour component used to identify the region corresponding tobrown was manually fixed using tools provided by a commercialimage analysis software that was also used to select and quantify thebrown part of each image.

This research was aimed to develop a CVS, in both its hardware andsoftware components, to extract colour parameters and identify non-destructively the quality levels of whole and fresh-cut iceberg lettuce.The investigation has been done on the whole colour palette exhibitedby lettuce studying and experimentally verifying several colour param-eters describing the distribution of pixels in the colour space. Physicaland chemical characterization of the different quality levels the lettuce(either whole or fresh-cut) went through during storage was carriedout to provide reference data to train and to validate the CVS. Finally,propermultivariatemodels were developed to predict the quality levelsand the related intrinsic quality parameter of lettuce iceberg (withparticular reference to the ammonia content) on the base of the colourparameters measured by CVS.

2. Materials and methods

2.1. Plant material and processing

Iceberg (Lactuca sativa L.) was provided by a farm (Ortomad srl) lo-cated in Pontecagnano (SA, Italy), and transported in cold condition tothe Postharvest Laboratory of the Institute of Sciences of Food Produc-tion. Plants were selected, in order to avoid damaged samples, washedin chlorinate water (100 mg L−1) and drained. Twenty plants werecut (Robotcup CL 52, Vincennes, France) in pieces (approx. 5 cm);whereas other thirty were stored as whole items. Both whole andfresh-cut lettuces were placed in open low density polyethylene(LDPE) bagswith highpermeability and stored at 4 (±0.5) °C. Each rep-licate was made by one iceberg lettuce head or by 300 g of fresh-cutproduct. Thirty bags (6 replicates × 5 quality levels) for each typology(whole or fresh-cut) were prepared. They have been divided in a dataset for the prediction step (containing 45 bags divided randomlybetween whole and fresh-cut products) and a data set for the validationphase (containing the remaining 15 bags). All items, at any time duringstorage, were graded using a five quality level scale, based on sensoryevaluation, as reported below. Images of samples belonging to eachquality level were acquired and processed by CVS; moreover the samesamples underwent a chemical-physical analysis (ammonia content,total chlorophyll, antioxidant activity and colour analysis by colorimeter).

2.2. Quality level classification

Along the storage, fresh-cut and whole iceberg lettuces were classi-fied using 5 quality levels (QL) according to the following scale: 5 =very good (very fresh, no signs of wilting, decay or bruises), 4 = good(slight signs of shrivelling, bruises), 3 = limit of acceptability or mar-ketability (moderate signs of shrivelling, browning, dryness, wilting,bruises), 2 = poor (severe bruises, evident signs of shrivelling, pitting,decay), and 1 = very poor (unacceptable quality due to decay, bruises,leaky juice). The QL 3 was considered the minimum threshold of

acceptance for sale or consumption (Nunes, Emondb, Rautha, Deac, &Chau, 2009); therefore values below 3 indicated a waste product.

2.3. Colour analysis by computer vision system

The images used in the experiments were acquired using a 3CCD(Charged Coupled Device) sensor digital camera (JAI CV-M9GE). Thecamera has a dedicated CCD for each colour channel and provides a re-liable colour measure at full resolution, without the artefacts of mostdigital cameras (based on the Bayer filter). To avoid any colour artefactsinduced by lossy compression algorithms the uncompressed the TIFFformat was used to save images. The camera mounted a Linos MeVis12 mm lens system and its optical axis was perpendicular to the blackbackground onto which the products were placed. Eight halogenlamps, divided along two rows placed at the two sides of the imagedarea, were used. Theywere orientedwith a direction of 45°with respectto the optical axis of the CCD camera and to the plane on which theproducts are placed (Fig. 1). Two light diffusers were placed betweenlight sources and products to reduce highlights. A flat uniform whitesurface was used to evaluate the unevenness of light distributionthroughout the scene and a built-in function of the camera was usedto correct shadows. The lamps were connected to a direct currentpower supply to avoid the periodic fluctuations of light intensity dueto alternating current.

White referencing was achieved using the white patches of a colourreference plate (Munsell Digital ColourChecker SG by X-Rite). The cam-era can set separately the electronic gain for each colour channel: thebest values for these parameters were set to obtain a satisfactorywhite value on the reference patches, achieving the white calibration.An image of the X-Rite ColourChecker was also acquired at regular in-tervals to check the acquisition set-up with respect to colour accuracy.A further smaller colour-chart (Kodak Colour Control Patches) wasplaced in every scene to estimate and reduce colour variations betweenimages acquired at different times: the correction of each colour chan-nel was accomplished using a different polynomial transformationwhose parameters were estimated comparing the expected and themeasured colours on the Kodak Colour Control Patches. Amore detailedexplanation of the acquisition set-up and on the techniques and algo-rithms used to evaluate and correct colour differences due to changesin acquisition conditions (lighting, geometry, set-up of the camera)can be found in the previous work (Pace et al., 2011). All the processingused code specifically developed using Matlab 7 (MathWorks, Inc.,USA).

The evaluation of the colour properties of products using the CVSinvolved the solution of two problems: to acquire calibrated colour im-ages and to extract colour parameters providing thedesired informationabout products.

Solving the former problem involves maximizing the homogeneityof colour measures extracted from images acquired at different times.

It is important to note that the system does not aim to provide abso-lute colour evaluation (as a colorimeter does): its goal is to providemea-sures that are consistent and repeatable in time. The choice of theCIELab space is motivated by its perceptual uniformity (Kang, East, &Trujillo, 2008): the goal of the system is to provide consistent measuresin this perceptual colour space. To achieve this result two tasks need tobe accomplished: to reduce the instability of the acquisition conditionsand to map the device dependent RGB space to the device independentperceptual CIELab space. Some authors use polynomial function to solveboth these problems: they identify the polynomial parameters to mapthe RGB values of the colour chart to the corresponding expected CIELabcolours. Insteadwe use all the available degrees of freedom of the trans-formation only to correct the RGB values of the acquired image (reduc-ing their differences from the reference RGB values of the colour-chart)and use a standard mathematical transform between the consistentRGB colours obtained and the CIELab space. A polynomial functionwith 11 parameters (Lee, Chang, Archibald, & Greco, 2008) is evaluated

Fig. 1. Computer vision system used to acquire images.

649B. Pace et al. / Food Research International 64 (2014) 647–655

using the colours of the reference colour-chart (that is present in eachacquired image) and applied to reduce the effects of changes in the ac-quisition conditions. The corrected RGB values are then converted to theCIELab colour space using functions available in the Matlab environ-ment: these functions are based on the ITU-R RecommendationBT.709 using the D65 white point reference.

A proper processing of the acquired images is needed to identify andmeasure colour characteristics useful to identify the QL and to estimatethe chemical and physical properties destructively measured in thelaboratory. The proposed approach, developed and experimentallyvalidated in this paper, will be described in the following section.

For each whole lettuce, four images were acquired from four pointsof view. In particular, considering the iceberg placed on its cut point,two images were acquired from the top and from the bottom, whilethe other two from the left and right sides. The fresh-cut product wasrandomly spread to cover as much as possible the area observable bythe camera.

2.3.1. Colour parameters measured by the CVSThe characterization of colours' properties has been based on the

consideration that iceberg lettuce exhibits mainly two kinds of colours:green and white/brown. The surface of a top quality lettuce exhibitsmainly nuances of green andwhite. Human visual evaluation of appear-ance (commonly used to grade this product) suggests that green un-dergoes quite small changes while the product degrades from the QL 5down to QL 1. The white part, instead, is progressively exposed to abrowning process: as a result a typical QL 1 lettuce mainly exhibitsnuances of green and brown colours.

One of the objectives of the analysis has been to characterize thecolour distribution of green and white/brown at different stages of theevolution of products. Nine white/brown patches and 9 green patches(with mostly homogeneous colour) have been manually extractedfrom images of products belonging to each of the QL (from 5 to 1).The resulting 10 training sets (the combination of the five QL with thetwo families of colours, green and white/brown) have been used to

characterize the colour distributions associated to the distinct QL. A hi-erarchical characterization has been done: at the higher level twolarge distributions identified green and white/brown; at a lower leveleach colour family has been further divided into the five quality grades(from 5 to 1), each having an own colour distribution. Examples ofpatches belonging to these 10 groups are shown in Fig. 2.

The proposed approach uses only the a⁎ and b⁎ components of thecolours expressed in the CIELab colour space. The CIELab has been cho-sen for its well known advantages in reproducing the human evaluationof colour. The L⁎ component has been discarded because it is muchmore sensitive to the 3D structure of the product (the unpredictable ori-entation of each small patch of the iceberg lettuce with respect to lightsand optical axis) (Mendoza, Dejmek, & Aguilera, 2006). Moreover thecomponents a⁎ and b⁎ are more directly related to chromaticity thatmore effectively identifies the different parts of the product.

The set of colours of each training set has been represented bya Gaussian bivariate distribution in the (a⁎, b⁎) plane. The resultingdistributions are shown in Fig. 3. The colour parameters (orientationof principal axes, aspect ratio, brown on total, brown on white, green ontotal) which used to build the multi-regression models have beenextracted in the following way. Let us denote I(i, j) = (Lij⁎, aij⁎, bij⁎)i =1, …, m the image that we need to classify, where (Lij⁎, aij⁎, bij⁎) de-scribes the colour of the pixel (i,j) in the CIELab colour space. Let usconsider the histogram of only the a⁎and b⁎ components of theimage H(h, k) = |{(i, j)|aij⁎ = h and bij⁎ = k}|: that is H(h, k) is thecardinality of the set of pixel in the image whose a⁎and b⁎ componentsare equal to h and k respectively. This histogram has been obtained bydiscretizing the range ]-60,80] using 140 bins: the same choices(range and number of bins) have beenmade for both the colour compo-nents (we have experimentally verified that the colour of the productsat hand is definitely inside this area and that the obtained resolution ofthe quantization was sufficient for our goal). Therefore the resultinghistogram is a 140 by 140 matrix for each image.

Fig. 4 shows the distribution of colours for the best (QL = 5) andworst classes (QL = 1) for fresh-cut iceberg lettuce. The QL seems to

Fig. 2. The figure shows a representative patch for each of the considered colour distributions. From left to right the quality levels from 5 to 1 are reported. The examples on the upper roware related to the green part of the iceberg lettuce while the lower row is related towhite/brown colours. Green appears to be less informative thanwhite/brown about the quality level ofthe product. (For interpretation of the references to colour in this figure legend, the reader is referred to the web version of this article.)

650 B. Pace et al. / Food Research International 64 (2014) 647–655

be related not only to the absolute positions of dots (closer to the green-ish or to thewhite/brownish nuances) but also to the shape of their dis-tribution (eccentricity). We can characterize these properties usingorientation of its principal axes and variances along them. The centreof mass of the distribution is evaluated as:

cmx ¼

Xhk

H h;kð ÞxXhk

H h;kð Þ: ð1Þ

Threemoments can then be evaluated using the following formulas:

mhh ¼X

hkH h;kð Þ h−cmhð Þ2 ð2Þ

mkk ¼X

hkH h; kð Þ k−cmkð Þ2 ð3Þ

Fig. 3. Thefigure shows the scatterplot of colour distributions associatedwith the 10 set of examplplane of the CIELab colour space. In all the scatterplots the upper-left cluster represents greenish coin graphic (A) show the colours of all the set of all the quality levels: a significant separation betwgraphics (B-F) show the colours belonging to the different five quality levels, QL (for both green(C) green dots show the colours typical of the QL 2 (a slightly better non-marketable product)(F) cyan and magenta dots show the colour of QL 4 and QL 5 respectively. The scatterplots progroup of QL 3–5. Colour information is therefore expected to be able to separate marketable proof the references to colour in this figure legend, the reader is referred to the web version of this a

mkh ¼hkH h; kð Þ k−cmkð Þ h−cmhð Þ: ð4Þ

X

The angleϑ that identifies the colour parameter orientation of princi-pal axes is therefore done by:

ϑ ¼ 12arctg

2mkh

mhh−mkk

� �: ð5Þ

The aspect ratio has been measured using a property of the covari-ance matrix. The vectors of colours detected in the distributions are:Xi = (ai⁎, bi⁎) i = 1, …, nc where ai⁎ and bi⁎ represent the correspondingcomponents of each colour in the CIELab space and nc is the numberof colours that are really present in the distribution. The covariancema-trix Cov(X) of the data and its eigenvaluesλ1 and λ2 has been evaluated.These eigenvalues correspond to the variances of data with respect tothe principal components of the data, which is the directions identifiedby the linear combinations of the data using as coefficients the associat-ed eigenvectors (Smith, 2002). These two principal components repre-sent the directions of maximum and minimum variances of the data.

es (green andwhite/brown for each of the five quality grades): they are drawn in the (a⁎, b⁎)lourswhile the bottom-right one is associatedwithwhite/brownish nuances. The black dotseen green (upper-left cluster) andwhite/brown (lower-right cloud) can be appreciated. Theand white/brown): in (B) the red dots show the colours of products of QL 1 (the worst); in; in (D) blue dots show the colours of QL 3 (low-quality marketable product); in (E) andvide a qualitatively feeling of the more evident colour separation between QL 1–2 and theduct from waste and to identify each of the two non-marketable classes. (For interpretationrticle.)

Fig. 4. The figure shows two images of the fresh-cut iceberg lettuce: the upper row is related to a sample of the top quality level (QL 5) while the lower shows an example of the qualitylevel 1 (theworst). The column on the right shows the image of the sample. The column on the left shows the scatterplot of themeasured colours in the (a⁎, b⁎) plane of the CIELab colourspace. The blue dots correspond to the greenish colourswhile the red ones are associatedwithwhite/brown nuances. The degradation process introduces a shift of colours from the green-ish region toward the white/brownish one, changing the relative presence of these two colours. Moreover, it modifies the shape and orientation of the distribution itself: to capture andquantify this behaviour the orientation of principal axes and the aspect ratio of the distribution have been explored. (For interpretation of the references to colour in this figure legend, thereader is referred to the web version of this article.)

651B. Pace et al. / Food Research International 64 (2014) 647–655

The ratio of the variances along them (expressed by the eigenvalues)provides the desired aspect ratio:

Aspect ratio ¼ λmax

λmin: ð6Þ

The evaluation of the relative balance between greenish and white/brownish colours requires the image to be segmented: each pixelbelonging to the product must be assigned to one of the three coloursgreen, white and brown. Different balances of these components areexpected to identify products of different qualities.

The bivariate Gaussian used to fit the three distributions of colourshas been used to estimate the probability of each a *, b * couple to belongto each of the three colours.

So if:

Pg ¼ p greenj a�ij; b�ij

� �� �ð7Þ

Pw ¼ p whitej a�ij; b�ij

� �� �ð8Þ

Pb ¼ p brownj a�ij; b�ij

� �� �ð9Þ

are the probabilities of the colour corresponding to the couple (aij⁎, bij⁎)to belong to the green, white and brown colour respectively, given a

pixel I(i,j) whose CIELab colour is (Lij⁎, aij⁎, bij⁎), the pixel is assigned tothe class having the maximum probability. Using this strategy we donot need to manually set hard thresholds to separate the differentcolour classes but describe three colour concepts (green, white andbrown) as two-dimensional distributions that are automatically gener-ated in a bottom-up way from the training data. Even if in this paper ahard classification has been implemented by choosing the colour classwith maximum probability, this approach enables the implementationof fuzzy criteria that can effectively express andmanage also borderlinecases.

Let us indicate with nt, ng, nw and nb the total number of pixel belong-ing to the product and the number of pixel classified as green, white andbrown respectively after the segmentation phase. The colour parameters,brown on total, brown on white and green on total are evaluated as:

brownontotal ¼ nb

ntð10Þ

brownonwhite ¼ nb

nwð11Þ

greenontotal ¼ ng

nt: ð12Þ

Fig. 5 shows two whole lettuces (one of QL5 and the other one ofQL1) with the corresponding classification of pixels as being green,white or brown. The image shows how the change of quality level

Fig. 5. Thefigure shows two images of iceberg lettuce and the corresponding image segmentationmade by the computer vision system. In the segmented image, green and brownnuancesare represented by a uniform corresponding colour while the yellow one has been used to represent pixels classified as white in the corresponding image. The upper row represents aproduct at quality level 5 (the best) while the lower is a product at quality level 1 (the worst). The figure shows as the relative balance of colours changes during the degradation ofthe lettuce. (For interpretation of the references to colour in this figure legend, the reader is referred to the web version of this article.)

Table 1Main effects of quality levels (very good, good, acceptable, poor and very poor) on thecolour parameters obtained by computer vision system in fresh-cut iceberg lettuce.

Qualitylevels

Orientation ofprincipal axes

Aspectratio

Brownon white

Brownon total

Greenon total

5 Very good 18.5 a 8.3 a 0.96 a 0.92 a 0.79 a4 Good 18.4 a 5.5 b 0.84 ab 0.63 b 0.42 b3 Acceptable 17.9 a 4.0 bc 0.78 bc 0.50 bc 0.36 b2 Poor 19.5 a 2.7 c 0.65 c 0.37 c 0.26 b1 Very poor 11.4 b 1.7 c 0.34 d 0.06 d 0.03 c

P value *** *** **** **** ****

Mean values of 6 replicates. For each colour parameter themean values followed by differ-ent letters, are significantly different (P-value b 0.05) according to Student–Newman–Keuls (SNK) test.Significance: *** and **** = significant at P-value ≤ 0.001 and 0.0001, respectively.

652 B. Pace et al. / Food Research International 64 (2014) 647–655

produces significant changes in the segmentation of the lettuce surfaceusing the three colour classes. Browning progressively affects the prod-uct during storage: it influences mainly the white regions with minoreffects on the green areas. The relative percentage of each colour onthe external surface provides useful information about the QL of bothwhole iceberg and fresh-cut leaves.

2.4. Chemical physical characterization

2.4.1. Total chlorophyll content and colour analysis by colorimeterFor the analysis of total chlorophyll, 5 g of lettuce was placed in

capped 50mL centrifuge tubes and extracted in 80% acetone, containinga few mg of magnesium carbonate, with a homogenizer (UltraturraxT-25, IKA Staufen Germany) (Lichtenthaler, 1987). To remove all thepigments, tissues were extracted five times by adding 10 mL of 80% ac-etone to the pellets and finally the extracts were combined. Sampleswere centrifuged and the absorbance at 471 and 477 nmwasmeasuredagainst an acetone blank.

The colours of the whole and fresh-cut samples were acquired alsousing a colorimeter.

Colour parameters L⁎, a⁎ and b⁎were measured on 9 random pointson external surface of whole iceberg and on fresh-cut slices (10 for eachreplicates). A CR-400 (Konica Minolta, Osaka, Japan) set to work with aD65 illuminant, in reflectance mode and with the CIE L⁎, a⁎ and b⁎

Table 2Main effects of quality levels (very good, good, acceptable, poor and very poor) on brownon white and brown on total colour parameters obtained by computer vision system inwhole iceberg lettuce.

Quality levels Colour parameters

Brown on white Brown on total

5 0.09 d 0.04 d4 0.23 c 0.10 d3 0.45 b 0.21 c2 0.55 b 0.31 b1 0.78 a 0.59 aP value **** ****

Mean values of 6 replicates. For each colour parameter themean values followed by differ-ent letters, are significantly different (P-value b 0.05) according to Student–Newman–Keuls SNK test.Significance: **** = significant at P-value ≤ 0.0001.

653B. Pace et al. / Food Research International 64 (2014) 647–655

colour scale, was used. The colorimeter was calibrated with a standardreference having values of L⁎, a⁎ and b⁎ corresponding to 97.55, 1.32and 1.41 respectively. In order to measure colour variations on eachevaluation time,ΔE⁎was calculated using the following formula:ΔE� ¼L�0 −L�� �þ a�0−a�

� �þ b�0−b�� �� 1=2 (Martínez-Sánchez, Tudela, Luna,

Allende, & Gil, 2011), where, the subscript 0 represents colour parame-ters measured on the fresh samples.

2.4.2. Antioxidant activity and ammonia contentThe following extraction procedure was used for the determination

of the antioxidant activity. Five grammes of lettuce was homogenisedin a methanol–water solution (80:20) for 1 min and then centrifugedat 5 °C and 6440 ×g for 5min. Antioxidant assaywas performed follow-ing the procedure described by Brand-Williams, Cuvelier, and Berset(1995) with minor modifications. The diluted sample, 50 μL, was pipet-ted into 0.95 mL of 2,2-diphenyl-1-picrylhydrazyl (DPPH) solution toinitiate the reaction. The absorbance was read after 40 min at 515 nm.6-Hydroxy-2,5,7,8-tetramethylchroman-2-carboxylic acid (Trolox)was used as a standard and the antioxidant activity was reported in mi-cromole of Trolox per 100 g of fresh weight (f.w.).

For ammonia production the method reported by Weatherburn(1967) was used. In detail, 5 g of chopped sample was homogenised(Ultraturrax T-25, IKA Staufen Germany) with 20 mL distilled waterfor 2 min, centrifuged at 12,000 rpm × 5 min, and a 0.5 ml extract wasused for analysis. Colour development, after the reaction with a phenolnitroprusside reagent and alkaline hypochlorite solution, was deter-mined after incubation at 37 °C for 20 min, reading the absorbance at635 nm (UV-1800, Shimadzu, Kyoto, Japan).

Table 3Main effects of quality levels (very good, good, acceptable, poor and very poor) on the quality

Quality parameters Quality levels

Very good Good

Fresh-cutColour analysis by colorimeter (ΔE*) 0.00 d 6.50 cTotal chlorophyll (mg 100 g−1) 0.38 0.41Ammonia content (µmole NH4

+ g−1) 0.05 c 0.07 cAntioxidant activity (mg Trolox 100 g−1) 11.57 b 12.85 b

WholeColour analysis by colorimeter (ΔE*) 0.00 c 4.62 bTotal chlorophyll (mg 100 g−1) 0.38 a 0.27 bAmmonia content (µmole NH4

+ g−1) 0.04 c 0.04 cAntioxidant activity (mg Trolox 100 g−1) 14.80 b 14.35 b

Mean values of 6 replicates. For each quality parameter the mean values followed by different(SNK) test.Significance: *** and **** = significant at P-value ≤ 0.001 and 0.0001, respectively.

2.5. Statistical analysis

The effects of QL and point of view on the colour parameters extract-ed by CVS in thewhole lettucewere evaluated performing amultifactorANOVA. The effects of QL on colour and quality parameters (in fresh-cutandwhole samples)were tested by performing a one-way ANOVAwithdata means arranged in a completely randomized design. The meanvalues for QL were separated using the Student–Newman–Keuls(SNK) test.

Multiple regression analysis was carried out using Sigma Plot soft-ware. The Best Subsets Regression tool was used to select the bestmodel using R squared as best criterion.

3. Results and discussion

3.1. Selection of colour and chemical parameters useful to classify the pro-duce quality levels

All colour parameters obtained by CVSwere significantly affected byQL in fresh-cut lettuce (Table 1). Among all parameters, aspect ratio,brown on white and brown on total provided the best differentiation ofQL. In particular, these three colour parameters were globally able todiscriminate three levels: very good (5) or good (4) from acceptable(3) and from poor (2) and very poor (1) samples. The orientation ofprincipal axes instead was able to separate only QL 1 from the otherQL. The green on total distinguished individually QL 5 and QL 1 butwas unable to resolve the other three QL (from 4 to 2) (Table 1).

Forwhat concerns thewhole products, the influences of QL, points ofview and their interaction (QL × points of view) on colour parameterswere studied by multifactor analysis. All colour parameters were affect-ed by QL; points of view affected only orientation of principal axes andgreen on total, whereas the interaction (QL × points of view) affectedaspect ratio, orientation of principal axes and green on total. To sumup, re-sults showed that only two colour parameters (brown on total andbrown on white) were affected significantly by QL, regardless of thepoints of view. Thus, for the whole product, these two parameterswere chosen to identify all the QL (Table 2). Thus brown on total andbrown on white proved to achieve a good identification of the differentQL on both lettuce typologies (either whole or fresh-cut).

Colour analysis was also carried out by a colorimeter andwas able todiscriminate all the QL in fresh-cut lettuce. The ΔE⁎, with respect to theinitial colour values, increased from 0.0 (QL 5) to about 8.0 (QL 3) and toabout 16.0 (±3.3) (QL 1) (Table 3). On the whole iceberg, smallerincreases were measured on the external section: ΔE⁎ was about 4.9(±0.6) (QL 3) and 11.9 (±2.6) (QL 1) (Table 3). In fresh-cut samplesbelonging to different QL no significant changes were observed in chlo-rophyll content, as already reported by Spinardi and Ferrante (2012).

parameters in fresh-cut and whole iceberg lettuce.

Acceptable Poor Very poor P

7.78 c 11.82 b 15.99 a ****0.34 0.39 0.39 ns0.10 c 0.25 b 0.37 a ****

12.21 b 14.63 b 20.24 a ****

4.89 b 7.53 b 11.87 a ****0.27 b 0.21 b 0.20 b ***0.06 c 0.11 b 0.25 a ****

19.63 a 14.32 b 15.09 b ****

letters, are significantly different (P-value b 0.05) according to Student–Newman–Keuls

Table 4Variables inmodels, determination coefficients of the calibration and validationmodel (R2 and R2

v) and fitted equations in the prediction of quality levels and ammonia content by the bestsubsets multiple linear regressions based on colour parameters obtained by the CVS.

Predicted parameters Variables Equations Calibration model Validation withexternal data

R2 RMSEP P Rv2 P

Quality levels (QL) Brown on white QL = 4.904744 − 4.409704 ∗ (brown on white) 0.77 0.26 *** 0.83 ***Ammonia content (A) Brown on total A = 0.018073 + 0.325595 ∗ (brown on total) 0.73 0.22 *** 0.60 **

Significance: *** and ** = significant at P-value ≤ 0.001 and 0.01 respectively.

654 B. Pace et al. / Food Research International 64 (2014) 647–655

Furthermore, in the whole samples, the incoming senescence brought achlorophyll degradation thatwas not related to theQL. In both product'stypologies (either fresh-cut or whole iceberg) ammonia content provedto discriminate the acceptable product (ranging fromQL=5 toQL=3)from the waste (QL = 2 or 1). Even the two classes of waste were welldiscriminated by ammonia content (Table 3). Ammonia accumulates insenescent leaves and is considered a reliable indicator of product fresh-ness (Cefola, Amodio, Rinaldi, Vanadia, & Colelli, 2010; Chandra,Matsui,Suzuki, & Kosugi, 2006).

Antioxidant activity significantly increased in fresh-cut samplesbelonging to QL 1 (Table 3). Similar results were obtained by Ke andSaltveit (1988) andKang and Saltveit (2002) that observed amarked in-crement of the antioxidant capacity of iceberg lettuce exposed to severalkinds of stress and after wounding whereas in whole samples the anti-oxidant activity remained almost unchanged during all storage. Startingfrom these results,multi-regressionmodelswere built to predict QL andalso ammonia content, using colour parameters (brown on total andbrown on white) resulted able to achieve a good identification of thedifferent QL on both lettuce typologies and not significantly affectedby points of view.

R² = 0.77

0

1

2

3

4

5

1 2 3 4 5QU

AL

ITY

LE

VE

LS

PRE

DIC

TED

BY

CV

S

QUALITY LEVELS MEASURED

A

R² = 0.73

0.0

0.1

0.2

0.3

0.4

0.0 0.1 0.2 0.3 0.4

AM

MO

NIA

CO

NT

ENT

PR

ED

ICTE

D B

Y C

VS

(µm

ole

NH

4+ g-1)

AMMONIA CONTENT MEASURED (µmole NH4+g-1)

Quality Levels

5-4-3

Quality Level

2

Quality level

1B

Fig. 6. Internal validation of themultivariate models (described in Table 4) for the predic-tion of quality levels (A) and ammonia content (B).

3.2. Prediction of quality levels and ammonia content by computer visionsystem

Multivariatemodels, derived usingmultiple linear regressions, wereused to fit the relationship between colour parameters measuredby CVS and the QL and the ammonia content obtained by analyticalmethod, as shown in Table 4. Models were built using the data setfor the prediction step containing records from whole and fresh-cut lettuce.

QL resulted well predicted by the brown on white (R2 = 0.77);whereas ammonia content resulted predicted by brown on total(R2 = 0.73) (Table 4). The internal validation of the predictivemodels is reported in Fig. 6. In addition models were validatedusing external data with a good prediction measured by R2 = 0.83and 0.60 for the QL and ammonia content estimation respectively(Table 4).

These results showed as colour parameters obtained by CVS are ableto give non-destructive evaluation of the QL of whole and fresh-cutproducts. In addition, they can also give the corresponding value ofthe ammonia content, allowing a non-destructive evaluation of a chem-ical parameter that is particularly useful for the objective assessment offood quality. Indeed, considering the same data set used to build themodel, it was found that these two parameters (QL and ammonia con-tent) are highly and inversely correlated (R2 = −0.82, P b 0.0001),assessing ammonia as a chemical parameter that indicates the QL. Thetwo colour parameters used in the predictive models (brown on whiteand brown on total) are both related to the development of brownpigments on the vegetable surface. These results agree with thosedetected by Zhou et al. (2004). These authors studied the correlationcoefficients between percent brown area and lettuce shelf lifehighlighted values ranged from 0.92 to 0.99; in addition, they alsodetected high correlations between brown area and human visualevaluations.

4. Conclusions

The paper addressed the use of colour information measured bycomputer vision system to achieve a non-destructive evaluation of thequality level and the ammonia content of iceberg lettuce, either aswhole or as fresh-cut product. Several parameters have been consideredto characterize the colour distribution of the products' surface. Thestudy demonstrated that it is possible to use two colour parameters(brown on white and brown on total) obtained by computer vision sys-tem to achieve the intended goal. Multivariatemodels, trained on prop-er data, have been able to predict the quality levels and also to providean accurate estimate of the ammonia content, giving a non-destructiveevaluation of this chemical parameter. The experiments confirmed therelevance of browning as a powerful indicator of the quality level oflettuce. The developed method considers the complete distribution ofcolour on the product and does not require the user to explicitly providea description of the colour of interest (green, white, brown) whose dis-tributions are automatically extracted from training samples. Thesetwo-dimensional Gaussian distributions do not require crisp predefinedthresholds and allow a proper and smooth expression andmanagement

655B. Pace et al. / Food Research International 64 (2014) 647–655

of colours belonging to border regions between colours. Thus theproposed computer vision system offers flexible and simple non-destructive tool that can be employed in the food processing industryto monitor the quality and shelf life of whole and fresh-cut lettuce in areliable, objective and quantitativeway. The current set-upused to eval-uate agro-alimentary products requires a reasonable control on lightsand geometry that can be reasonably exerted on a production line. Aninvestigation about weakening the environmental constraints hasbeen planned: there is a significant interest in extending similar analysisalso to different points of the supply chain to enable a virtual completemonitoring of the quality level along the whole life of the product.Further investigations will be devoted also to check the performanceof the system on other agro-alimentary products. Further studies willalso address the exploration of alternative approaches to implementthe classification and the prediction steps: several machine learningmethods, including also ANN and SVM, will be considered to this aim.

Acknowledgements

This research was financed by MIUR (Research Projects: ‘SmartCities and Communities and Social Innovation’ Prot. 84/Ric 02/03/2012, PON4a2_Be&-Save). The authors thank Arturo Argentieri for thetechnical support to the configuration of the experimental set-up.

References

Amodio, M. L., Cabezas-Serrano, A. B., Peri, G., & Colelli, G. (2011). Post-cutting qualitychanges of fresh-cut artichokes treated with different anti-browning agents asevaluated by image analysis. Postharvest Biology and Technology, 62, 213–220.

Brand-Williams, W., Cuvelier, M. E., & Berset, C. (1995). Use of a free radical method toevaluate antioxidant activity. LWT - Food Science and Technology, 28, 25–30.

Cefola, M., Amodio, M. L., Rinaldi, R., Vanadia, S., & Colelli, G. (2010). Exposure to 1-methylcyclopropene (1-MCP) delays the effects of ethylene on fresh-cut broccoliraab (Brassica rapa L.). Postharvest Biology and Technology, 58, 29–35.

Chandra, D., Matsui, T., Suzuki, H., & Kosugi, Y. (2006). Postharvest changes in somephysiological traits and activities of ammonia-assimilating enzymes in lettuce duringstorage. Asian Journal of Plant Science, 5, 378–384.

Du, C. J., & Sun, D. W. (2006). Learning techniques used in computer vision for foodquality evaluation: A review. Journal of Food Engineering, 72(1), 39–55.

Gomes, J. F. S., & Leta, F. R. (2012). Applications of computer vision techniques in theagriculture and food industry: A review. European Food Research and Technology,235(6), 989–1000.

Kang, S. P., East, A. R., & Trujillo, F. J. (2008). Colour vision system evaluation of bicolorfruit: a case study with ‘B74’ mango. Postharvest Biology and Technology, 49, 77–85.

Kang, H. M., & Saltveit, M. E. (2002). Antioxidant capacity of lettuce leaf tissue increasesafter wounding. Journal of Agricultural and Food Chemistry, 50(26), 7536–7541.

Ke, D., & Saltveit, M. E. (1988). Plant hormone interaction and phenolic metabolism in theregulation of russet spotting in iceberg lettuce. Plant Physiology, 88, 1136–1140.

Lee, D. J., Chang, Y., Archibald, J. K., & Greco, C. G. (2008). Color quantization and imageanalysis for automated fruit quality evaluation. 4th IEEE Conference on AutomationScience and Engineering, Washington DC, USA, August 23–26.

Lichtenthaler, H. K. (1987). Chlorophyll and carotenoids: Pigments of photosyntheticbiomembranes. Methods in Enzymology, 148, 331–382.

Martínez-Sánchez, A., Tudela, J. A., Luna, C., Allende, A., & Gil, M. I. (2011). Low oxygenlevels and light exposure affect quality of fresh-cut Romaine lettuce. PostharvestBiology and Technology, 59, 34–42.

Mendoza, F., Dejmek, P., & Aguilera, J. M. (2006). Calibrated color measurements of agri-cultural foods using image analysis. Postharvest Biology and Technology, 41, 285–295.

Nunes, M. C. N., Emondb, J. P., Rautha, M., Deac, S., & Chau, K. V. (2009). Environmentalconditions encountered during typical consumer retail display affect fruit and vegeta-ble quality and waste. Postharvest Biology and Technology, 51, 232–241.

Pace, B., Cefola, M., Renna, F., & Attolico, G. (2011). Relationship between visual appear-ance and browning as evaluated by image analysis and chemical traits in fresh-cutnectarines. Postharvest Biology and Technology, 61, 178–183.

Pace, B., Cefola, M., Renna, F., Renna, M., Serio, F., & Attolico, G. (2013). Multiple regressionmodels and computer vision systems to predict antioxidant activity and total phenolsin pigmented carrots. Journal of Food Engineering, 117, 74–81.

Patel, K. K., Kar, A., Jha, S. N., & Khan, M. A. (2012). Machine vision system: a tool forquality inspection of food and agricultural products. Journal of Food Science andTechnology, 49, 123–141.

Savakar, D. G., & Anami, B. S. (2009). Recognition and classification of food grains, fruitsand flowers using machine vision. International Journal of Food Engineering, 5,1556–3758.

Smith, L. I. (2002). A tutorial on principal components analysis, 51. (pp. 52). USA: CornellUniversity, 52.

Spinardi, A., & Ferrante, A. (2012). Effect of storage temperature on quality changes ofminimally processed baby lettuce. Journal of Food Agriculture and Environment, 10,38–42.

Weatherburn, M. V. (1967). Phenol-hypochlorite reaction for determination of ammonia.Analytical Chemistry, 39, 971–974.

Wu, D., & Sun, D. W. (2013). Colour measurements by computer vision for food qualitycontrol: A review. Trends in Food Science & Technology, 29, 5–20.

Zhang, B., Huang, W., Li, J., Zhao, C., Wu, J., & Fan, S. (2014). Principles, developments andapplications of computer vision for external quality inspection of fruits and vegeta-bles: A review. Food Research International. http://dx.doi.org/10.1016/j.foodres.2014.03.012.

Zheng, C., & Sun, D. W. (2008). Object measurement methods. In S. Da-Wen (Ed.),Computer vision technology for food quality evaluation (pp. 57–80). Amsterdam:Academic Press.

Zhou, T., Harrison, A. D., McKellar, R., Young, J. C., Odumeru, J., Piyasena, P., et al. (2004).Determination of acceptability and shelf life of ready-to-use lettuce by digital imageanalysis. Food Research International, 37, 875–881.