Modern Manufacturing Engineering ›› 2024, Vol. 521 ›› Issue (2): 112-119.doi: 10.16731/j.cnki.1671-3133.2024.02.015

Previous Articles     Next Articles

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

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

CLC Number: 

Copyright © Modern Manufacturing Engineering, All Rights Reserved.
Tel: 010-67126028 E-mail: 2645173083@qq.com
Powered by Beijing Magtech Co. Ltd