现代制造工程 ›› 2024, Vol. 521 ›› Issue (2): 112-119.doi: 10.16731/j.cnki.1671-3133.2024.02.015

• 仪器仪表/检测/监控 • 上一篇    下一篇

基于RANSAC的圆拟合算法在螺纹孔检测中的应用

尚会超1, 韩鑫磊1, 嵇长委1, 彭向前2   

  1. 1 中原工学院机电学院,郑州 450007;
    2 湖南科技大学机电工程学院,湘潭 411201
  • 收稿日期:2023-03-03 出版日期:2024-02-18 发布日期:2024-05-29
  • 作者简介:尚会超,博士,教授,主要研究方向为机器视觉在线检测、机电测控技术及仪器、康复设备医疗及仪器。E-mail:sh_hc@126.com;韩鑫磊,硕士研究生,主要研究方向为机器视觉在线检测。E-mail:2571647197@qq.com

The circular fitting algorithm based on RANSAC and its application in pin detection

SHANG Huichao1, HAN Xinlei1, JI Changwei1, PENG Xiangqian2   

  1. 1 School of Mechatronics Engineering,Zhongyuan University of Technology,Zhengzhou 450007,China;
    2 School of Mechatronics Engineering,Hunan University of Science and Technology,Xiangtan 411201,China
  • Received:2023-03-03 Online:2024-02-18 Published:2024-05-29

摘要: 在视觉检测过程中,针对多残缺、多噪声圆周的拟合精度不佳的问题,提出了一种基于RANSAC的圆拟合算法。首先对图像进行边缘检测,使用基于Scharr算子的Canny算法可获得高质量的边缘分布图;使用霍夫梯度法在边缘分布图中对目标圆弧进行粗定位,并提取包含目标圆弧的点集;提取到的点集中含有大量无关边缘像素点,使用RANSAC算法剔除点集中的异常数据,得到有效样本数据构成的待拟合圆周点集;最后采用LIN算法对待拟合圆周点集进行拟合,得出最终的拟合结果。算法在椒盐噪声和曲线噪声抗干扰实验中表现优异,有着较强的抗干扰能力。已经成功应用到了螺纹孔圆周的拟合,精度和实时性均可满足实际生产要求。

关键词: RANSAC, 圆拟合, 螺纹孔, 抗干扰, 霍夫梯度法

Abstract: In the process of visual inspection,aiming at the problem of poor fitting accuracy of multi-incomplete and multi-noise circle,a circle fitting algorithm based on RANSAC was proposed.Firstly,the edge of the image is detected,and the Canny algorithm based on Scharr operator can obtain high quality edge distribution map. The Hough gradient method is used to roughly locate the target arc in the edge distribution map,and the point set containing the target arc is extracted. The extracted point set contains a large number of irrelevant edge pixels. RANSAC algorithm is used to eliminate the abnormal data in the point set,and the circle point set to be fitted is composed of effective sample data. Finally,LIN algorithm is used to fit the point set of the circle to be fitted,and the final fitting result is obtained.The proposed algorithm performs well in the anti-jamming experiments of salt and pepper noise and curve noise,and has strong anti-jamming ability. In addition,this method has been successfully applied to the circle fitting of threaded holes,and the accuracy and real-time performance can meet the requirements of actual production.

Key words: RANSAC, circle fitting, threaded hole, anti-interference, Hough gradient method

中图分类号: 


版权所有 © 《现代制造工程》编辑部 
地址:北京市东城区东四块玉南街28号 邮编:100061 电话:010-67126028 电子信箱:2645173083@qq.com
本系统由北京玛格泰克科技发展有限公司设计开发 技术支持:support@magtech.com.cn
访问总数:,当日访问:,当前在线: