You are on page 1of 2

Fruit Color Estimation based on Mathematical Morphology

iga Miguel Oyarce, Marco Mora, Alex Z un


moyarce@litrp.cl, mora@spock.ucm.cl, azuniga@litrp.cl Laboratorio de Investigaciones T ecnologicas en Reconocimiento de Patrones Departamento de Inform atica Universidad Cat olica del Maule Talca,Chile

Claudio Fredes
cfredes@ucm.cl Departamento de Agronom a Universidad Cat olica del Maule Talca,Chile

AbstractThis paper proposes a new method for the estimation of fruit color. The method includes the implementation of an algorithm for vector ordering, the median for robust computing of the central tendency of the colors, and the use of the CIE Lab uniform color model. The presented results show the advantages of proposed method compared to its counterparts in the literature.

I.

I NTRODUCTION

of outliers. The computation of the median requires sorting the data in ascending or descending order and determining the central element. For one-dimensional data, sorting is selfevident. However, in this paper the addressed problem consist of the ordering of colors represented by a vector of three components. Sorting multidimensional data is complex task. It is not sufcient to consider norm vector as a sorting criterion, since it is always possible to nd different colors with the same vectorial norm. The ordering of vectors is part of the problems addressed by Color Mathematical Morphology. It is possible to conclude that this problem does not have a single solution, with the proposed approaches being criteria that depend on the particular problem. In [4] an ordering based on distances, projections on the gray level line, and a lexicographic criterion for images in the RGB model are proposed. A recent investigation [5] proposes a method inspired by the behavior of the electrostatic potential for the ordering of colors in the CIE Lab model. In color models that are not perceptually correct, such as RGB and HSV, colors that are different are not necessarily separated by an important Euclidean distance. In this study, [5] has been adopted to sort colors, since this paper presents criteria for the CIE Lab model, a color model that is designed to compare colors by means of distances. III. E XPERIMENTATION

Color is an important parameter to determine fruit maturity. For fruit such as grapes, raspberries, olives, among many others, there are color tables associated to fruit maturity. Maturity is one of the most important indicators to determine the optimal moment for harvest. Fruit color estimation is performed by various methods. The simplest method is visual estimation, in which a human expert inspects the fruit and assigns a color from a color table. This method is simple, but it is very imprecise and subjective, since it depends on the experience of the human expert. Instruments called Colorimeters are also used. These instruments allow an accurate estimation of color; however, this kind of instruments has a high cost. In order to address the above problems, computational systems for fruit inspection based on digital cameras have been developed. In [1] a representative color is estimated by computing the mean per channel in the CIE Lab model. In [2] and [3] it is proposed to use the histogram of the channels a and b of the CIE Lab model to obtain a measure of central tendency of the histogram (center of mass).This paper presents a new approach to color estimation, proposing to consider all channels of the color model and to adopt the median for a robust measure of central tendency of colors. The paper is structured as follows: Section II describes the proposed method. Section III presents the numerical evaluation of the proposal, compared with representative methods from the literature. Finally, Section IV presents the conclusions of the work. II. C OLOR ESTIMATION BASED ON VECTOR ORDERING

This paper is a stage of a research project to estimate the Phenolic Maturity of grapes based on seed image1 . Therefore, the experiments consider the images studied in this project. The experimentation considers 4 seeds, at different stages of maturity, which are presented in the rst row of Figure 1. As a point of reference or Ground Truth, the color supplied by a human expert is dened as true color. This expert is highly trained in visual estimation of seed color and is the author of pioneering research in this area [6]. The color estimated by the expert for each of the seeds is presented in the second row of Figure 1. The experimentation considers three typical methods of color estimation reported in the literature: the mean by channel
1 Proyecto FONDEF IDeA CA12i10236: Estimaci on de la Madurez Fen olica de la Uva basada en Im agenes de la Semilla. Marco Mora, Claudio Fredes, Sergio Hernandez. Comisi on Nacional de Ciencia y Tecnolog a (CONICYT), Gobierno de Chile.

The proposed color estimation method takes the information from the 3 channels of the color model. Furthermore, the median of the colors is computed, since it is known that the median is a robust estimator of central tendency in the presence

