针对工业生产线上某产品上下盖自动装配的问题,运用运动控制理论与机器视觉相结合,搭建了一套模拟工业生产线产品装配系统;首先利用工业相机对进入视场的工件进行单帧图像采集,获取图像数据;然后利用OpenCV对数字图像进行处理,包括中值滤波、阈值分割、孔洞填充、边缘提取来获取数字图像的特征;之后通过质心法结合矩形拟合计算出工件的质心坐标和偏转角度;最后引导六轴机械臂抓取产品的时候能根据图像处理结果进行纠偏和补偿;该系统采用平面棋盘格标定板对工业相机进行了标定,并且在线进行了验证,实验结果表明,工件抓取和装配成功率为100%,满足工业现场的装配精度要求。
An assembly system is built based on motion control theory and machine vision to solve the problem of automatic assembling of upper and lower lid in industrial production line.Firstly,the industrial camera takes a photo when the workpiece goes into the field of view,and the image data is acquired.Then OpenCV is used for digital image processing,including median filtering,thresholding,holes filled,edge extraction,which help gain the image feature.Secondly,by the method of the centroid and the rectangular fitting,the centroid coordinate and deflection angle can be got.Finally,the data is used to correct the coordinate values of robot arm when the 6-axis robot arm grabs workpiece by image processing.A flat checkerboard calibration plate to calibrate the industrial camera is used,and is verified online.Experimental results show that the probability of workpiece grabbing and assembly success is up to 100%,and it can meet the accuracy requirements of industrial site assembly.