中国农业科技导报 ›› 2018, Vol. 20 ›› Issue (3): 80-86.DOI: 10.13304/j.nykjdb.2017.0580

• 智慧农业 农机装备 • 上一篇    下一篇

基于机器视觉的苹果品质在线分级检测

石瑞瑶,田有文*,赖兴涛,古文君   

  1. 沈阳农业大学信息与电气工程学院, 沈阳 110866
  • 收稿日期:2017-09-04 出版日期:2018-03-15 发布日期:2017-11-20
  • 通讯作者: 石瑞瑶,硕士研究生,主要从事机器视觉技术在农产品品质检测方面的研究。E-mail:2569301681@qq.com。
  • 基金资助:
    辽宁省大型仪器设备共享服务项目(LNDY201501003);沈阳市大型仪器设备共享服务专项(F15-166-4-00)资助。

Development of Apple Intelligent On-line Inspection and Classification System Based on Machine Vision

SHI Ruiyao, TIAN Youwen*, LAI Xingtao, GU Wenjun   

  1. College of Information and Electrical Engineering, Shenyang Agricultural University, Shenyang 110866, China
  • Received:2017-09-04 Online:2018-03-15 Published:2017-11-20
  • Supported by:
    石瑞瑶,硕士研究生,主要从事机器视觉技术在农产品品质检测方面的研究。E-mail:2569301681@qq.com。

摘要: 目前苹果分级自动化程度较低,为了实现苹果品质自动、快速、准确分级设计了一套苹果智能在线检测分级系统。以寒富苹果为测试对象,采用机器视觉技术对苹果分级进行研究。采用阈值分割的方法分割苹果正面图像,逐像素遍历法提取苹果外部轮廓,通过计算其各点到重心的距离提取苹果大小特征,同时计算苹果横径与纵径比提取果形特征。采用支持向量机方法分割侧面苹果图像,计算苹果红色像素占苹果像素的比例提取颜色特征,利用Fisher统计识别的方法提取苹果缺陷。实现了整个分级系统的硬件搭建以及软件的功能,利用该系统对400个苹果样本进行了分级试验,结果表明该系统分级的苹果总体正确率达到95%。设计的基于机器视觉的苹果智能在线检测分级系统克服了传统分级方法的不足,加快了苹果品质分级自动化速度,对水果品质分级等领域有重要研究意义。

关键词: 机器视觉, 苹果分级, 逐像素遍历法, 支持向量机, 特征提取, 在线检测

Abstract: At present, the automation grading level of apple was lower. A set of apple intelligent online inspection grading system was designed to achieve an automatic, fast and accurate grading of apple quality. Taking the Hanfu apple as test object, this paper studied on apple grading by machine vision technology. The positive image of apple was divided by threshold segmentation method, and the external contour of apple was extracted by the pixel-by-pixel traversal method. The apple size feature was extracted by calculating the distance from each point to the center of gravity. At the same time, fruit shape features was extracted by calculating the ratio between apple transverse and longitudinal diameters. The support vector machine (SVM) method was used to separate the apples from both sides. Apple color characteristics were extracted by calculating the proportion of red pixels accounted for entire apple pixels, and the defective part was extracted by Fisher statistics. In this study, the hardware of the whole grading system and function of the software was realized. 400 apple samples were graded using this system, and the results showed that the total grading accuracy rate by this system was 95%. The design of this apple intelligent online inspection and grading system based on machine vision overcomed the shortcomings of traditional grading methods, accelerated the automatic degree of quality grading, and was of important significance in the field of studying fruit quality grading.

Key words: machine vision, apple grading, pixel-by-pixel traversal method, SVM, feature extraction, on-line detection