高级检索

基于线结构光中心线亚像素提取与优化算法

On a Subpixel Extraction and Optimization Algorithm for Line-structured Light Centerline

  • 摘要: 针对传统线结构光提取算法在速度与精度难以兼顾的不足,提出一种融合几何中心法与灰度重心法的改进提取算法。该算法首先通过阈值化处理减少低像素值对中心线提取的干扰;随后逐行双向搜索最大像素值坐标并存储,若当前行的列坐标差小于设定阈值,则利用几何中心法粗提取条纹中心,否则通过计算与上一行中心坐标的距离将最近点作为当前行中心,实现快速准确的条纹定位;在此基础上,在粗提取坐标的邻域内采用改进的灰度重心法进行亚像素级精提取,在降低计算量的同时提升精度;最后通过最小二乘拟合进一步优化光条纹位置,增强平滑性和连续性。通过与传统算法的对比实验和三维重建验证本文算法的有效性。结果表明:本文算法在提取精度(RMSE=1.081 pixel)、运行效率(0.057 s)及重建质量(0.122 mm)等方面均优于对比算法,能够更好地保留工件几何特征,显著优于5 mm的工业误差容限,满足亚像素的高精度工业测量需求。本研究为三维视觉检测提供了高效可靠的解决方案。

     

    Abstract: An improved extraction algorithm integrating the geometric center method and the gray centroid method was proposed to address the limitation of conventional line-structured light extraction algorithms in balancing speed and accuracy. Firstly, threshold processing was applied to reduce the interference of low pixel values on centerline extraction. Subsequently, the image was bidirectionally scanned row by row to search and store the coordinates of the maximum pixel value. If the column coordinate difference in the current row was smaller than a set threshold, the geometric center method was employed to coarsely extract the stripe center; otherwise, the closest point to the center coordinate of the previous row was selected as the current row center based on distance calculation, enabling fast and accurate stripe localization. On this basis, an improved gray centroid method was applied within the neighborhood of the coarsely extracted coordinates to achieve sub-pixel precision extraction, which reduced computational load while improving accuracy. Finally, least squares fitting was used to further optimize the light stripe position, enhancing smoothness and continuity. The effectiveness of the proposed algorithm was verified through comparative experiments with traditional algorithms and 3D reconstruction.The results show that the proposed algorithm outperforms the comparison algorithms in terms of extraction accuracy (RMSE=1.081 pixel), operational efficiency (0.057 s), and reconstruction quality (0.122 mm), and can better preserve the geometric features of the workpiece, significantly exceeding the industrial error tolerance of 5 mm and meeting the high-precision industrial measurement requirements of sub-pixel level. This research provides an efficient and reliable solution for 3D visual inspection.

     

/

返回文章
返回