摘 要
本设计拟开发一套以单目视觉为基础的生产线传送带上工件位置和姿态识别的工件位姿测量系统。实验室中已配备相应的硬件,相机固定安装,与生产线传送带的相对位置不变,项目需设计单目视觉位姿识别算法,并实现采用单目相机进行工件的位姿识别的软件。本设计的要求在搜集和阅读单目视觉定位与识别文献资料的基础上,就目前国内外关于单目视觉的使用方式和相关算法进行归纳整理,总结各种方式与算法的特点和优劣,就存在的问题和发展前景进行分析,特别对传送带上的工件单目识别进行深入分析。
首先进行了视觉图像处理研究,由机器人平台正上方的摄像头捕获图像,采用中值滤波的方法进行图像滤波,直方图方法对图像进行增强,canny法对图像边缘检测和二值法图像分割,完成图像的预处理。其次对处理后的图像进行生产线工件位姿识别,提取图像特征,采用模板匹配的方法识别出目标工件。最后识别出的工件进行标定,图像中目标工件的位置决定了它在空间的位置。而对于分割后的二值图像,目标工件的中心位置与目标工件的质心相同,根据坐标计算公式求得质心位置坐标和角度值。由摄像头的线性模型标定目标工件的三维位姿,将结果反馈给执行模块,从而驱动关节正确运动,执行抓取工件操作。实验结果表明,所选择的算法简单实用,达到了预期的效果。
关键词:工业机器人;图像处理;生产线工件位姿识别;摄像头标定
ABSTRACT
This design is to develop a position and attitude measurement system based on monocular vision for the position and attitude of the work piece on the conveyor belt of the production line. The laboratory has been equipped with the corresponding hardware, the camera is fixed installed, and the relative position of the conveyor belt of the production line is unchanged. The project needs to design a single vision position and pose recognition algorithm, and to realize the software of the position and pose recognition of the workpiece using the monocular camera. On the basis of collecting and reading the literature of monocular vision location and recognition, the author summarizes the usage methods and related algorithms of monocular vision at home and abroad, and summarizes the characteristics, advantages and disadvantages of all kinds of methods and algorithms. Existing problems and developments The prospect is analyzed, especially the monocular recognition of the work piece on the conveyor belt.
Firstly, the visual image processing is studied. The image is captured by the camera directly above the robot platform, and the median filtering method is used to filter the image. Histogram method is used to enhance the image edge detection and binary image segmentation to complete the image preprocessing. Secondly, the processed image is recognized by the position and pose of the production line, the image feature is extracted, and the target workpiece is identified by template matching method. Finally, the identified workpiece is calibrated, and the location of the target workpiece in the image determines its position in space. For the segmented binary image, the center position of the target workpiece and the centroid of the target workpiece are obtained. In the same way, the coordinate and angle value of the center of mass are obtained according to the formula of coordinate calculation. The linear model of the camera is used to calibrate the 3D pose of the target workpiece, and the result is fed back to the execution module, which drives the correct motion of the joint and performs the operation of grasping the workpiece. The experimental results show that the proposed algorithm is simple and practical and achieves the desired results.
Keywords: industrial robot; image processing; position and pose recognition of production line; camera calibration
目 录
第1章 绪论 1
1.1 选题背景 1
1.2 课题目的及意义 1
1.3 课题内容 3
第2章 基于单目视觉的生产线工件位姿图像处理 4
2.1 图像增强 4
2.1.1 直方图增强 4
2.1.2 直方图均化 5
2.1.3 对比度增强 5
2.2 图像滤波 7
2.2.1 邻域平均法原理 7
2.2.2 中值滤波 7
2.3 边缘检测 8
2.3.1 微分算子法 8
2.3.2 拉普拉斯高斯算子 9
2.3.3 canny法 10
2.4 图像分割 11
2.4.1 灰度门限法 12
2.4.2 图像分割的方法 12
2.5 本实验中的图像处理过程 13
2.6 本章小结 14
第3章 基于单目视觉的生产线工件位姿生产线工件位姿识别 15
3.1 生产线工件位姿识别类型 15
3.2 生产线工件位姿识别的过程 16
3.3 生产线工件位姿识别的方法 16
3.3.1 生产线工件位姿识别的常用方法 16
3.3.2 生产线工件位姿识别的方法 16
3.4 图像的不变矩匹配 18
3.4.1 矩的概念 18
3.4.2 矩的有关变换 21
3.4.3 图像的不变矩特征表示 23
3.5 生产线工件位姿识别实验 24
3.6 本章小结 25
第4章 基于单目视觉的生产线工件位姿视觉定位 26
4.1 系统标定概述 26
4.2 摄像机标定 26
4.2.1 标定的原理 27
4.3 GRB-400机器人运动学分析 28
4.3.1 坐标空间定义 29
4.3.2 求解运动学逆解的方法 30
4.4 摄像机成像模型 35
4.5 视觉系统需标定的参数及方法 36
4.5.1 坐标变换原理 36
4.5.2 机器人臂抓取 37
4.6 本章小结 37
结 论 39
参考文献 40
致 谢 41
附录A:程序清单 42
附录B:外文翻译资料 47