中国农业科技导报 ›› 2024, Vol. 26 ›› Issue (11): 117-125.DOI: 10.13304/j.nykjdb.2023.0506

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

基于机器视觉与BA-BP的苹果分级系统研究

刘佳浩(), 高军伟()   

  1. 青岛大学自动化学院,山东省工业控制技术重点实验室,山东 青岛 266071
  • 收稿日期:2023-06-27 接受日期:2024-01-19 出版日期:2024-11-15 发布日期:2024-11-19
  • 通讯作者: 高军伟
  • 作者简介:刘佳浩 E-mail:1739451198@qq.com.
  • 基金资助:
    山东省自然科学基金项目(ZR2019MF063);山东省重点研发计划项目(2017GGX10115)

Research on Apple Grading System Based on Machine Vision and BA-BP

Jiahao LIU(), Junwei GAO()   

  1. Shandong Provincial Key Laboratory of Industrial Control Technology,College of Automation,Qingdao University,Shandong Qingdao 266071,China
  • Received:2023-06-27 Accepted:2024-01-19 Online:2024-11-15 Published:2024-11-19
  • Contact: Junwei GAO

摘要:

为实现水果的精确分级,以苹果为分拣对象,设计了基于机器视觉与BA-BP的苹果分级系统。首先,对实时采集的苹果图像进行预处理,得到轮廓图像,采用改进的Canny边缘检测算法提取苹果轮廓,使用最小外接圆法、颜色模型转换和灰度共生矩阵等方法提取苹果果径、色泽度、圆形度和纹理特征;其次,对采集的训练组数据进行滤波和归一化处理,将处理好的数据输入到BP神经网络模型中,再利用蝙蝠算法对BP网络模型进行优化,完成网络模型的训练;最后,将测试组数据分别输入到完成训练的BA-BP神经网络系统和BP神经网络系统中。结果表明,BA-BP神经网络系统识别准确率达到96%,性能明显优于BP神经网络系统,平均分级时间在1.25 s以内。因此,该系统满足实际生产中对于苹果分级的需求,有助于实现对于苹果品级的准确识别。

关键词: 水果分级, 机器视觉, 蝙蝠算法, BP神经网络

Abstract:

In order to achieve accurate fruit classification, an apple classification system based on machine vision and BA-BP was designed with apple as the sorting object. Firstly, the apple image acquired in real time was preprocessed to obtain the apple contour image. The improved Canny edge detection algorithm was used to extract the apple contour, and methods such as minimum circumferential circle method, color model conversion and gray scale co-existence matrix were used to extract the apple diameter, color, roundness and texture features. Secondly, the collected training group data was filtered and normalized, and the processed data was input into the BP neural network model. Then the bat algorithm was used to optimize the BP network model and complete the network model training. Finally, the data of the test group were input into the BA-BP neural network system and the BP neural network system. The experimental results showed that the recognition accuracy of BA-BP neural network system was 96%, the performance was obviously better than BP neural network system, and the average classification time was less than 1.25 s. Therefore, the system could meet the demand of apple grading in actual production and help to realize the accurate identification of apple grade.

Key words: fruit grading, machine vision, bat algorithm, BP neural network

中图分类号: