Aiming at the problems that traditional manual rice quality inspection is time-consuming, labor-intensive, and prone to poor consistency in results due to inspectors’ subjectivity and regional evaluation standards, making it difficult to meet large-scale and standardized detection needs, a machine vision-based rice appearance quality inspection system was developed for grade classification in accordance with national standards. The system first preprocesses images by converting them to grayscale with a weighted-average method and removing noise via median filtering. It then segments and individualizes individual grains with fixed-threshold segmentation and Watershed algorithm. Finally, phenotypic parameter extraction and quality grades are determined with the YOLOv8s model. A total of 100 sets of rice samples (143 grains per set) were divided into one training set (70 sets), one validation set (20 sets), and one test set (10 sets). With manual inspection results as the control, the appearance quality of the rice samples was inspected and graded. The results showed that: 1) Manual inspection yielded a head rice rate of 59.8%, brown rice rate of 78.1%, moldy grain rate of 4.32%, chalkiness rate of 11%, and graded the rice as Grade 2 indica rice. The vision system returned 59.1%, 77.3%, 4.2%, and 12%for the corresponding indicators, respectively, with the same grade, confirming a high consistency in core indicators. 2) The system matched the manual method grade in 93 of 100 samples, achieving an average accuracy of 93%. In conclusion, this system effectively improves detection efficiency and precision, and can be widely applied in scenarios such as batch detection in grain reserves, online monitoring in rice processing enterprises, and screening in agricultural scientific research and breeding.
光环境调控单元由LED条形光源与背光板构成,采用双侧补光与底部背光的协同设计:暗箱内部相机左右两侧对称布置2 根LED条形光源,光源光强连续可调,照射方向经优化布置以形成均匀漫反射光场;暗箱底部嵌入规格为400 mm×460 mm 的LED背光板,与玻璃材质载物台形成透射光通道。通过漫反射光与透射光的叠加,强化稻米样本轮廓边缘与内部缺陷的灰度差异,为后续图像分割与特征提取提供基础条件。承载单元以抽屉式透明玻璃载物台为核心,配套尼龙滚轮实现辅助功能。玻璃材质可保障背光板光线充分穿透;载物台采用导轨式安装结构,下方装配的尼龙导向滚轮能降低抽拉过程中的摩擦阻力,同时借助惯性作用促使样本自然平铺,避免颗粒重叠现象。
LiuZ H, TianF M, RenZ Q. Current status and trend of research on rice freshness testing methods [J]. Agricultural Machinery Using & Maintenance, 2025(7): 77-80, 112 (in Chinese)
ChenS, WangH, WuH R, LiX F, HuangY L, ZhangC H. Research progress on influencing factors, related genes and improvement approaches of rice quality[J]. China Seed Industry, 2025(8): 8-13, 18 (in Chinese)
HuX Q, LuL, ZhangW X, MouR X, ChenM X. Development of standard of cooking rice variety quality in China and its influence on rice quality improvement[J]. China Rice, 2022, 28(5): 133-138 (in Chinese)
[11]
LingwalS, BhatiaK K, TomerM S. Image-based wheat grain classification using convolutional neural network[J]. Multimedia Tools and Applications, 2021, 80(28): 35441-35465
[12]
KiratiratanaprukK, TemniranratP, SinthupinyoW, PrempreeP, ChaitavonK, PorntheeraphatS, PrasertsakA. Development of paddy rice seed classification process using machine learning techniques for automatic grading machine[J]. Journal of Sensors, 2020, 2020(1): 7041310
[13]
Dhakshina KumarS, EsakkirajanS, BamaS, KeerthiveenaB. A microcontroller based machine vision approach for tomato grading and sorting using SVM classifier[J]. Microprocessors and Microsystems, 2020, 76: 103090
ZhangX Y, WangY J, LiuR X, ShenB H, WangJ Y, YanY L, KangD M. Application of near-infrared spectroscopy technology to analyze protein content in single kernel maize seed[J]. Journal of China Agricultural University, 2017, 22(5): 25-31 (in Chinese)
[18]
DíazE O, IinoH, KoyamaK, KawamuraS, KosekiS, LyuS X. Non-destructive quality classification of rice taste properties based on near-infrared spectroscopy and machine learning algorithms [J]. Food Chemistry, 2023(429): 136907
ZhaoX, ZhengS L, NiuX Y, CaoJ K, ChenH, ZhaoZ L. Shelf life identification and quality analysis of golden delicious apples based on hyperspectral imaging and near infrared spectroscopy[J]. Science and Technology of Food Industry, 2025, 46(11): 302-312 (in Chinese)
ZhangW R, DuY F, LiX Y, LiuL, WangL Z, WuZ K. Online detection method of corn kernel quality based on FSLYOLO v8n[J]. Transactions of the Chinese Society for Agricultural Machinery, 2024, 55(8): 253-265 (in Chinese)
WangX F, LiuW, WuH X, ChenH, ZhangL T, PanZ Y, HeX Y. A method of rice seed classification based on deep learning[J]. China Rice, 2024, 30(5): 49-56 (in Chinese)
[25]
ZareiforoushH, MinaeiS, AlizadehM R, BanakarA. Qualitative classification of milled rice grains using computer vision and metaheuristic techniques[J]. Journal of Food Science and Technology, 2016(53): 118-131
[26]
ZhangW W, MaH M, LiX H, LiuX L, JiaoJ, ZhangP F, GuL C, WangQ, BaoW X, CaoS N. Imperfect wheat grain recognition combined with an attention mechanism and residual network[J]. Applied Sciences, 2021, 11(11): 5139
[27]
HuY D, DuY M, SanL N, TianJ. Research on rice grain shape detection method based on machine vision[C]//2019 5th International Conference on Control, Automation and Robotics (ICCAR). 2019, Beijing,China. IEEE, 2019: 300-304
[28]
FabiyiS D, VuH, TachtatzisC, MurrayP, HarleD, DaoT K, AndonovicI, RenJ C, MarshallS. Varietal classification of rice seeds using RGB and hyperspectral images[J]. IEEE Access, 2020, 8: 22493-22505
WangX Y, MaY B, PanX, YanW H. Forage seed recognition model based on hierarchical convolutional neural network[J]. Journal of Inner Mongolia Agricultural University, 2021, 42(5): 89-93 (in Chinese)
ChenW D, LiW Y, LiZ. Research progress on the quality detection of grain based on machine vision[J]. Journal of Henan University of Technology, 2022, 43(6): 118-128 (in Chinese)
[33]
阮秋琦. 数字图像处理学[M]. 北京:电子工业出版社, 2001
[34]
RuanQ Q. Digital Image Processing[M]. Beijing: Publishing House of Electronics Industry, 2001 (in Chinese)
[35]
马丽霞.基于机器视觉的大米外观品质判别研究[D]. 哈尔滨: 哈尔滨理工大学, 2016
[36]
MaL X.The Research for rice appearance quality judgment based on machine vision[D]. Harbin: Harbin University of Science and Technology, 2016 (in Chinese)
[37]
许永健. 基于机器视觉的大米加工品质在线检测及反馈控制研究[D]. 镇江: 江苏大学, 2021
[38]
XuY J. Research on online inspection and feedback control of rice processing quality based on machine vision[D]. Zhenjiang: Jiangsu University, 2021 (in Chinese)
[39]
LiaoJ, WangY, YinJ N, LiuL, ZhangS, ZhuD Q. Segmentation of rice seedlings using the YCrCb color space and an improved otsu method[J]. Agronomy, 2018, 8(11): 269
[40]
GB/T 1354—2018大米 [S]. 北京:中国标准出版社, 2018
[41]
GB/T 1354—2018 Milled rice [S]. Beijing: China Standard Press, 2018 (in Chinese)
[42]
GB/T 21719—2008稻谷整精米率检验法 [S]. 北京:中国标准出版社,2008
[43]
GB/T 21719—2008 Method for determination of head rice yield of paddy [S]. Beijing: China Standard Press, 2008 (in Chinese)
GB/T 5496—1985-method for inspection of yellow rice grains and cracks Inspection of grain and oilseeds[S]. Beijing: China Standard Press, 1985 (in Chinese)
[46]
GB/T 17891—2017优质稻谷 [S]. 北京:中国标准出版社,2017
[47]
GB/T 17891—2017 High quality paddy[S]. Beijing: China Standard Press, 2017 (in Chinese)