基于OpenCV的圆心坐标定位的优化设计

Optimization design of center coordinates location based on OpenCV

  • 摘要: 针对圆环柱体零件圆心点的坐标如何定位和定位数据的异常波动问题,基于对圆环柱体零件边缘点检测坐标分布情况进行了研究,提出了四分位数展布法处理数据异常值和基于最小二乘法拟合圆曲线相结合的方法。首先对采集到的图像进行滤波、增强的预处理,其次对原图像转换得到的灰度图像进行基于Canny的边缘检测算法,提取轮廓边缘点坐标。最终进行边缘点坐标拟合环节,将边缘点到平均值中心点的距离的平方做成顺序排列数列,先用四分位数展布法对边缘点坐标的异常值进行筛除,再用数列中的众数所代表的边缘点坐标代替异常值点的坐标,最后利用最小二乘法对处理后的坐标数据进行圆拟合得出圆心的精确坐标值。经过基于OpenCV的圆心定位系统和进给设备的实验验证,表明该方法可以提高圆心坐标点的精确度,并提高了进给设备的准确度。

     

    Abstract: Aiming at the problem of how to locate the coordinates of the center point of a circular cylinder part and the abnormal fluctuation of the location data, based on the study of the coordinate distribution of the detection point of the edge point of a circular cylinder part, a method combining the processing of the data outliers by the quartile spreading method and the fitting of the circular curve based on the least square method is proposed. First, the collected image was preprocessed with filtering and enhancement, and then the gray image obtained by the original image conversion was processed with the edge detection algorithm based on Canny to extract the coordinates of contour edge points. To simulate the edge point coordinates in the end of link, the distance of the center of the edge points to the average square to make order of sequence, use first quartile distribution method to screen out edge point coordinates of outliers, reoccupy represented by a sequence of the number of edge points coordinates instead of outliers, the coordinates of the final after using least square method to deal with the coordinates of the data fitting get an accurate coordinates of the center of the circle. The experiment of center positioning system and feeding equipment based on OpenCV shows that this method can improve the accuracy of center coordinate points and the accuracy of feeding equipment.

     

/

返回文章
返回