PDF (1804K)
摘要
针对传统相机在强干扰场景下存在标定精度不足、边缘检测易受模糊影响,难以满足高精度三维重建需求的问题,本文提出一种改进的 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.
关键词
Key words
[Author(id=1304869382111847212, tenantId=1045748351789510663, journalId=1155139928303341741, articleId=1304869381247820580, orderNo=0, firstName=null, middleName=null, lastName=null, nameCn=null, orcid=null, stid=null, country=null, authorPic=null, dead=0, email=null, emailSecond=null, emailThird=null, correspondingAuthor=0, authorType=1, ext={EN=AuthorExt(id=1304869382170567470, tenantId=1045748351789510663, journalId=1155139928303341741, articleId=1304869381247820580, authorId=1304869382111847212, language=EN, stringName=Weidong ZHAO, firstName=Weidong, middleName=null, lastName=ZHAO, prefix=null, suffix=null, authorComment=null, nameInitials=null, affiliation=null, department=null, xref=null, address=School of Electrical & Information Engineering, Anhui University of Technology , Maanshan 243032, China, bio=null, bioImg=null, bioContent=null, aboutCorrespAuthor=null), CN=AuthorExt(id=1304869382220899120, tenantId=1045748351789510663, journalId=1155139928303341741, articleId=1304869381247820580, authorId=1304869382111847212, language=CN, stringName=赵卫东, firstName=null, middleName=null, lastName=null, prefix=null, suffix=null, authorComment=null, nameInitials=null, affiliation=null, department=null, xref=null, address=安徽工业大学 电气与信息工程学院 , 安徽 马鞍山 243032, bio={"content":"赵卫东 (1976—),男,安徽阜阳人,副教授,主要研究方向为图像处理与机器人等。
"}, bioImg=null, bioContent=赵卫东 (1976—),男,安徽阜阳人,副教授,主要研究方向为图像处理与机器人等。
, aboutCorrespAuthor=null)}, companyList=[AuthorCompany(id=1304869382036349736, tenantId=1045748351789510663, journalId=1155139928303341741, articleId=1304869381247820580, xref=null, ext=[AuthorCompanyExt(id=1304869382048932649, tenantId=1045748351789510663, journalId=1155139928303341741, articleId=1304869381247820580, companyId=1304869382036349736, language=EN, country=null, province=null, city=null, postcode=null, companyName=null, departmentName=null, remark=School of Electrical & Information Engineering, Anhui University of Technology , Maanshan 243032, China), AuthorCompanyExt(id=1304869382065709866, tenantId=1045748351789510663, journalId=1155139928303341741, articleId=1304869381247820580, companyId=1304869382036349736, language=CN, country=null, province=null, city=null, postcode=null, companyName=null, departmentName=null, remark=安徽工业大学 电气与信息工程学院 , 安徽 马鞍山 243032)])]), Author(id=1304869382267036466, tenantId=1045748351789510663, journalId=1155139928303341741, articleId=1304869381247820580, orderNo=1, firstName=null, middleName=null, lastName=null, nameCn=null, orcid=null, stid=null, country=null, authorPic=null, dead=0, email=null, emailSecond=null, emailThird=null, correspondingAuthor=0, authorType=1, ext={EN=AuthorExt(id=1304869382334145332, tenantId=1045748351789510663, journalId=1155139928303341741, articleId=1304869381247820580, authorId=1304869382267036466, language=EN, stringName=Xinlong WANG, firstName=Xinlong, middleName=null, lastName=WANG, prefix=null, suffix=null, authorComment=null, nameInitials=null, affiliation=null, department=null, xref=null, address=School of Electrical & Information Engineering, Anhui University of Technology , Maanshan 243032, China, bio=null, bioImg=null, bioContent=null, aboutCorrespAuthor=null), CN=AuthorExt(id=1304869382384476981, tenantId=1045748351789510663, journalId=1155139928303341741, articleId=1304869381247820580, authorId=1304869382267036466, language=CN, stringName=王鑫龙, firstName=null, middleName=null, lastName=null, prefix=null, suffix=null, authorComment=null, nameInitials=null, affiliation=null, department=null, xref=null, address=安徽工业大学 电气与信息工程学院 , 安徽 马鞍山 243032, bio=null, bioImg=null, bioContent=null, aboutCorrespAuthor=null)}, companyList=[AuthorCompany(id=1304869382036349736, tenantId=1045748351789510663, journalId=1155139928303341741, articleId=1304869381247820580, xref=null, ext=[AuthorCompanyExt(id=1304869382048932649, tenantId=1045748351789510663, journalId=1155139928303341741, articleId=1304869381247820580, companyId=1304869382036349736, language=EN, country=null, province=null, city=null, postcode=null, companyName=null, departmentName=null, remark=School of Electrical & Information Engineering, Anhui University of Technology , Maanshan 243032, China), AuthorCompanyExt(id=1304869382065709866, tenantId=1045748351789510663, journalId=1155139928303341741, articleId=1304869381247820580, companyId=1304869382036349736, language=CN, country=null, province=null, city=null, postcode=null, companyName=null, departmentName=null, remark=安徽工业大学 电气与信息工程学院 , 安徽 马鞍山 243032)])]), Author(id=1304869382430614327, tenantId=1045748351789510663, journalId=1155139928303341741, articleId=1304869381247820580, orderNo=2, firstName=null, middleName=null, lastName=null, nameCn=null, orcid=null, stid=null, country=null, authorPic=null, dead=0, email=null, emailSecond=null, emailThird=null, correspondingAuthor=0, authorType=1, ext={EN=AuthorExt(id=1304869382493528889, tenantId=1045748351789510663, journalId=1155139928303341741, articleId=1304869381247820580, authorId=1304869382430614327, language=EN, stringName=Jun ZHU, firstName=Jun, middleName=null, lastName=ZHU, prefix=null, suffix=null, authorComment=null, nameInitials=null, affiliation=null, department=null, xref=null, address=School of Electrical & Information Engineering, Anhui University of Technology , Maanshan 243032, China, bio=null, bioImg=null, bioContent=null, aboutCorrespAuthor=null), CN=AuthorExt(id=1304869382539666234, tenantId=1045748351789510663, journalId=1155139928303341741, articleId=1304869381247820580, authorId=1304869382430614327, language=CN, stringName=朱军, firstName=null, middleName=null, lastName=null, prefix=null, suffix=null, authorComment=null, nameInitials=null, affiliation=null, department=null, xref=null, address=安徽工业大学 电气与信息工程学院 , 安徽 马鞍山 243032, bio=null, bioImg=null, bioContent=null, aboutCorrespAuthor=null)}, companyList=[AuthorCompany(id=1304869382036349736, tenantId=1045748351789510663, journalId=1155139928303341741, articleId=1304869381247820580, xref=null, ext=[AuthorCompanyExt(id=1304869382048932649, tenantId=1045748351789510663, journalId=1155139928303341741, articleId=1304869381247820580, companyId=1304869382036349736, language=EN, country=null, province=null, city=null, postcode=null, companyName=null, departmentName=null, remark=School of Electrical & Information Engineering, Anhui University of Technology , Maanshan 243032, China), AuthorCompanyExt(id=1304869382065709866, tenantId=1045748351789510663, journalId=1155139928303341741, articleId=1304869381247820580, companyId=1304869382036349736, language=CN, country=null, province=null, city=null, postcode=null, companyName=null, departmentName=null, remark=安徽工业大学 电气与信息工程学院 , 安徽 马鞍山 243032)])]), Author(id=1304869382589997884, tenantId=1045748351789510663, journalId=1155139928303341741, articleId=1304869381247820580, orderNo=3, firstName=null, middleName=null, lastName=null, nameCn=null, orcid=null, stid=null, country=null, authorPic=null, dead=0, email=null, emailSecond=null, emailThird=null, correspondingAuthor=0, authorType=1, ext={EN=AuthorExt(id=1304869382648718142, tenantId=1045748351789510663, journalId=1155139928303341741, articleId=1304869381247820580, authorId=1304869382589997884, language=EN, stringName=Weisheng CHEN, firstName=Weisheng, middleName=null, lastName=CHEN, prefix=null, suffix=null, authorComment=null, nameInitials=null, affiliation=null, department=null, xref=null, address=School of Electrical & Information Engineering, Anhui University of Technology , Maanshan 243032, China, bio=null, bioImg=null, bioContent=null, aboutCorrespAuthor=null), CN=AuthorExt(id=1304869382690661184, tenantId=1045748351789510663, journalId=1155139928303341741, articleId=1304869381247820580, authorId=1304869382589997884, language=CN, stringName=陈为胜, firstName=null, middleName=null, lastName=null, prefix=null, suffix=null, authorComment=null, nameInitials=null, affiliation=null, department=null, xref=null, address=安徽工业大学 电气与信息工程学院 , 安徽 马鞍山 243032, bio=null, bioImg=null, bioContent=null, aboutCorrespAuthor=null)}, companyList=[AuthorCompany(id=1304869382036349736, tenantId=1045748351789510663, journalId=1155139928303341741, articleId=1304869381247820580, xref=null, ext=[AuthorCompanyExt(id=1304869382048932649, tenantId=1045748351789510663, journalId=1155139928303341741, articleId=1304869381247820580, companyId=1304869382036349736, language=EN, country=null, province=null, city=null, postcode=null, companyName=null, departmentName=null, remark=School of Electrical & Information Engineering, Anhui University of Technology , Maanshan 243032, China), AuthorCompanyExt(id=1304869382065709866, tenantId=1045748351789510663, journalId=1155139928303341741, articleId=1304869381247820580, companyId=1304869382036349736, language=CN, country=null, province=null, city=null, postcode=null, companyName=null, departmentName=null, remark=安徽工业大学 电气与信息工程学院 , 安徽 马鞍山 243032)])])]
赵卫东,王鑫龙,朱军,陈为胜.
基于改进Canny算法的单目相机三维重建标定方法[J].
安徽工业大学学报(自然科学版), 2026, 43(4): 408-414 DOI:10.12415/j.issn.1671−7872.25043
| [1] |
ZHOU X Y, LIN Z W, SHAN X J, et al. Driving Gaussian: composite Gaussian splatting for surrounding dynamic autonomous driving scenes[C]// 2024 IEEE/CVF Conference on Computer Vision and Pattern Recognition. Seattle, WA, USA: IEEE, 2024: 21634-21643.
|
| [2] |
HUANG B Y, TANG Y, OZDEMIR S, et al. A fast and flexible projector—camera calibration system[J]. IEEE Transactions on Automation Science and Engineering, 2020, 18(3): 1049-1063.
|
| [3] |
DRONOVA M, SMOLYANSKIY N, et al. FlyNeRF: NeRF—based aerial mapping for 3D scene reconstruction[J]. ISPRS Journal of Photogrammetry and Remote Sensing, 2024, 187: 203-217.
|
| [4] |
HUANG X., LI W. High—precision 3D reconstruction in cultural heritage digitization[J]. Journal of Cultural Heritage, 2021, 52: 231-245.
|
| [5] |
赵卫东, 程星, 陈香梅. 基于方向直方图签名描述符的点云配准方法[J]. 安徽工业大学学报 (自然科学版), 2023, 40(2): 198−204, 225.
|
| [6] |
ZHAO W D, CHENG X, CHEN X M. Point cloud registration method based on signature of histogram of orientation descriptor[J]. Journal of Anhui University of Technology (Natural Science), 2023, 40(2): 198-204,225.
|
| [7] |
孙丽君, 黄志远, 陈天飞. 基于傅里叶变换的 Gamma 因子快速自标定方法[J]. 光学学报, 2021, 41(24): 2412002.
|
| [8] |
SUN L J, HUANG Z Y, CHEN T F. Fast self—calibration method of gamma factor based on Fourier transform[J]. Acta Optica Sinica, 2021, 41(24): 2412002.
|
| [9] |
SUN L J, HUANG Z Y, CHEN T F. Fast self—calibration method of gamma factor based on Fourier transform[J]. Acta Optica Sinica, 2021, 41(24): 116-127.
|
| [10] |
WANG Z, FAN J F, JING F S, et al. An efficient calibration method of line structured light vision sensor in robotic eye—in—hand system[J]. IEEE Sensors Journal, 2020, 20(11): 6200-6208.
|
| [11] |
刘悦, 朱均超. 基于改进 Zernike 矩的光斑图像亚像素边缘检测算法[J]. 激光杂志, 2021, 42(5): 32-35.
|
| [12] |
LIU Y, ZHU J C. Sub—pixel edge detection algorithm of spot image based on improved Zernike moment[J]. Laser Journal, 2021, 42(5): 32-35.
|
| [13] |
黄臻臻, 黄晓梅, 郑莲玉, 等. 同心圆偏心误差补偿迭代的相机标定方法[J]. 光学学报, 2022, 42(19): 1912003.
|
| [14] |
HUANG Z Z, HUANG X M, ZHENG L Y, et al. Camera calibration method for concentric circle eccentricity error compensation iteration[J]. Acta Optica Sinica, 2022, 42(19): 1912003.
|
| [15] |
康朝海, 洪立, 任伟建, 等. 基于亚像素边缘检测和圆心修正补偿的高精度相机标定方法[J]. 激光与光电子学进展, 2024, 61(8): 146-154.
|
| [16] |
KANG C H, HONG L, REN W J, et al. High—precision camera calibration method based on subpixel edge detection and circularity correction compensation[J]. Laser & Optoelectronics Progress, 2024, 61(8): 146-154.
|
| [17] |
ZHANG Z. A flexible new technique for camera calibration[J]. IEEE Transactions on Pattern Analysis and Machine Intelligence, 2002, 22(11): 1330-1334.
|
| [18] |
潘艳华, 金辉, 刘金国, 等. 基于改进 Canny 算法的合作靶标边缘检测[J]. 工业仪表与自动化装置, 2023(5): 83-88.
|
| [19] |
PAN Y H, JIN H, LIU J G, et al. Cooperative targets edge detection based on improved Canny algorithm[J]. Industrial Instrumentation & Automation, 2023(5): 83-88.
|
| [20] |
郝泽兴, 郭改枝, 代妍玮, 等. 一种改进 Canny 算子的边缘检测算法[J]. 内蒙古大学学报 (自然科学版), 2022, 53(5): 530-537.
|
| [21] |
HAO Z X, GUO G Z, DAI Y W, et al. Improved edge detection algorithm of canny operator[J]. Journal of Inner Mongolia University (Natural Science Edition), 2022, 53(5): 530-537.
|
| [22] |
GONG S J, LI G Q, ZHANG Y J, et al. Application of static gesture segmentation based on an improved canny operator[J]. The Journal of Engineering, 2019(15): 543-546.
|
| [23] |
ZHU X Y, TANG M N, ZHANG K Y, et al. Image detection method based on improved Canny algorithm[C]// 2021 40th Chinese Control Conference. Shanghai, China: IEEE, 2021: 7033-7039.
|
| [24] |
高世一, 赵明扬, 张雷, 等. 基于 Zernike 正交矩的图像亚像素边缘检测算法改进[J]. 自动化学报, 2008, 34(9): 1163-1168.
|
| [25] |
GAO S Y, ZHAO M Y, ZHANG L, et al. Improved algorithm about subpixel edge detection of image based on zernike orthogonal moments[J]. Acta Automatica Sinica, 2008, 34(9): 1163-1168.
|
| [26] |
段振云, 王宁, 赵文辉, 等. 基于点阵标定板的视觉测量系统的标定方法[J]. 光学学报, 2016, 36(5): 151-159.
|
| [27] |
DUAN Z Y, WANG N, ZHAO W H, et al. Calibration method based on lattice calibration plate in vision measurement system[J]. Acta Optica Sinica, 2016, 36(5): 151-159.
|
| [28] |
娄群, 吕钧澔, 文立华, 等. 基于亚像素边缘检测的高精度相机标定方法[J]. 光学学报, 2022, 42(20): 2012002.
|
| [29] |
LOU Q, LÜ J H, WEN L H, et al. High—precision camera calibration method based on sub—pixel edge detection[J]. Acta Optica Sinica, 2022, 42(20): 2012002.
|
| [30] |
OUELLET J N, HÉBERT P. Precise ellipse estimation without contour point extraction[J]. Machine Vision and Applications, 2009, 21(1): 59-67.
|
| [31] |
林旭东, 张旭. 基于透视畸变矫正的高精度相机标定方法[J]. 激光与光电子学进展, 2023, 60(16): 283-289.
|
| [32] |
LIN X D, ZHANG X. Accurate camera calibration method based on perspective distortion correction[J]. Laser & Optoelectronics Progress, 2023, 60(16): 283-289.
|
| [33] |
赵卫东, 陈香梅, 程星. 基于改进结构光条纹中心提取的三维视觉检测技术[J]. 安徽工业大学学报 (自然科学版), 2023, 40(1): 82-88.
|
| [34] |
ZHAO W D, CHEN X M, CHENG X. 3D vision inspection technology based on improved structured light stripe centre extraction[J]. Journal of Anhui University of Technology (Natural Science), 2023, 40(1): 82-88.
|
| [35] |
宋阳, 周亚丽, 张奇志. 鱼眼镜头径向畸变的校正方法[J]. 仪器仪表学报, 2017, 38(4): 1014-1023.
|
| [36] |
SONG Y, ZHOU Y L, ZHANG Q Z. Correction method for radial distortion of fisheye lens[J]. Chinese Journal of Scientific Instrument, 2017, 38(4): 1014-1023.
|
| [37] |
HE K M, SUN J, TANG X O. Guided image filtering[M]// Computer Vision—ECCV 2010. Berlin, Heidelberg: Springer Berlin Heidelberg, 2010.
|
| [38] |
梁肇峻, 钟俊. 基于Otsu 算法与直方图分析的自适应Canny 算法的改进[J]. 现代电子技术, 2019, 42(11): 54-58.
|
| [39] |
LIANG Z J, ZHONG J. Adaptive Canny algorithm improvement based on Otsu algorithm and histogram analysis[J]. Modern Electronics Technique, 2019, 42(11): 54-58.
|
基金资助
安徽省自然科学基金项目(2108085MF225)