• Article • Previous Articles     Next Articles

Software Design of Machine Vision On-Line Detection of Walnut Size

GUO Zheng;SHI Jian-xin;ZHOU Jun;CAI Jian;LIU Hang   

  • Received:2017-03-25 Revised:2017-03-25 Online:2017-03-25 Published:2017-03-25

机器视觉在线检测核桃大小软件设计

郭政;史建新;周军;蔡建;刘航   

  1. 新疆农业大学机械交通学院,乌鲁木齐,830052

Abstract: [Objective] To design a kind of software which can grade the size of walnut online by machine vision.[Method]In this paper,the Daheng USB2.0 Industrial Camera was used to obtain the RGB image of walnut on-line detection,and the interface of program was developed by VS2010 to convert the image data and preprocess,which could obtain the contour of image.By using OpenCV image moment calculation principle to extract walnut dimensions data,the software could provide different levels of signal for the lower computers to control solenoid valve action.[Result]The software displayed the images before and after the processing and realized the optimization of image acquisition and the manual adjustment of segmentation threshold.[Conclusion]The walnut size software based on machine vision can detect walnut with different sizes and send out grading signal accurately.

摘要: [目的]设计一种可以利用机器视觉对核桃大小进行在线分级处理的软件.[方法]通过配置大恒USB2.0工业相机,实时获取核桃在线检测时RGB图像,利用VS2010开发出界面程序对采集到的图像源数据进行格式转换和预处理,获得轮廓图像.利用OpenCV的图像矩计算原理提取核桃外形尺寸数据,为下位机控制板提供等级信号控制不同等级电磁阀动作.[结果]软件可以同步显示处理前后的图像,实现了图像优化采集和分割阈值手动调节.[结论]基于机器视觉在线检测核桃大小软件可以判定不同外形尺寸大小的核桃,可以将分级信号准确送出.