Fruit Color Recognition Based on Multiple Classifier Combination 1

In this study, we propose a method of fruit color recognition based on multiple classifier combination. Firstly, color type is defined based on human eye sensation and then HSV color space and classification algorithms are adopted via statistical of large fruit samples. For distinguished fruit color types, support vector machine algorithm is used for classification. After generating prior probability and class conditional probability, maximum posterior probability is computed based on Bayesian classifier to identify color types for less-distinguishable colors type. At Last support, vector machine and Bayesian classifier are combined to form a decision tree, which is then simplified to binary classifier problem. Experiment results show that average recognition rate of fruit color is about 86.5%.


INTRODUCTION
With the vigorous development of the food industry in recent years, to strengthen the security monitoring for fruits, many cities started to set up food camera system (Dimitrakopoulos and Demestichas, 2010).When fruits passed the food camera system, induction coil or other sensors would be triggered to immediately take photos of the fruits to record related image data of the fruits.In the initial stage, images taken at the food camera system had to be absolutely artificially recognized and classified, which was too inefficient.With the development of technology, new technologies such as computer vision and pattern recognition have been applied to food camera system.For example, automatic species plate recognition technology (Lee et al., 2013) could achieve automatic recognition of fruits involved in insecure activities and insecures by computer's automatic recognition of species plates, which included retrieval, check and trajectory tracking (Janowski et al., 2014).However, there were also defects on detecting and recognizing fruits simply by species plates, such as blurred shots, stained species plate or fake species plates used by insecure fruits, which would lead to the failure or nullity of species plate recognition (Peng et al., 2012).At present, some researchers have begun to resort to computer vision technology to extract more fruit characteristics, such as fruit type, fruit color, fruit logo and shape of fruit headlight, etc.Compared with other characteristics, color could be remembered instantly when emergencies happened.Therefore, we could directly use computers to make a fast and exact automatic recognition of fruit color.It was undoubted that it would be of great practical significance and could be widely applied to inspection of food accident.
Color was a very distinguishing characteristic of fruits, but it was also apt to be disturbed by external environment factors such as light, weather and camera image sensor devices, which would affect the final fruit color.Besides, people's subjective psychology and consciousness would also exert an effect on human eye's perception of color.To our best knowledge, the present body color recognition algorithm generally referred to a means, in which the body image was transferred from the primary RGB colors space to other color space that was more suitable for human visual characteristics and then some pattern recognition algorithm was applied to classify fruit colors based on the specific color space.For examples, Li G.J used a relatively HIS color space and the standard color difference formula to recognize fruit color, which realized a higher color recognition rate (Li et al., 2004).Jing N made a comparison among five kinds of color spaces-RGB, HSV, YUV, CMY and CIE-Lab and it was shown that CIE-Lab color space was more suitable for color recognition to improve recognition accuracy and robustness (Jing, 2007).

MATERIALS AND METHODS
Early warning of food safety is preventive measures for safety, the aim of early warning system is to guarantee food quality as well as safety, so as to help

Region-of-Interest (ROI) selection:
To accurately extract and recognize fruit colors, we should firstly localize color region to find the most suitable region.By observing images of fruit samples, we could see that fruit hood was covered by a large area of fruit paint with a pure color, which could be selected for detection.This study took a fixed region of the experiential scouting rectangular box as color recognition region by using the initial contour of the fruit (Fig. 1 x, y, rect w and rect h were respectively width and height of rectangular box; width and height were respectively width and height of the image.As for most of the fruits, the rectangular box was inside engine hood, as shown in Fig. 2. The mean values of color were selected for statistics and recognition.

Characteristics of the fruit color:
Through observation, fruit color possessed the following characteristics: • Some colors were of a high frequency (high possibility) such as black and white.• As for some infrequent colors or those colors under the low light, it was also hard for human eyes to recognize them.• The recognition of fruit colors was quite subjective because different people may make different judgments of colors.
Considering the several characteristics of color, limiting conditions should be added artificially.Firstly, fruit colors would be classified by human eyes, in which dividing them into seven standard categoriesblack, white (including silvery white), red, blue, gray (including dark gray), green and yellow.Since there were great color distortions of images at night, this study only counted and recognized fruit colors in the daytime, temporarily excluding images taken at night.When the samples were classified by human eyes, the colors that could be instantly distinguished without hesitation were classified into the above standard Fig. 2: Two-dimensional spatial distribution of HS-value of samples classes, while colors that could not be quickly distinguished were classified into unknown classes.As for each color, in order to avoid different people's subjective recognition of the color, the same color was classified by many people.And the fruit color could be classified into a certain standard class only when all the people considered it as a certain color.

Statistic regularity of fruit color:
By performing a large number of statistics of the above standard colors in different color spaces, we found that the color values of samples were clustered best in HSV space, especially H-value, as shown in Fig. 1.
According to the statistics, V-value of color value in HSV space greatly fluctuated without any regularity and was valueless statistically.Therefore, we can draw the distribution of each color for H and S value, as shown in Fig. 2.

RESULTS AND DISCUSSION
According to Figure 1 and 2, yellow, green, blue and red were clustered well and distributed in H-S plane, while there was high coincidence degree in other colors.In addition, the distribution of H-values of most colors obviously conformed to Gaussian distribution, which indicated that the distribution function of conditional probability was known.Therefore, this study designed different classifiers for the classification of different colors according to characteristics of colors and finally designed combined classifiers to improve recognition efficiency and accuracy.
Recognition based on SVM: Support Vector Machine (SVM) was an important algorithm theory based on VC Dimension which was firstly proposed in Cortes and Vapnik (1995) based on statistical learning theory and structural risk minimization principle.The following Fig. 3: The binary classification of samples Figure 3 was the schematic diagram of two-dimensional linear classification.The middle solid line was classification hyperplane, which could make the distance or margin maximum between separated sample points and hyperplane maximal through SVM.The sample vector (on the dotted line) which was closest to hyperplane was called support vector and a set of support vectors could uniquely determine one hyperplane.
Training set was divided into classes: . Discriminant formula of the classifier could be defined as: It was the corresponding equation of decision hyperplane.If the sample was a linear inseparable sample, then a slack variable i ξ could be introduced to transfer computing optimal hyperplane to convex quadratic programming.The constraint conditions were: The aim of optimization could be converted to: C referred to constant value that was called the penalty factor.By using Lagrange Multiplier Method, the constrained problems in Formula (3) and ( 4) could be converted to search extreme: (5) a i referred to Lagrange Coefficient and referred to the kernel function of SVM.
As for red, green and blue samples in Fig. 4, it indicated that H and S value was clustered well and there was less overlapped region between the regions of these three colors and those of others.Therefore we could use SVM algorithm for classification.Firstly, we could normalize color values to [-1, 1], eliminate the difference of magnitude of data and then used radial basis function

CONCLUSION
Fruit color recognition was an important auxiliary means of the fruit recognition system, playing an important role in food investigation, food management and fruit management system.This study sought for typical color regularity through the color regularity statistics of a large number of samples, designed SVM classifier and Bayesian classifier according to the color regularity and combined classifiers to accelerate the speed of detection and recognition, which had achieved some effects.However, due to the subjectivity in the process of color classification and the complexity of fruit colors (body color would change with the variation of illumination condition and environment), there remained big problems in fruit color recognition at the food monitoring system.Further in-depth investigation on fruit images at night remained to be performed.
Fig. 1: Histogram of H-value of each color people take preventive coping strategies for the safety risk of food in advance, by the means of releasing information, communication, prediction, controlling and avoiding risk and so on.
Fig. 4: Results of binary classification of colors based on SVM algorithm out binary classification of red, green and blue which were better clustered.The results were shown in Fig.4: left-hand plot showed two kinds of samples which were to be classified using two different color points and right-hand plot showed the results of classification.The border between green and red was classification hyperplane and sample points circled by black were support vectors.