Professional Documents
Culture Documents
Y.-N. Wan
National Chung Hsing University, Dept. of Agricultural Machinery Engineering, 250 Kuokwang Road, Tai-Chung, Taiwan,China Fel: +886-4-22857585, Fax: +886-4-22879351
Mail: ynwan@nchu.edu.tw
Abstract: Automatic grain quality inspection using machine vision provides not only quick but also objective, consistent and quantitative measurement. An efficient automatic grain quality inspection system using computer vision associated with grain quality inspection software was developed. Sixteen parameters relating to rice appearance characteristics were used to categorize rice kernels into 13 inspection categories. In this study, learning mechanism was built into the system to increase its smartness to help the parameters preparing and sorting precision tuning. Three classifying methods namely range selection, neural network and hybrid algorithms were implemented in the inspection software. According to tests, the neural network method needed about 20 minutes compared to the range selection method needed about 6 hours to set the classification parameters. The hybrid method needed about 40 minutes to set the classification process and achieved the same inspection accuracy as that of the range selection method. Results indicated that 90.9% of the rice kernels sorted by the system were consistent with those sorted by a human inspector, and the average processing speed was over 1200 kernels/minute.
1 Introduction
Rice is an important staple food in Asia, and high-quality rice with mature, plump, clear, and undamaged kernel appearance is always more valued by consumers. Rice quality inspection by humans relying upon the naked eye is neither objective nor efficient. Impartial inspection may sometimes err as a result of inexperience, or inspection may be deliberately shifted out of sympathy for the producers. We have developed an automatic grain kernel handling system that can consecutively present over 1296 singularized kernel images per minute for machine vision inspection (Wan, 2002). A continuation of the research, investigates aspects associated with the performance of the automatic quality inspection system for evaluating various rice appearance characteristics. A Windows-based software program for rice quality inspection was developed to facilitate machine operation, preparation of grading parameters, and classification accuracy tuning (Wan, et. al, 2002). However, rice quality has multi-dimensional attributes and many of them are subjective, thus to perform complex adjustment of the sorting parameters for a variety of rice became a complicated task. In this study, a learning mechanism was built into the system to increase its smartness to help the parameters preparing and sorting precision tuning. Three classifying methods namely range selection, neural network and hybrid algorithms were implemented in the inspection software. The performances of inspector machine operation, preparation of grading parameters and classification accuracy tuning using this system with different sorting algorithms were studied. The rice quality inspection and sorting performance of the smart system as compared with results of human inspection was measured.
computer of the image-processing unit. The computer segregated the kernel images from the background, provided a recognition process, and transferring the final sorting results to the machine controller. In the discharging section, the controller signaled each corresponding pneumatic valve to eject the kernels from the carrying holes into collection containers. An interface protocol was developed between the inspection machine and the image-processing unit to coordinate their concurrent activity. As shown in Figure 1, a Sony XC-711 color CCD camera was used on the first (right) photographic section to examine kernels illuminated from above. A Sony XC-75 black and white CCD camera was used on the second (left) photographic section to inspect cracked kernels illuminated from below. They sent NTSC (National Television Standards Committee) signals to a Coreco Oculus-Tci image frame grabber that had a resolution of 640(H) x 480(V). A PentiumII-350 MHz personal computer was used for image processing, quality recognition, and machine operation. Histogram and threshold methods were used to separate each kernel from its background. A photographed image, containing up to 24 matrix-positioned kernels, was processed to obtain each kernel image for parameter calculation (Wan, 2002). The boundary of each rice kernel was traced and described by an eight-direction chain code. Fundamental grain image-processing and parameter calculation functions were developed in C and compiled into a dynamic link library (DLL). The grain quality inspection windows, as shown in Figure 2, for sorting parameter preparation and machine operation were developed in Visual Basic to facilitate the design of a graphical and user-friendly interface. The windows display three images of kernels lit overhead, lit underneath and categorized images, together with a table showing information of total kernels processed, the system performance, and the number of categorized kernels in each category.
1. Feeding section 2. CCD cameras 3. Light sources 4. Discharging section 5. Conveyer belt 6. Shielding plate 7. Machine controller 4 6 5 2 3
Hopper
Grain images
Inspection machine
Valves
RS-232
a kernel, kernel area of image illuminated from below (B-area), area ratio of kernel illuminated from below to overhead (A-ratio), and average gray-level of kernel illuminated from below (transparency). Images of cracked kernels illuminated from below had a high gray-level difference on the two sides of a fissured line. A slim rectangular searching frame seeking out crack along kernel long axis, and the MGLD between adjacent frames was calculated as an inspection parameter for detecting cracks.
Dead-g Dead-w Damaged Off-type Broken Chalky-w Chalky-g Cracked Immature-w Immature-g Sound Sound-g Paddy g: Green w: White
Normalized
L/W
Gs
Bs
B/R
G/R
Ch Ua Ar
Parameters
A: area, P: perimeter, C: compactness, L/W, R: red, G: green, B: blue, Gs: green s.d., Bs: blue s.d., B/R: blue/red, G/R: green/red, Ch: chalky, Ua: U-area, Ar: A-ratio, T: transparency, M: MGLD
447
93.8% and 93.0%, respectively. The category accuracy of chalky, cracked and sound kernels using the hybrid method were 91.6%, 88.9% and 96.9%, respectively. The sorting variance for 10 tests using 20,000 random sampled rice kernels and the hybrid method ranged between 0.03% and 0.16%. The variance in each rice category was small. The average processing speed for brown rice quality inspection in this system was over 1200 kernels/minute compared to human inspection of about 60 kernels/minutes. Using the range selection method, experienced inspector took about 6 hours to complete the parameter adjustment process. The range selection method was less flexible and required much more work to tune up the inspection parameters. The neural network method proved most convenient. After the rice sample images were stored in the control computer, following the processes of neural network training and then parameter setting in the inspection software, most inspectors could complete the classification preparing process in 20 minutes and achieved the similar inspection accuracy as shown in Table 1. Compared with the neural network, the hybrid method required an additional 20 minutes to set the classification module. The hybrid method employs less (in the test only one parameter) parameters to separate the appearance-alike rice kernels. In terms of accuracy, stability and convenience of preparing sorting parameters for various grains, the hybrid method performed better on quality classification with the automatic vision inspection system.
References
1 Wan, Y.-N. 2002. Kernel handling performance of an automatic grain quality inspection system. Trans. ASAE 45(2):369-378. 2 Wan, Y.-N., C.-M. Lin, and J.-F. Chiou. 2002. Rice quality classification using an automatic grain quality inspection system. Trans. ASAE 45(2):379-388.
449