1.北京信息科技大学 机电工程学院,北京 100192
2.中国科学院 高能物理研究所,北京 100049
[ "王宇恒(2000-),男,河北涿州人,硕士研究生,主要从事计算机视觉方面的研究。E-mail: 13730237366@163.com" ]
[ "谷玉海(1976-),男,山东泰安人,博士,硕士生导师,2012年于中国机械科学研究院获得博士学位,主要从事精密测量仪器系统、高精度视觉测量系统的研究。E-mail: guyuhai@bistu.edu.cn" ]
[ "张伟伟(1986-),女,山东临沂人,博士,硕士生导师,2013年于北京大学获得博士学位,主要从事X射线微纳聚焦元件的研制和同步辐射束线光学设计的研究。E-mail: zhangww@ihep.ac.cn" ]
收稿:2026-01-05,
修回:2026-01-23,
纸质出版:2026-04-10
移动端阅览
王宇恒,谷玉海,王亚冰等.SAM提取多维灰度作为输入的视觉测量误差补偿[J].光学精密工程,2026,34(07):1111-1127.
WANG Yuheng,GU Yuhai,WANG Yabing,et al.Visual measurement error compensation based on multi-dimensional grayscale extracted by SAM[J].Optics and Precision Engineering,2026,34(07):1111-1127.
王宇恒,谷玉海,王亚冰等.SAM提取多维灰度作为输入的视觉测量误差补偿[J].光学精密工程,2026,34(07):1111-1127. DOI: 10.37188/OPE.20263407.1111. CSTR: 32169.14.OPE.20263407.1111.
WANG Yuheng,GU Yuhai,WANG Yabing,et al.Visual measurement error compensation based on multi-dimensional grayscale extracted by SAM[J].Optics and Precision Engineering,2026,34(07):1111-1127. DOI: 10.37188/OPE.20263407.1111. CSTR: 32169.14.OPE.20263407.1111.
针对精密图像测量中照度变化导致的测量误差问题,提出一种基于分割一切模型(Segment Anything Model, SAM)构造多维灰度特征作为输入,使用鲸鱼优化的径向基函数神经网络(WOA-RBF)进行拟合的误差补偿模型。通过建立照度与边缘偏移数学模型,分析了光源强度与表面散射特性对测量精度的非线性影响。利用SAM的零样本分割能力自动提取异质材料区域的平均灰度,并作为多维特征向量输入,以表征复杂的图像信息。采
用鲸鱼优化算法(Whale Optimization Algorithm, WOA)对径向基函数神经网络(Radial basis function neural network)进行参数寻优,实现了对偏移误差的精确补偿。将该方法在铬锆铜夹具测量对比实验中与传统一维线性拟合、遗传算法优化的最小二乘支持向量机和支持向量回归方法进行对比。实验结果表明,本文所提模型在对比实验中(以Zernike矩亚像素算法为例)均方根误差(Root Mean Square Error, RMSE)为2.07 μm,平均绝对误差(Mean Absolute Error, MAE)为1.73 μm,决定系数(
R
²)为0.99。该模型在多种亚像素边缘检测算法下均表现出相近的精度和优异的稳定性,为精密图像测量中由照度变化因素导致的测量误差问题提供了一种可行的补偿办法。
To mitigate measurement errors induced by illumination variations in precision image measurement, an error compensation model is proposed based on multidimensional grayscale features extracted via the Segment Anything Model (SAM) and fitted using a Whale Optimization Algorithm-optimized Radial Basis Function (WOA-RBF) neural network. A mathematical model describing illumination-induced edge shift is established to characterize the nonlinear effects of light intensity and surface scattering properties on measurement accuracy. Leveraging SAM's zero-shot segmentation capability, average grayscale values from heterogeneous material regions are automatically extracted as multidimensional feature inputs to represent complex image characteristics. The WOA is employed to optimize the parameters of the RBF neural network, enabling accurate compensation of edge shift errors. Comparative experiments on chromium-zirconium-copper fixture measurements, benchmarked against one-dimensional linear fitting, GA-LSSVM, and SVR methods, demonstrate that the proposed model achieves an RMSE of 2.07 μm, an MAE of 1.73 μm, and an
R
² of 0.99 (with the Zernike moment sub-pixel algorithm as a representative case). Consistent accuracy and strong robustness are observed across various sub-pixel edge detection algorithms, indicating that the proposed approach provides an effective solution for illumination-induced errors in precision image measurement.
李金峰 , 马紫瑞 , 王海同 , 等 . 基于线结构光的滚动直线导轨型面精密测量与场景化算法研究 [J]. 光学 精密工程 , 2026 , 34 ( 4 ): 536 - 547 .
LI J F , MA Z R , WANG H T , et al . Research on precise measurement and scene-based algorithm for rolling linear guide rail profile based on line structured light [J]. Optics and Precision Engineering , 2026 , 34 ( 4 ): 536 - 547 . (in Chinese)
孙建波 , 张叶 , 常旭岭 . 基于改进Mask R-CNN+LaneNet的车载图像车辆压线检测 [J]. 光学 精密工程 , 2022 , 30 ( 7 ): 854 - 868 . doi: 10.37188/ope.20223007.0854 http://dx.doi.org/10.37188/ope.20223007.0854
SUN J B , ZHANG Y , CHANG X L . Vehicle pressure line detection based on improved Mask R-CNN +LaneNet [J]. Optics and Precision Engineering , 2022 , 30 ( 7 ): 854 - 868 . (in Chinese) . doi: 10.37188/ope.20223007.0854 http://dx.doi.org/10.37188/ope.20223007.0854
ZHOU L L , WU G X , ZUO Y B , et al . A comprehensive review of vision-based 3D reconstruction methods [J]. Sensors , 2024 , 24 ( 7 ): 2314 . doi: 10.3390/s24072314 http://dx.doi.org/10.3390/s24072314
赵进 , 郭寅 , 尹仕斌 , 等 . 强环境噪声下的双目视觉受电弓轨旁异常检测 [J]. 光学 精密工程 , 2025 , 33 ( 3 ): 438 - 451 . doi: 10.37188/ope.20253303.0438 http://dx.doi.org/10.37188/ope.20253303.0438
ZHAO J , GUO Y , YIN SH B , et al . Binocular vision-based trackside pantograph anomaly detection under strong environmental noise [J]. Optics and Precision Engineering , 2025 , 33 ( 3 ): 438 - 451 . (in Chinese) . doi: 10.37188/ope.20253303.0438 http://dx.doi.org/10.37188/ope.20253303.0438
JANG M , YOON H , LEE S , et al . A comparison and evaluation of stereo matching on active stereo images [J]. Sensors , 2022 , 22 ( 9 ): 3332 . doi: 10.3390/s22093332 http://dx.doi.org/10.3390/s22093332
游前 , 翁慧 , 赵江 , 等 . 基于改进Goldstein枝切法的傅里叶变换轮廓术 [J]. 光学学报 , 2023 , 43 ( 5 ): 70 - 79 . doi: 10.3788/AOS221351 http://dx.doi.org/10.3788/AOS221351
YOU Q , WENG H , ZHAO J , et al . Fourier transform profilometry based on improved Goldstein branch-cut algorithm [J]. Acta Optica Sinica , 2023 , 43 ( 5 ): 70 - 79 . (in Chinese) . doi: 10.3788/AOS221351 http://dx.doi.org/10.3788/AOS221351
边宸舒 , 刘元坤 , 于馨 . 基于概率密度函数的彩色相位测量轮廓术校正 [J]. 光学学报 , 2022 , 42 ( 7 ): 144 - 153 . doi: 10.3788/AOS202242.0712002 http://dx.doi.org/10.3788/AOS202242.0712002
BIAN CH SH , LIU Y K , YU X . Correction of color-encoded phase measurement profilometry based on probability density function [J]. Acta Optica Sinica , 2022 , 42 ( 7 ): 144 - 153 . (in Chinese) . doi: 10.3788/AOS202242.0712002 http://dx.doi.org/10.3788/AOS202242.0712002
韩金璐 . 投影莫尔轮廓术相位-高度映射方法研究 [D]. 西安 : 西安工业大学 , 2023 .
HAN J L . Research on Phase - Height Mapping Method of Projection Moiré Profilometry [D]. Xi'an : Xi'an Technological University , 2023 . (in Chinese)
曹益平 , 张鹤晨 . 计算莫尔轮廓术及其发展动态 [J]. 光学与光电技术 , 2023 , 21 ( 5 ): 1 - 23 .
CAO Y P , ZHANG H CH . Computer-generated moiré profilometry and its development trends [J]. Optics & Optoelectronic Technology , 2023 , 21 ( 5 ): 1 - 23 . (in Chinese)
艾佳 , 张启灿 , 苏显渝 . 基于π相移二值正交光栅的调制度测量轮廓术 [J]. 光学学报 , 2026 , 46 ( 2 ): 256 - 267 .
AI J , ZHANG Q C , SU X Y . Modulation measurement profilometry based on π phase-shifting binary orthogonal grating [J]. Acta Optica Sinica , 2026 , 46 ( 2 ): 256 - 267 . (in Chinese)
WEI Z M , CAO Y P , WU H T , et al . Dynamic phase-differencing profilometry with number-theoretical phase unwrapping and interleaved projection [J]. Optics Express , 2024 , 32 ( 11 ): 19578 - 19593 . doi: 10.1364/oe.527192 http://dx.doi.org/10.1364/oe.527192
WANG Y H , CHEN Q B , DING M , et al . High precision dimensional measurement with convolutional neural network and bi-directional long short-term memory (LSTM) [J]. Sensors , 2019 , 19 ( 23 ): 5302 . doi: 10.3390/s19235302 http://dx.doi.org/10.3390/s19235302
WANG W Q , LIU W , LIU Y , et al . Precise 2D and 3D hybrid measurement of drill bits with complex geometries [J]. Engineering , 2025 , in press . doi: 10.1016/j.eng.2025.03.035 http://dx.doi.org/10.1016/j.eng.2025.03.035
ZHANG D , HUANG S Y , SUN X X , et al . Advances in 2D and 3D machine vision technologies for morphological characterization of granular food products: from laboratory to application [J]. Journal of Food Measurement and Characterization , 2025 , 19 ( 12 ): 9292 - 9318 . doi: 10.1007/s11694-025-03697-6 http://dx.doi.org/10.1007/s11694-025-03697-6
MIAO J W , TAN Q C , SUN B R , et al . Online measurement method for dimensions of disk parts based on machine vision [J]. PLoS One , 2024 , 19 ( 7 ): e0307525 . doi: 10.1371/journal.pone.0307525 http://dx.doi.org/10.1371/journal.pone.0307525
伍麟 , 郝鸿宇 , 宋友 . 基于计算机视觉的工业金属表面缺陷检测综述 [J]. 自动化学报 , 2024 , 50 ( 7 ): 1261 - 1283 . doi: 10.16383/j.aas.c230039 http://dx.doi.org/10.16383/j.aas.c230039
WU L , HAO H Y , SONG Y . A review of metal surface defect detection based on computer vision [J]. Acta Automatica Sinica , 2024 , 50 ( 7 ): 1261 - 1283 . (in Chinese) . doi: 10.16383/j.aas.c230039 http://dx.doi.org/10.16383/j.aas.c230039
黄佳伟 , 谷玉海 , 张英 . 芯片贴装几何参数高精度测量方法 [J]. 电子测量技术 , 2025 , 48 ( 11 ): 33 - 41 .
HUANG J W , GU Y H , ZHANG Y . High-precision measurement method for chip mounting geometric parameters [J]. Electronic Measurement Technology , 2025 , 48 ( 11 ): 33 - 41 . (in Chinese)
ZHAO F Y , TANG H Y , ZOU X R , et al . A review of optical metrology techniques for advanced manufacturing applications [J]. Micromachines , 2025 , 16 ( 11 ): 1224 . doi: 10.3390/mi16111224 http://dx.doi.org/10.3390/mi16111224
ZHANG L L , JIA X W , CHANG Q , et al . The development of machine vision and its applications in different industries: a review [J]. Mechanical Engineering Advances , 2024 , 2 ( 2 ): 1746 . doi: 10.59400/mea.v2i2.1746 http://dx.doi.org/10.59400/mea.v2i2.1746
王昊 , 李星辉 , 肖巍 , 等 . 基于机器视觉的透明软管内微量液体体积测量 [J]. 光学 精密工程 , 2025 , 33 ( 5 ): 763 - 776 .
WANG H , LI X H , XIAO W , et al . Machine vision-based method for measuring micro-volume liquid in transparent tubes [J]. Optics and Precision Engineering , 2025 , 33 ( 5 ): 763 - 776 . (in Chinese)
胡满凤 , 李磊 , 谢晋 . 热压印成型复合微透镜阵列的微光学照明特性 [J]. 光学 精密工程 , 2024 , 32 ( 9 ): 1371 - 1383 . doi: 10.37188/ope.20243209.1371 http://dx.doi.org/10.37188/ope.20243209.1371
HU M F , LI L , XIE J . Micro-optical illumination properties of hierarchical microlens arrays formed by hot-embossing [J]. Optics and Precision Engineering , 2024 , 32 ( 9 ): 1371 - 1383 . (in Chinese) . doi: 10.37188/ope.20243209.1371 http://dx.doi.org/10.37188/ope.20243209.1371
闫光辉 , 吴佰靖 , 马龙 . LightDiffu-DCE: 基于光照强度扩散的低光照图像增强 [J]. 光学 精密工程 , 2025 , 33 ( 7 ): 1114 - 1129 . doi: 10.37188/ope.20253307.1114 http://dx.doi.org/10.37188/ope.20253307.1114
YAN G H , WU B J , MA L . LightDiffu-DCE: low light image enhancement based on light intensity diffusion [J]. Optics and Precision Engineering , 2025 , 33 ( 7 ): 1114 - 1129 . (in Chinese) . doi: 10.37188/ope.20253307.1114 http://dx.doi.org/10.37188/ope.20253307.1114
SONNLEITNER M , JEFFERS J , BARNETT S M . Image retrodiction at low light levels [J]. Optica , 2015 , 2 ( 11 ): 950 . doi: 10.1364/optica.2.000950 http://dx.doi.org/10.1364/optica.2.000950
HYNECEK J , NISHIWAKI T . Excess noise and other important characteristics of low light level imaging using charge multiplying CCDs [J]. IEEE Transactions on Electron Devices , 2003 , 50 ( 1 ): 239 - 245 . doi: 10.1109/ted.2002.806962 http://dx.doi.org/10.1109/ted.2002.806962
段振云 , 董迪 , 赵文辉 . 视觉测量系统结构设计与光照强度分析 [J]. 组合机床与自动化加工技术 , 2016 ( 8 ): 61 - 63 .
DUAN ZH Y , DONG D , ZHAO W H . Configuration design and illumination intensity analysis of machine vision system [J]. Modular Machine Tool & Automatic Manufacturing Technique , 2016 ( 8 ): 61 - 63 . (in Chinese)
龚聪 . 基于机器视觉的高精度尺寸检测方法与实现 [D]. 广州 : 广东工业大学 , 2014 .
GONG C . The Method and Realization of High - Precision Size Measurement Based on Machine Vision [D]. Guangzhou : Guangdong University of Technology , 2014 . (in Chinese)
李旭 . 自适应光强变化的齿轮视觉测量技术研究 [D]. 太原 : 中北大学 , 2016 .
LI X . Research on Gear Vision Measurement Technology of Adapting to Light Intensity Change [D]. Taiyuan : North University of China , 2016 . (in Chinese)
郭小刚 , 杜文华 , 曾志强 , 等 . 影像测量仪背光源强度影响及误差补偿技术研究 [J]. 组合机床与自动化加工技术 , 2018 ( 3 ): 128 - 130 . doi: 10.13462/j.cnki.mmtamt.2018.03.035 http://dx.doi.org/10.13462/j.cnki.mmtamt.2018.03.035
GUO X G , DU W H , ZENG ZH Q , et al . Research on the influence of backlight intensity and error compensation technology of image measuring instrument [J]. Modular Machine Tool & Automatic Manufacturing Technique , 2018 ( 3 ): 128 - 130 . (in Chinese) . doi: 10.13462/j.cnki.mmtamt.2018.03.035 http://dx.doi.org/10.13462/j.cnki.mmtamt.2018.03.035
粟序明 , 方成刚 , 潘裕斌 , 等 . 变照度下的视觉测量系统误差建模 [J]. 浙江大学学报(工学版) , 2020 , 54 ( 10 ): 1929 - 1935 . doi: 10.3785/j.issn.1008-973X.2020.10.009 http://dx.doi.org/10.3785/j.issn.1008-973X.2020.10.009
SU X M , FANG CH G , PAN Y B , et al . Modeling error of visual measurement system under changing illuminance [J]. Journal of Zhejiang University (Engineering Science) , 2020 , 54 ( 10 ): 1929 - 1935 . (in Chinese) . doi: 10.3785/j.issn.1008-973X.2020.10.009 http://dx.doi.org/10.3785/j.issn.1008-973X.2020.10.009
刘凌霄 , 王德成 , 程鹏 , 等 . 基于机器视觉的光照强度修正方法研究 [J]. 制造业自动化 , 2022 , 44 ( 9 ): 1 - 4, 35 .
LIU L X , WANG D CH , CHENG P , et al . Research on illumination intensity correction method based on machine vision [J]. Manufacturing Automation , 2022 , 44 ( 9 ): 1 - 4, 35 . (in Chinese)
刘淼淼 , 蔡晋辉 , 李立新 , 等 . 物距和光强变化对测量精度的影响研究及补偿 [J]. 仪表技术与传感器 , 2023 ( 9 ): 100 - 103, 111 .
LIU M M , CAI J H , LI L X , et al . Research and compensation of influence of object distance and light intensity changes on measurement accuracy [J]. Instrument Technique and Sensor , 2023 ( 9 ): 100 - 103, 111 . (in Chinese)
于正林 , 夏扬 , 胡静 . 汽车油封尺寸检测系统中光照强度的研究 [J]. 机电工程技术 , 2022 , 51 ( 7 ): 40 - 44 .
YU ZH L , XIA Y , HU J . Research on light intensity in automobile oil seal dimension detection system [J]. Mechanical & Electrical Engineering Technology , 2022 , 51 ( 7 ): 40 - 44 . (in Chinese)
毕超 , 于宏伟 , 骆丹 , 等 . 基于灰度均值的小孔环带误差补偿方法研究 [J]. 航空精密制造技术 , 2025 , 61 ( 4 ): 13 - 16 .
BI CH , YU H W , LUO D , et al . Study on error compensation method for the annular zone based on average gray value [J]. Aviation Precision Manufacturing Technology , 2025 , 61 ( 4 ): 13 - 16 . (in Chinese)
VICINI D , KOLTUN V , JAKOB W . A learned shape-adaptive subsurface scattering model [J]. ACM Transactions on Graphics , 2019 , 38 ( 4 ): 1 - 15 . doi: 10.1145/3306346.3322974 http://dx.doi.org/10.1145/3306346.3322974
KIRILLOV A , MINTUN E , RAVI N , et al . Segment anything [EB/OL]. 2023 : arXiv : 2304 . 02643 . https://arxiv.org/abs/2304.02643 https://arxiv.org/abs/2304.02643 . doi: 10.1109/iccv51070.2023.00371 http://dx.doi.org/10.1109/iccv51070.2023.00371
MIRJALILI S , LEWIS A . The whale optimization algorithm [J]. Advances in Engineering Software , 2016 , 95 : 51 - 67 . doi: 10.1016/j.advengsoft.2016.01.008 http://dx.doi.org/10.1016/j.advengsoft.2016.01.008
田原嫄 , 谭庆昌 , 张海波 , 等 . 亚像素边缘定位算法的稳定性分析 [J]. 计算机工程 , 2010 , 36 ( 7 ): 211 - 213 . doi: 10.3969/j.issn.1000-3428.2010.07.073 http://dx.doi.org/10.3969/j.issn.1000-3428.2010.07.073
TIAN Y Y , TAN Q CH , ZHANG H B , et al . Stability analysis of subpixel edge location algorithm [J]. Computer Engineering , 2010 , 36 ( 7 ): 211 - 213 . (in Chinese) . doi: 10.3969/j.issn.1000-3428.2010.07.073 http://dx.doi.org/10.3969/j.issn.1000-3428.2010.07.073
曾猛杰 , 汪晨曦 , 赖俊杰 , 等 . 亚像素边缘检测算法综述 [J]. 光学 精密工程 , 2024 , 32 ( 23 ): 3513 - 3524 . doi: 10.37188/ope.20243223.3513 http://dx.doi.org/10.37188/ope.20243223.3513
ZENG M J , WANG CH X , LAI J J , et al . Review of sub-pixel edge detection algorithms [J]. Optics and Precision Engineering , 2024 , 32 ( 23 ): 3513 - 3524 . (in Chinese) . doi: 10.37188/ope.20243223.3513 http://dx.doi.org/10.37188/ope.20243223.3513
杜港 , 佟强 , 侯凌燕 , 等 . 基于Canny-Franklin矩的亚像素边缘检测方法 [J]. 计算机集成制造系统 , 2025 , 31 ( 3 ): 903 - 912 .
DU G , TONG Q , HOU L Y , et al . Sub-pixel edge detection method based on Canny-Franklin moments [J]. Computer Integrated Manufacturing Systems , 2025 , 31 ( 3 ): 903 - 912 . (in Chinese)
韩东 , 李煜祺 , 武彦辉 . 基于高斯拟合的亚像素边缘检测算法 [J]. 计算机应用与软件 , 2018 , 35 ( 6 ): 210 - 213, 229 . doi: 10.3969/j.issn.1000-386x.2018.06.038 http://dx.doi.org/10.3969/j.issn.1000-386x.2018.06.038
HAN D , LI Y Q , WU Y H . Sub-pixel edge detection based on Gaussian fitting [J]. Computer Applications and Software , 2018 , 35 ( 6 ): 210 - 213, 229 . (in Chinese) . doi: 10.3969/j.issn.1000-386x.2018.06.038 http://dx.doi.org/10.3969/j.issn.1000-386x.2018.06.038
0
浏览量
0
下载量
0
CSCD
关联资源
相关文章
相关作者
相关机构
京公网安备11010802024621
