高级检索

基于改进Canny算法的单目相机三维重建标定方法

Research on 3D Reconstruction Calibration Method of Monocular Camera Based on Improved Canny Algorithm

  • 摘要: 针对传统相机在强干扰场景下存在标定精度不足、边缘检测易受模糊影响,难以满足高精度三维重建需求的问题,本文提出一种改进的Canny边缘检测方法,以提升标定精度。首先,采用高斯滤波与导向滤波对标定图像进行联合处理,在滤除环境噪声的同时保持图像边缘的完整性和平滑性;其次,引入四向卷积模板的Sobel算子计算边缘梯度,以提高梯度计算的准确性,避免边缘细节缺失;最后,采用Otsu算法自适应获取边缘阈值,增强算法阈值选取的自适应性,并基于张正友标定法完成相机标定。为验证算法的有效性与鲁棒性,在20张标定板图像中分别添加标准差为30的高斯噪声和密度为20%的椒盐噪声,以模拟强干扰环境并进行标定实验。结果表明:相较于传统Canny算法,本文算法对高斯噪声与椒盐噪声均具有显著的抑制效果,边缘提取质量更优,相机标定的重投影误差较传统Canny算法分别降低了54.1%(高斯噪声)和32.5%(椒盐噪声)。在标准工件测量实验中,本文方法的平均绝对误差为0.1~0.3 mm,均方根误差为0.15~0.30 mm,表明该方法具有良好的测量精度与工程应用价值。

     

    Abstract: To address the issue of low calibration accuracy in traditional camera calibration methods and edge blurring under strong environmental interference, which cannot meet the requirements of high-precision 3D reconstruction, an improved Canny edge detection algorithm was proposed to enhance calibration accuracy. First, the calibration images were processed using Gaussian filtering and guided filtering to eliminate environmental noise while maintaining edge integrity and smoothness. Then, a four-directional convolution template-based Sobel operator was employed to calculate edge gradients, improving gradient computation accuracy and preventing edge detail loss. Finally, the Otsu algorithm was utilized to adaptively determine edge thresholds, enhancing the algorithm’s adaptability to threshold detection, and Zhang’s calibration method was applied to complete the image calibration. To verify the effectiveness and robustness of the proposed algorithm, Gaussian noise with a standard deviation of 30 and salt-and-pepper noise with a density of 20% were added to 20 calibration board images to simulate a high-interference environment, and calibration experiments were conducted. The results demonstrate that compared with traditional and improved Canny algorithms, the proposed algorithm exhibits significant suppression effects on both Gaussian noise and salt-and-pepper noise while achieving superior edge extraction quality, reducing the camera calibration reprojection errors by 54.1% and 32.5% respectively. In standard workpiece measurement tests, the proposed method maintains mean absolute errors within 0.1–0.3 mm range with higher measurement accuracy and smaller root mean square errors (0.15–0.30 mm), demonstrating excellent engineering application value.

     

/

返回文章
返回