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

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

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

尚会超 韩鑫磊 嵇长委 彭向前
现代制造工程2024,Issue(2) :112-119.DOI:10.16731/j.cnki.1671-3133.2024.02.015

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

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

尚会超 1韩鑫磊 1嵇长委 1彭向前2
扫码查看

作者信息

  • 1. 中原工学院机电学院,郑州 450007
  • 2. 湖南科技大学机电工程学院,湘潭 411201
  • 折叠

摘要

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

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 algo-rithm based on Scharr operator can obtain high quality edge distribution map.The Hough gradient method is used to roughly lo-cate 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.

关键词

RANSAC/圆拟合/螺纹孔/抗干扰/霍夫梯度法

Key words

RANSAC/circle fitting/threaded hole/anti-interference/Hough gradient method

引用本文复制引用

出版年

2024
现代制造工程
北京机械工程学会 北京市机械工业局技术开发研究所

现代制造工程

CSTPCD北大核心
影响因子:0.374
ISSN:1671-3133
参考文献量4
段落导航相关论文