New algorithms for color classification with machine vision devices.
Buzera, Marius ; Olaru, Onisifor ; Uscatescu, Mihai 等
1. INTRODUCTION
Over the last few years a large amount of algorithms assessing
colour describers has been developed, yet most of them being hinted to
be used in classifying industrial products, while their adjustment to
the classification of vegetal products does not provide the best
results. Thus, in 1999, Baoping presents a part of the identification
and assessment algorithms of the colour describers, pointing out to
their importance in the automatic classification processes. In 2002,
Luzuriaga presents the disadvantages of measuring by colorimeters or
spectrophotometers and he also develops an assessment algorithm of the
colour of food items based on the analysis of areas. Still in 2002,
Laykin develops an automatic classification devices for vegetal products
on the basis of colour describer, all of that while valuing the mean and
standard deviation of all pixels in the product area. Sudhakara in 2002,
presents and validates a series of identification algorithms of colour
by using neural networks. A quick method of orange classification was
developed by Cruvinel in 2002, based on image processing with
correlation analysis in frequency domain while Nordan in 2007 validates
a series of classification algorithm of potatoes according to the shape,
colour, and analysis of faults via classification system. Buzera in 2008
developed a series of identification algorithms of the shape, colour and
size of the products by using processing techniques of images, fuzzy
algorithms and neural networks, these algorithms being validated by
carrying out an automatic classification device and by using machine
vision techniques. A few results and conclusions to implementing and
testing the mean and the standard deviation algorithm as well as the
analysis of the colour histogram average, are presented throughout the
article.
2. THE EXPERIMENTAL DEVICE AND THE ANALYSIS PROCESS DESCRIPTION
The device used during the tests, and presented in Fig.1, allows
for both vegetal or industrial products classification having a shape
factor close to 1, and using machine vision techniques.
The images are acquired through the intermede of two cameras CCD (CV1 and CV2) and transmitted to a calculus system (SC), which is to
convey comends to the execution fields of the installation via a command
circuit (CCM) of the engines, after taking out the shape describers and
assessing them.
[FIGURE 1 OMITTED]
The device ensures the classification of the products into three
classes but if new patterns are being added, the number of classes may
increase by two. Two categories' of products have been used for the
tests: balls and tomatoes. Thus, 30 tomatoes and 30 balls have been
chosen, 10 of them being red, other ten green ones, 10 pink. Their
affiliation to the 3 classes was carried out by a human operator, the
products being placed by human hand and one by one on the roll conveyor.
The first algorithm tested was the one analyzing hue histogram average,
followed by that of determining mean and standard deviation, while the
accuracy was hinted for the both of them.
3. PRESENTING THE ALGORITHMS
The two images acquired by the cameras are turned from RGB (red,
green, blue) format to HIS (hue, intensity, saturation) format, and in
order to point out the main features in classification, the hue
histogram is to be used.
The tests carried out have pointed out have pointed out to the fact
that this pattern introduces an considerable decrease of the calculation
time by reducing the three dimensions of the RGB format to a single one:
the H--hue and, more over, the hue becomes invariant to the light
intensity alterations.
In order to divide the images so as to suitably identify the area
of the products under analysis, a specific algorithm based on the
identification of the optimum level on the basis of assessing the weight
mass of the image, has been used.
The algorithm assessing the average of the histogram projected
triggers the caring out of a segmentation of pixels belonging to the
product, that for an identification of the analysis describers of
colour, while the maximum value MAX, corresponding to the product,
together with the value of the abscise vector X are to be extracted from
the histogram vector obtained. In order to assess the homogeneity of
colour, the average of the pixels values from the nearby of the maximum
value identified is to be used, as one can easily notice in Fig.2. Thus,
the X value points to the main colour of fruit, while MAX1 points to the
frequency of its appearance.
[FIGURE 2 OMITTED]
Both X value and MAX1 value are determined by tests, thus setting
the variation values for each class of products. Taking into
consideration the high amount of parameters in view, the describers
obtained are provided to a fuzzy decision block, developed on the basis
of a function with trapezoidal affiliation. The mean and standard
deviation algorithm is simply and suppose the calculation of the average
and the standard deviation for all pixels belonging to the product from
the image acquired, while the variation fields for the three classes
have been identified through tests on similar products.
4. RESULTS
In order to test the algorithms proposed 30 tomatoes and 30 bills
belonging, to the same type as those used during the training period
have been chosen.
The main parameters hinted during the testing of the two algorithms
were the precision of the classification as compared to the speed of the
conveyor, as well as the classification speed. The algorithm based on
the calculation of the average of the histogram provides very good
result allowing for a quick a correct identification of variation field
for each class as one can also see in Fig.3.
[FIGURE 3 OMITTED]
As one can notice, the max1 value was found and refound in the
colour field identified during the training period. Thus, the tests
carried out at various speeds of the conveyor, have allowed for setting
an accuracy in the classification of tomatoes of 97%. As one can also
see in table 1 the procent of 90% in the classification of pink tomatoes
is mainly due to the choice of a too little training set of products.
For balls, where the colour is much more homogeneous, the classification
accuracy is 100%.
Also for the mean and standard deviation algorithm, the results are
good, the accuracy is 90% for tomatoes and 100% for the balls, as one
can notice from table 2.
5. CONCLUSIONS
The tests and experiences carried out have pointed out to the
following conclusions:
--any of the algorithms are not influenced by the speed of the
conveyor, thus providing results irregardless of its speed;
-the mean and the standard deviation algorithm imply a low amount
of calculus, it is faster, but it doesn't provide enough
information for the analysis of the hue homogeneity of vegetal product.
Also, a high amount of hues of such a product depending on the
environment may cause real problems to the product. On the contrary it
is but very efficient in the analysis of the colours of the industrial
products, because the homogeneity is a much higher one in this case.
--the calculation algorithm of the histogram average is rather easy
to implement and it also provides good results, irregardless of the
variation degree of the colours of the vegetal products from a set, but
it depends a lot of the representativity of the set of products chosen
for the training, in order to identify the variation fields of the
colour for each class of products. Plus, this algorithm introduces an
invariance to the sudden alteration of the values of the hue duet o the
light modifications.
--the fuzzy technique provides much better results than the
classical decision algorithms, especially if their amount and variation
degree is a very high one.
6. REFERENCES
Baoping, J. (1999). Non-destructive Technology for Fruits Grading.
International Conference on Agricultural Engineering, Beijing
Buzera, M.; Prostean, G. & Stefan, C. (2008). Assesment
techniques of the products on the basis of shape analysis , The 19th
International DAAAM Symposium, Viena
Buzera, M.; Groza, V.; Prostean, G. & Prostean. O. (2008).
Techniques of Analysing the Colour of Produces for Automatic
Classification, 12th IEEE International Conference on Intelligent
Engineering Systems, Miami, Florida, USA, pp 209-214
Cruvinel, P. et al. (2002). Image Processing in Automated Pattern
Classification of Oranges. Trans. of the ASAE
Laykin, S.; Edan, Y.; Alchanatis V. & Regev, R. (2003).
Development of a Quality Sorting Machine Using Machine Vision and
Impact. Trans. of the ASAE
Luzuriaga, D.A. & Balaban, M. O. (2002). Color Machine Vision
System: An Alternative for Color Measurement American, The World
Congress of Computers in Agriculture and Natural Resources, Brazil,
pages 93-100
Noordam, C. et al. (2000). High speed potato grading and quality
inspection based on a color vision system, AGENG
Sudharkara, R. P.; Gopal, A.; Revathy, R. & Meenakshi K.
(2003). Colour Analysis of Fruits Using Machine Vision System for
Automatic Sorting and Grading. Journal Instrum. Soc. India. Vol.34(4)
284-291
Tab. 1. The variation of the classification accuracy
while using the calculus algorithm of the histogram
average
The speed The class The no. of The no. of The
of the products products accuracy
conveyor to be suitably
[m/s] tested tested
0,05--0,1 Red 10 10 100%
tomatoes
Pink 10 9 90%
tomatoes
Green 10 10 100%
tomatoes
Red balls 10 10 100%
Pink balls 10 10 100%
Green balls 10 10 100%
Tab. 2. The variation of the classification accuracy
while using the mean and standard deviation algorithm
The speed The class The no. The no. The
of the of balls of balls accuracy
conveyor to be suitably
[m/s] tested tested
0,05-0,1 Red 10 9 90%
tomatoes
Pink 10 8 80%
tomatoes
Green 10 10 100%
tomatoes
Red balls 10 10 100%
Pink balls 10 10 100%
Green balls 10 10 100%