A computer vision system for rice kernel quality evaluation.
Article Type:
Technical report
Image processing (Technology application)
Image interpretation, Computer assisted (Methods)
Haptics technology (Usage)
Machine vision (Research)
Fuzzy algorithms (Research)
Fuzzy logic (Research)
Fuzzy systems (Research)
Grain industry (Quality management)
Grain industry (Technology application)
Sansomboonsuk, S.
Afzulpurkar, N.
Pub Date:
Name: Annals of DAAAM & Proceedings Publisher: DAAAM International Vienna Audience: Academic Format: Magazine/Journal Subject: Engineering and manufacturing industries Copyright: COPYRIGHT 2005 DAAAM International Vienna ISSN: 1726-9679
Date: Annual, 2005
Event Code: 310 Science & research; 353 Product quality Computer Subject: Fuzzy logic; Technology application
SIC Code: 0111 Wheat; 0112 Rice; 0115 Corn; 0116 Soybeans; 0119 Cash grains, not elsewhere classified
Geographic Scope: Austria Geographic Code: 4EUAU Austria

Accession Number:
Full Text:
Abstract: A computer vision system is developed for evaluating the quality of rice kernels. To finding the quality, which is determined by percentage of broken rice and percentage of adulterate rice, rice kernels are placed randomly on the plate in one layer. Some of kernels are touching one another. Touching kernel features consist of two forms: point and line touching. Therefore image analysis algorithms are developed to extract touching features. Fuzzy logic is used to organize and classify the class of each kernel by utilizing area, perimeter, and circularity and shape compactness as criterions. Concept of translucency is applied for viewing the adulterate of rice. The different rice varieties show different levels of intensity in image. By setting light intensity to 4500-4600 Lux, the results clearly show of shade difference for the different kind of rice. The overall results of image analysis for finding the percentage of broken rice and percentage of adulterate of rice give 92% in accuracy.

Key words: Image analysis, Touching feature, Shrinkage Operation, Object Recognition, Fuzzy Logic


In every year farmers produce more than 19 million tons of paddy in Thailand. These paddies will be transformed to milled rice, which should have the good appearance and quality for human consumption. Samples of rice are generally inspected before a rice mill or a rice bank buys un-husked rice from farmers to decide the quality of rice. The important factors for determination of the economic value of rice is the percentage of broken rice and the percentage of adulterate of rice (different in variety of rice). Traditionally, the percentage of broken rice is calculated by weighting method and the percentage of adulterate of rice is found by chemical testing method (Thai rice standard, Thairice Org.).

There have been many studies on use of image processing techniques for finding the percentage of broken rice kernel. For example, measuring degree of rice milling by using the variations of light intensities, (Fant et at., 1994), analyzing the shapes of brown rice and polished rice on a scanner (Sakai et al.,1991). Recently, an automatic kernel handling system is developed for inspection of grain kernels (Wan, 2002). Flatbed scanner was used to determine the size distribution and percentage of broken kernel. (Dalen, 2003). This required time and it is complicated to adjust the machine. Moreover the economic investment is still high.

To find the percentage of broken rice kernel has attracted many studies but there has not much research had done for finding the percentage of adulterate of rice.

Therefore in this paper we propose a machine based on vision, which is simple to operate and can work under the constraint that rice kernels are randomly placed and not pointing in any specific directions. Another characteristic equipment is that it can classify the adulterate of rice without using chemical testing method. In this paper the variety of rice samples selected, which have the same degree of milling, is Thai Jasmine rice (Pathumthanee1), white rice (Gor Kor 23) and stickle rice (Nan). These three varieties of rice have different translucent characteristic. Stickle rice is chalky kernels which are not translucent while jasmine and white rice are semi translucent kernels, meanwhile white rice has a bit opaquer than jasmine rice.


Fig.1a and 1b show image acquisition using both front and back lighting techniques. For back lighting technique, light source is quartz halogen lamps 50 Watts and fluorescent lamp is used for front lighting technique. A three chips charge couple device color camera (TK C1484 BEG, JVC) fitted with a zoom lens of 3.5 to 10.5 mm (TG 3Z3510, Computar) and a frame grabber board DT 3120, are used to construct the machine vision system. Background is made from six mm. thick of frost glass covered by black film. Working area is 16900 mm2 (442368 pixel resolution). All the vision algorithms are implemented by Microsoft Visual C++ 6.0 Language on a Pentium 4 personal computer.



ice kernels are randomly placed on background in one layer for image acquisition. The analysis consists of two main parts. First part is to find the percentage of broken rice which image is acquired from front lighting technique. Another part is to find percentage of adulterate of rice, in this part image is acquired from back lighting technique.

3.1. Image processing for finding the percentage of broken rice.

