基于HALCON的锥形表面小孔测量
2020-02-18
作者:庄孝斌,杨龙兴 单位:江苏理工学院
摘要:为解决等离子切割保护帽表面小孔尺寸的测量问题,提出一种区域分割与RANSAC算法联合拟合圆的方法。首先提取出小孔区域,再用二阶高斯函数导数计算出小孔的边缘点位置。选用矩形分割法对边缘点进行阵列分割,以矩形区域中两个边缘点连线求半径,生成一个假定的圆模型方程,再将其他边缘点代入圆模型中,判断该点是否为圆模型的解,运用RANSAC算法迭代计算出最优圆模型,最后使用HALCON软件完成拟合测量。实验结果表明,该测量方法能更准确地识别边缘轮廓,与最小二乘法对比,拟合圆弧更加接近实际轮廓。在测量中使用标定板和游标卡尺进行标定,适合于实际检测。
关键词:RANSAC算法;区域分割;边缘点
中图分类号:TG806;TH741文献标志码:ADOI:10.3969/j.issn.1000-7008.2020.01.025
Measurement of Conical Surface Holes Based on HALCON
Zhuang Xiaobin,Yang Longxing
Abstract:In order to solve the measurement problem of the small hole size on the surface of the plasma cutting protection cap,a method of combining the region segmentation and the RANSAC algorithm to fit a circle is proposed.The method first extracts the small hole domain,and then uses the secondorder Gaussian function derivative to calculate the edge point of the small hole.The rectangular segmentation method is used to segment the edge points,and the radius is obtained by connecting the two edge points in the rectangular region to generate a hypothetical circular model equation.The other edge points are substituted into the circular model to determine whether the point is it′s solution.Using RANSAC algorithm to iteratively calculate the optimal circle model,and finally complete the fitting.The measurements are done by using HALCON software.The experimental results show that the measurement method can identify the edge contour more accurately.In contrast to the method of least squares,the fitted arc is closer to the actual contour.In the actual measurement,calibration is performed by using a calibration plate and a vernier caliper,which is suitable for use in actual inspection.
Keywords:RANSAC algorithm;region segmentation;edge point