摘要
随着机器视觉技术的发展,工件图像配准在机器抓取、缺陷检测方面应用广泛,然而工件拍摄视点不同易造成图像匹配困难,这也成为工件图像匹配亟待解决和研究的问题。鉴于工件的独特轮廓形状,针对多视点造成的匹配问题,提出了一种基于轮廓曲率的工件图像配准方法。首先,在轮廓平滑处理中,针对多边形拟合道格拉斯-普克(DP)算法效果不佳的问题,利用滑动窗口平均方法对轮廓做了进一步处理,有效提高了轮廓平滑度;然后,在轮廓曲线重采样中,对采样点集进行了时间序列化,利用采样间隔设计了一种有效的重采样方法,实现了对重采样点的任意取值,并保持了轮廓点的密集情况;在建立全仿射曲率库中,设计了两步匹配策略,有效提高了匹配精度和效率;最后,针对曲率曲线匹配算法,将形状上下文(SC)引入动态时间规整(DTW)距离计算,解决了DTW算法存在的问题。研究结果表明:该方法能有效地对模板工件图像进行仿射转换,实现与目标工件图像的匹配目的;同时在匹配算法的三对比较实验中,利用SC-DTW匹配算法得到的转换图像与目标工件图像的差异只有4.8%、2.65%和3.92%,相较DTW的6.83%、4.03%和6.34%,以及归一化相关性匹配算法(NCC)的7.45%、6.39%和7.31%,其差异较小,表明该算法配准效果更好,能更有效地计算两条曲线的相似度,从而获得最佳曲率曲线样本,完成工件图像精准配准的任务。
With the development of machine vision technology,the workpiece image registration is widely used in the applications of machine grasping and defect detection.However,the different viewpoints of the workpiece are easy to cause the difficulty of image matching,and it becomes an urgent problem to be solved and studied.Considering the unique contour shape of the workpiece and the matching problem caused by multiple viewpoints,a workpiece image registration method based on contour curvature was proposed.Firstly,in contour smoothing processing,to address the issue of poor performance in polygon fitting Douglas-Pucker(DP)algorithm,the sliding window averaging method was used to further process the contours,and the smoothness of the contours was effectively improved.Then,in the resampling of contour curves,the time serialization was performed on the set of sampling points,and an effective resampling method was designed using the sampling interval to realize arbitrary values of resampling points and keep the density of contour points.When establishing a fully affine curvature library,a two-step matching strategy was designed to effectively improve matching accuracy and efficiency.Finally,for the curvature curve matching algorithm,shape context(SC)was introduced into dynamic time warping(DTW)distance calculation to solve the problems of DTW algorithm.The research results show that this method can effectively perform affine transformations on template workpiece images,achieving a match with the target workpiece images.Meanwhile,in the three comparative experiments of the matching algorithm,the transformed images obtained through the SC-DTW matching algorithm has only 4.8%,2.65%,and 3.92%differences from the target workpiece images.This is significantly less compared to the differences of 6.83%,4.03%,6.34%for DTW,and 7.45%,6.39%,7.31%for normalized cross correlation(NCC).This smaller discrepancy indicates that the algorithm has better registration effects and can more effectively calculate the similarity between two curves.Consequently,it can obtain the optimal curvature curve sample and achieve accurate workpiece image registration.
作者
金炎君
刘海萍
倪双静
朱熙豪
JIN Yanjun;LIU Haiping;NI Shuangjing;ZHU Xihao(Zhejiang Institute of Mechanical&Electrical Engineering Co.,Ltd.,Hangzhou 310051,China)
出处
《机电工程》
CAS
北大核心
2024年第10期1734-1746,共13页
Journal of Mechanical & Electrical Engineering
基金
浙江省“尖兵”“领雁”研发(攻关)计划项目(2022C01194)。
关键词
图像处理
轮廓提取
轮廓平滑方法
轮廓曲线重采样
工件图像配准
轮廓曲率
全仿射模型
动态时间规整
image processing
contour extraction
contour smooth method
resampling of contour curve
image registration of workpiece
contour curvature
fully affine model
dynamic time warping(DTW)
作者简介
金炎君(1979-),男,浙江绍兴人,高级工程师,主要从事智能制造大数据挖掘和图像处理方面的研究。E-mail:4871681@qq.com;通信联系人:倪双静,女,硕士,高级工程师。E-mail:335213925@qq.com。