廖秉旺 林文煜



摘 要:为了实现多种工件的准确抓取和分类,设计了一款基于Halcon的工件视覺分拣系统。该系统利用标定算法对标定板进行标定,得到相机坐标系与机械臂坐标系间的仿射变换矩阵,利用基于形状的模板匹配算法对工件进行匹配,结合仿射变换矩阵得到工件的位置坐标。最后将工件坐标与种类信息发送到机械臂控制器,引导机械臂对工件进行抓取与放置。经过多次分拣实验,结果表明该分拣系统可实现对工件的准确分拣。
关键词:Halcon;视觉分拣;标定;模板匹配
中图分类号:TP242.62 文献标识码:A 文章编号:2096-4706(2021)01-0156-03
The Visual Sorting System of Workpiece Based on Halcon
LIAO Bingwang1,LIN Wenyu2
(1.School of Information Engineering,Guangdong University of Technology,Guangzhou 510006,China;
2.Guangzhou Yourai Intelligent Technology Co.,Ltd.,Guangzhou 510006,China)
Abstract:In order to grasp and classify many kinds of workpieces accurately,a visual sorting system based on Halcon is designed. The system uses calibration algorithm to calibrate the calibration target,which obtains the affine transformation matrix between the camera coordinate system and the manipulator coordinate system. Then,the template matching algorithm based on shape is adopted to match the workpiece,and the position coordinates of the workpiece are obtained by affine transformation matrix. Finally,the workpiece coordinate and type information are sent to the manipulator controller to guide the manipulator to grasp and place the workpiece. After many sorting experiments,the results show that the sorting system can realize the accurate sorting of the workpiece.
Keywords:Halcon;visual sorting;calibration;template matching
0 引 言
随着智能制造工业4.0概念的提出,工件自动化分拣作为智能制造中的重要一环,其相关技术也在快速发展。传统工业分拣机器人的分拣作业一般都是通过示教或离线编程实现[1],机器人的抓取方向和运动路径都是预先设定好的,待分拣工件需摆放在指定位置,否则机器人无法准确抓取工件。将机器视觉技术应用于工件分拣系统,能够提升工件分拣系统的柔性和效率[2]。Halcon是德国MVtec公司开发的一款机器视觉软件[3],由一千多个独立功能的函数和底层数据管理核心组成,内置的函数算子和样例涵盖了滤波、形态学处理、分类等功能,可用于快速开发工业视觉项目。本文基于Halcon和Visual Studio 2015进行编程开发,设计并实现了一套工件视觉分拣系统,可以对移动传送带上的各种工件进行有效的识别定位与分拣。
1 工件分拣系统组成
本系统的硬件部分由计算机、图像采集单元、物料传送单元和机械臂分拣单元组成。……