(M1), the mode by channel (M2), the median by channel (M3), and the proposed method which takes the median from all three channels (PM). Colors estimated by the method M1 for the different seeds are shown in the third row of Figure1, , the colors of method M2 correspond to the fourth row, those of method M3 to the fth row, and nally the colors for the proposed method ( PM) are in the last row of Figure 1. While at rst glance there is little variation between the colors provided by the different methods, it is observed that the computation of the distance yields signicant differences that allow for differentiation between the performances of each method.

Method Mean by Channel Distance Mode by Channel Distance Median by Channel Distance Median by Proposed Method

Seed 1 7,81 7,12 7,54 4,21

Seed 2 2,72 4,07 2,96 1,85

Seed 3 3,34 2,40 3,28 2,23

Seed 4 5,40 5,23 5,14 3,32

TABLE II.

D ISTANCE FROM E XPERT C OLOR .

IV.

C ONCLUSION

(a)

(b)

(c)

(d)

In this paper, a method for computing the representative color of fruit has been proposed, applied to color estimation of grape seeds. The proposed method has three important features. Firstly, the method considers the CIE Lab uniform color model, which is consistent in terms of color differences and their Euclidean distances. Secondly, it employs information from all 3 channels of the color model. And nally, it adopts a robust estimation of the central tendency of the colors by computing the median. Together, these three features signicantly improve color estimation compared to the methods reported in the literature. ACKNOWLEDGMENT This work is completely nanced by Proyecto FONDEF IDeA CA12i10236: Estimaci on de la Madurez Fen olica de la Uva basada en Im agenes de la Semilla. Marco Mora, Claudio Fredes, Sergio Hernandez. Comisi on Nacional de Ciencia y Tecnolog a (CONICYT), Gobierno de Chile. R EFERENCES
[1] F. Pedreschi, J. Leon, D. Mery, and P. Moyano, Development of a computer vision system to measure the color of potato chips, Food Research International, vol. 39, no. 10, pp. 1092 1098, 2006. B. Pace, M. Cefola, F. Renna, and G. Attolico, Relationship between visual appearance and browning as evaluated by image analysis and chemical traits in fresh-cut nectarines, Postharvest Biology and Technology, vol. 61, no. 23, pp. 178 183, 2011. B. Pace, M. Cefola, F. Renna, M. Renna, F. Serio, and G. Attolico, Multiple regression models and computer vision systems to predict antioxidant activity and total phenols in pigmented carrots, Journal of Food Engineering, vol. 117, no. 1, pp. 74 81, 2013. P. Gonzalez, V. Cabezas, M. Mora, F. Cordova, and J. Vidal, Morphological color images processing using distance-based and lexicographic order operators, in XXIX International Conference of the Chilean Computer Science Society (SCCC), 2010, pp. 258264. A. Hanbury and J. Serra, Mathematical morphology in the cielab space, Image Analysis and Stereology, vol. 21, no. 3, 2011. C. Fredes, E. V. Bennewitz, E. Holzapfel, and F. Saavedra, Relation between seed appearance and phenolic maturity, a case study using grapes cv. carmenere, Chilean Journal of Agricultural Research, vol. 7, no. 3, pp. 10921098, 2010.

(e)

(f)

(g)

(h)

(i)

(j)

(k)

(l)

(m)

(n)

(o)

(p)

(q)

(r)

(s)

(t)

[2]

[3]

(u)
Fig. 1. Estimated Colors.

(v)

(w)

(x)
[4]

Table I shows the numerical values of the colors in the CIE Lab color model for all methods involved. It is noted that this color model corresponds to a uniform or perceptually correct model, which permits the comparison of colors based on their Euclidean distance from a reference color.
Method Expert Color Mean by Color Channel Mode by Color Channel Median by Color Channel Median by Proposed Method Seed 1 [28,-2,33] [30,5,30] [27,5,32] [30,5,32] [27,2,35] Seed 2 [23,21,15] [25,21,19] [26,21,20] [25,21,19] [24,21,14] Seed 3 [12,15,9] [13,17,8] [13,17,9] [12,18,8] [11,16,6] Seed 4 [16,13,5] [17,18,10] [15,18,9] [17,18,10] [14,15,4]

[5] [6]

TABLE I.

O BTAINED COLORS .

Table II shows the Euclidean distance between the vector corresponding to the color obtained by each method and the vector of the reference color for each seed. The table shows that the proposed method yields shorter distances to the reference colors provided by the expert.

You might also like