This process consists of five steps. The first is preprocessing step, high pass filter is applied to reduce noise and threshold level is set to 130 (in 0-255 scale) to segment the grain kernels from background. From image the features of kernel touching can be classified into two types: point touching and line touching. Shrinkage algorithm in the second step is run for segmenting touching kernels. After that Edge detection is performed to find region boundaries. In the fourth step kernel features (perimeter, area, kernel circularity and shape compactness) are calculated by using Chain code algorithm. In this research, the possible forms of individual and line touching kernels are evaluated. Finally the classification is done by using all measured and calculated by Fuzzy logic. These results are used to calculate the percentage of broken rice.

3.2. Image processing for finding the percentage of adulterate of rice

The experiments use back lighting technique for acquiring images. Light intensity in the chamber is set to the range 4500-4650 Lux. The difficult process of this algorithm is to eliminate kernels in image, which have different intensity levels in image by setting accurate threshold level. The accurate threshold value setting technique is being investigated.


Three varieties of rice are used in the experiments. The results are shown in Fig.2, (2a) is image after acquiring and filtering, (2b) is image from set threshold level =130, (2c) is from algorithm shrinkage and edge detection, (2d) is an image acquired from back lighting technique, after set threshold level 120 and 90 (2e) and (2g) are obtained. Finally (2f) and (2h) are image after shrinkage and edge detection algorithm. The results from manual inspection compared with image analysis are presented in Table 1. From manual inspection the percentage of broken rice and percentage of adulterate of rice (compared with jasmine rice) are 18 and 44.44 whereas from image analysis give 17.98 and 43.16. From the other experiments, it can be found that the algorithms perform satisfactorily in evaluating the percentage of broken rice and adulterate of rice with overall accuracy of 92%

The processing time requires about one minute and 30 second while a manual counting takes about four minutes. Thus the time required by automated counting and measuring compared to manual counting and measuring is 70% less.



In this paper, the image analysis algorithms are developed to segment and identify kernels for calculated percentage of broken rice and adulterate of rice. In the constraint the kernels are randomly placed in one layer and not pointing in specific directions. From the results of operation, it can be observe that the shrinkage operation works efficiently for separating the connecting part with point touching kernels. This shrinkage algorithm cannot separate the connection part of the line touching kernels. In addition, the faults in shrinkage algorithm may occur because the tiny kernel, which is smaller than 1/4 of full kernel, is eroded. Thus the result may contain errors. Another disadvantage is that size and area of each kernel will be different from the original kernels by the peeling of outer perimeter. The application of four and eight neighborhoods can be expeditiously used to detect the kernel edge. Based on chain code algorithm, size and shape features are determined for the recognition and classification. Fuzzy classification is used to classify kernels because of the degree of membership functions can provide more information about the confidence of class assignment. The results of viewing different variety of rice by using back lighting technique based on translucent concept show clearly shade difference of different kind of rice. The main key point of the successfully in the viewing result is to setting and equally distribute of light intensity to the area of background in chamber. From all results, it can be concluded that image analysis algorithms are efficient method to analyze the quality of rice. The main benefit of the image analysis is to reduce time (70% less), more reliability (97% in accuracy compared with manual results) and lower investment.


From the image, which is acquired from back lighting (as shown in (2d)), it can be see that the background intensity is still not equability. So that that the future works are to improve image algorithms to set the equable background of image and finding the accurate threshold level for each rice variety.


Fant,E., Casady, W., Goh,D., Siebenmorgen,T.: Grey-scale Intensity as a Potential Measurement for Degree of Rice Milling. Journal of Agricultural Engineering Research, Vol. 58. Silose Research Institute(1994) 89-97

Sakai,N., Yoneekewa,S., Matsuzaki,A.: Two-dimensional Image Analysis of the Shape of Rice and its Application to Seperating Varieties. Journal of Food Engineering, Vol. 27. Elesevier Science Limited(1996) 397-407

Wan, Y.N.,: Kernel handling performance of an automatic grain quality inspection system. Transaction of ASAE Vol 45(2). (2002) 369-377

Dalen, G.: Determianation of the Size Distribution and Percentage of Broken kernels of Rice Using Flatbed Scanning and Image Analysis. Food Research International Vol. 37. Elesevier Science Limited (2003) 51-58

Thai rice standard, Department of Agriculture, Ministry of Agriculture and Co-Operative, The Rice Inspection Committee of Board of Trade of Thailand, www.thairice.org
Table 1. The results from manual inspection compared with
image analysis

          Results                 Manual         Image
                                Inspection     Analysis

1. Amount of full kernel.           111           114
2. Amount of broken kernel.          25            25
3. Amount of Jasmine rice            75            79
4. Amount of White rice.             27            23
5. Amount of Stickle rice.           33            37
6. Time of processing.            4 min.        1 min.
                                                and 30
Gale Copyright:
Copyright 2005 Gale, Cengage Learning. All rights reserved.