-
摘要:本文基于三坐标测量机(CMM)设计了一套视觉检测系统,该系统能够对零件实际空间特征信息进行比较全面地提取。针对位于CMM平台上带有角点的零件,利用Harris算子提取从CMM三个不同方位获取的零件图像的角点。对于Harris算子提取到的角点,本文提出一种八链码搜索法和SUSAN区域法相结合的伪角点剔除方法,最后基于立体视觉的原理,提出“距离空间图”匹配算法,将以上3幅图像一一建立匹配关系。实验中多次改变零件在CMM中姿态时,多次实验数据表明本文的角点提取精度与真实角点间仅存在1~2像素的偏差,零件的定位误差为1~3mm。通过实验验证,角点匹配和定位的稳定性和精度满足要求,具有一定的抗干扰性和实用性。Abstract:In this paper, a set of visual inspection system is designed based on three coordinate measuring machine(CMM), and the new visual system can extract the actual spatial feature information of the parts. For the parts with corner which is on the platform of CMM, the Harris operator is used to extract corners in the images obtained from three different orientation of the CMM. For the corner points extracted by the Harris operator, this paper proposes a method of eliminating the false corners, which combines eight-chain-code false corner search method and SUSAN method. Finally, based on the principle of stereo vision, the "Distance spatial map" matching algorithm is put forward, and then the three images are matched one by one. Although the position and orientation of parts are changed for many times in the experiment, the experiment results show that there are 1-2 pixels difference between extracted corners and the real corner points, and the position error of parts is 1-3 mm. Through the experiment, the accuracy and stability of corner matching and positioning can meet the requirements, and with anti-interference and practicability as well as.
-
Key words:
- CMM/
- Harris operator/
- corner matching/
- stereo vision/
- distance spatial map
-
表 1相机内部参数
Table 1.Camera internal parameter
μ0/mm v0/mm f/mm k2 Camera1 658.884 533.363 16.193 040 0.000 289 Camera2 647.305 498.355 6.042 961 0.006 233 Camera3 647.598 498.715 16.235 531 0.000 288 表 2角点在各视图中的像素坐标
Table 2.Pixel coordinates of corners in each view image
Camera1(像素) Camera2(像素) Camera3(像素) 1 (544,957) - (758,840) 2 (533,805) (763,591) - 3 - (783,560) (791,690) 4 (815,723) (546,310) (526,631) 表 3相机与CMM之间的坐标转换关系
Table 3.Relation of coordinate transformation between camera and CMM
α/rad β/rad γ/rad tx/mm ty/mm tz/mm Camera1-CMM -1.503 283 0.064 378 -0.046 754 227.974 026 -1 050.507 167 -400.084 751 Camera2-CMM 0.044 251 -0.248 223 -1.523 188 308.677 97 870.639 171 30.065 223 Camera3-CMM -1.543 118 -0.080 176 -1.524 048 -1529.503 317 624.449 218 -522.936 725 表 4定位精度检测
Table 4.Positioning accuracy detection
计算坐标/mm CMM测量坐标/mm 误差/mm x y z x′ y′ z′ Δx Δy Δz 1 229.98 607.47 -752.80 228.26 608.13 -753.52 1.72 -0.79 0.72 2 229.13 607.06 -667.91 229.84 608.94 -668.76 -0.71 -1.88 0.85 3 232.87 602.95 -667.16 233.64 604.06 -668.52 -0.77 -1.11 1.36 4 402.91 777.03 -658.04 401.29 778.21 -658.92 1.62 -1.18 0.88 -
[1] 马一凡.防碰撞系统中零件识别研究[D].天津:天津大学,2014.MA Y F. Research on recognition of parts in anti-collision system[D]. Tianjin:Tianjin University,2014.(in Chinese) [2] 王怀瑜.防碰撞系统中体素相交检测算法的研究[D].天津:天津大学,2014.WANG H Y. Research on an algorithm of primitive intersection detection in an anti-collision system[D]. Tianjin:Tianjin University,2014.(in Chinese) [3] 刘书桂,赵金才,李建苹,等.智能坐标测量系统中零件位姿自动识别[J].天津大学学报,2006,39(10):1241-1246.LIU SH G,ZHAO J C,LI J P,et al.. Automatic recognition for position and orientation of parts in intelligent coordinate measuring system[J]. J. Tianjin University,2006,39(10):1241-1246.(in Chinese) [4] 马新辉,张国雄,王建利,等.智能三坐标测量机中零件位置自动识别系统[J].仪器仪表学报,2003,24(2):165-170.MA X H,ZHANG G X,WANG J L,et al.. Autamatic recognition for the position and orientation of parts in intelligent CMM[J]. Chinese J. Scientific Instrument,2003,24(2):165-170.(in Chinese) [5] 房超,王小鹏,牛云鹏,等.基于改进Harris算法的角点检测[J].计算机与数字工程,2011,39(5):142-144.FANG CH,WANG X P,NIU Y P,et al.. Corner detection based on an improved Harris algorithm[J]. Computer and Digital Engineering,2011,39(5):142-144.(in Chinese) [6] 乔警卫,胡少兴.三维重建中特征点提取与匹配算法研究[J].系统仿真学报,2008,20:400-403.QIAO J W,HU SH X. Research on feature point extraction and matching in 3D reconstruction[J]. J. System Simulation,2008,20:400-403.(in Chinese) [7] 黄凤山,刘恩福,方忆湘,等.基于智能三坐标测量机的零件位姿单目立体视觉识别[J].光学 精密工程,2013,21(5):1326-1332.HUANG F SH,LIU E F,FANG Y X,et al.. Single camera stereo vision recognization for parts pose based on intelligent three coordinate measuring machine[J]. Opt. Precision Eng.,2013,21(5):1326-1332.(in Chinese) [8] 许佳佳.结合Harris与SIFT 算子的图像快速配准算法[J].中国光学,2015,8(4):574-581.XU J J. Fast image registration method based on Harris and SIFT algorithm[J]. Chinese Optics,2015,8(4):574-581.(in Chinese) [9] 高晶,吴育峰,吴昆,等.基于角点检测的图像匹配算法[J].仪器仪表学报,2013,34(8):1717-1725.GAO J,WU Y F,WU K,et al.. Image matching method based on corner detection[J]. Chinese J. Scientific Instrument,2013,34(8):1717-1725.(in Chinese) [10] 程德志,李言俊,余瑞星.基于改进SIFT算法的图像匹配方法[J].计算机仿真,2011,28(7):285-289.CHENG D Z,LI Y J,YU R X. Image matching method based on improved SIFT algorithm[J]. Computer Simulation,2011,28(7):285-289.(in Chinese) [11] 全燕鸣,黎淑梅,麦青群.基于双目视觉的工件尺寸在机三维测量[J].光学 精密程,2013,21(4):1054 -1061.QUAN Y M,LI S M,MAI Q Q. On-machine 3D measurement of workpiece dimensions based on binocular vision[J]. Opt. Precision Eng.,2013,21(4):1054-1061.(in Chinese) [12] 田浩南,张叶.基于边缘及特征点匹配的立体图像质量评价[J].液晶与显示,2015,30(4):666-672.TIAN H N,ZHANG Y. Quality evaluation of stereo image based on edge and characteristic point matching[J]. Chinese J. Liquid Crystals and Displays,2015,30(4):666-672.(in Chinese) [13] 刘书桂,余飞,韩振华.基于OpenCasCade的虚拟三坐标测量机碰撞检测方法[J].纳米技术与精密工程,2016.LIU SH G,YU F,HAN ZH H. Collision detection of virtual coordinate measuring machine based on OpenCasCade[J]. Nanotechnology and Precision Engineering,2016.(in Chinese) [14] 张国雄.三坐标测量机[M].天津:天津大学出版社,1999.ZHANG G X. Coordinate Measuring Machine[M]. Tianjin:Tianjin University Press,1999.(in Chinese) [15] HARRIS C G,STEPHENS M. A combined corner and edge detector[C]. Proceedings of the 4thA Ivey Vision Conference,Manchester,UK,1988:147-151. [16] SMITH S M. Feature based image sequence understanding[D]. Oxford,UK:Oxford University, 1992. [17] 王付新,黄毓瑜,孟 偲,等.三维重建中特征点提取算法的研究与实现[J].工程图学学报,2007,3:91-96.WANG F X,HUANG Y Y,MENG C,et al. Research and realization of the feature point extraction algorithm in 3D reconstruction[J]. J. Engineering Graphics,2007,3:91-96(in Chinese) [18] HARTLEY R,ZISSERMAN H.计算机视觉中的多视图几何[M].安徽:安徽大学出版社,2002,8:216-217,178-179.HARTLEY R,ZISSERMAN H. Multiple View Geometry in Computer Vision[M]. Anhui:Anhui University Press, 2002,8:216-217,178-179.(in Chinese)