﻿ 高斯拟合光斑定位算法推导及性能探讨
 光学仪器  2023, Vol. 45 Issue (1): 67-72 PDF

Derivation and performance discussion of simulated spot location algorithm based on Gaussian fitting
WANG Guojun
Guangzhou Expressway Co., LTD., Guangzhou 510330, China
Abstract: This paper mainly solves the problem of accurate positioning of reference points in deflection measurement of concrete structures. The fitting algorithm of Gaussian spot is derived. The existence of the parameter Krame-Rowe lower bound is proved, and the corresponding parameters are optimized by the Levenberg-Marquardt method. The experimental results show that the root mean square error attenuated by the center extracted by the Gaussian fitting spot localization algorithm based on nonlinear parameter optimization is 0 when the signal-to-noise ratio is 40 dB. As the contrast decreases, the extraction accuracy of the three methods deteriorates. The Gaussian fitted spot localization algorithm based on nonlinear parameter optimization is superior to other algorithms before the contrast drops to 25% of the original image, but this advantage disappears when the contrast continues to decrease. It shows that in the case of good contrast, it can not only ensure accuracy but also improve robustness.
Key words: nonlinear parameter optimization    Gaussian fitting    function fitting    theoretical derivation    spot location

1 研究背景介绍

 图 1 混凝土表面图像 Figure 1 Concrete surface image

 图 2 观察点标靶形式 Figure 2 Observation point target form

 图 3 激光指示光斑 Figure 3 Laser indication spot

2 基于高斯拟合的单激光光斑定位算法研究 2.1 基于高斯拟合光斑算法的推导

 $I\left(x\text{，}y\right)=W\cdot \mathrm{exp}\left\{-\left[\frac{{\left(x-{x}_{0}\right)}^{2}}{{\sigma }_{1}^{2}}+\frac{{\left(y-{y}_{0}\right)}^{2}}{{\sigma }_{2}^{2}}\right]\right\}$ (1)

 $z=a{x}^{2}+b{y}^{2}+cx+dy+f$ (2)

 $\left\{ \begin{gathered}a=\displaystyle-\frac{1}{{\sigma }_{1}^{2}} \\ b=\displaystyle-\frac{1}{{\sigma }_{2}^{2}} \\ c=\displaystyle\frac{2{x}_{0}}{{\sigma }_{1}^{2}} \\ d=\displaystyle\frac{2{y}_{0}}{{\sigma }_{2}^{2}} \\ f=\displaystyle {\rm{ln}}\;H-{x}_{0}^{2}/{\sigma}_{1}^{2}-{y}_{0}^{2}/{\sigma }_{2}^{2} \\ z={\rm{ln}}\;I(x,y) \\ \end{gathered}\right.$ (3)

 ${\varepsilon }_{i}=(a{x}_{i}^{\mathrm{'}2}+b{y}_{i}^{\mathrm{'}2}+c{x}_{i}^{\mathrm{'}}+d{y}_{i}^{\mathrm{'}}+f)-{z}_{i}^{\mathrm{'}}$ (4)

 $\left[\begin{array}{ccccc}{x}_{1}^{\mathrm{'}2}& {y}_{1}^{\mathrm{'}2}& {x}_{1}^{\mathrm{'}}& {y}_{1}^{\mathrm{'}}& 1\\ {x}_{2}^{\mathrm{'}2}& {y}_{2}^{\mathrm{'}2}& {x}_{2}^{\mathrm{'}}& {y}_{2}^{\mathrm{'}}& 1\\ {x}_{3}^{\mathrm{'}2}& {y}_{3}^{\mathrm{'}2}& {x}_{3}^{\mathrm{'}}& {y}_{3}^{\mathrm{'}}& 1\\ \vdots & \vdots & \vdots&\vdots&\vdots \\ {x}_{n}^{\mathrm{'}2}& {y}_{n}^{\mathrm{'}2}& {x}_{n}^{\mathrm{'}}& {y}_{n}^{\mathrm{'}}& 1\end{array}\right]\left[\begin{array}{c}a\\ b\\ c\\ d\\ f\end{array}\right]=\left[\begin{array}{c}{z}_{1}^{\mathrm{'}}\\ {z}_{2}^{\mathrm{'}}\\ {z}_{3}^{\mathrm{'}}\\ \vdots \\ {z}_{n}^{\mathrm{'}}\end{array}\right]$ (5)

2.2 非线性参数的克拉美−罗下界证明

 $L({z}^{\mathrm{'}},p)=\prod _{i\text{，}j}\frac{1}{\sqrt{2\text{π} {\sigma }^{2}}}\mathrm{e}\mathrm{x}\mathrm{p}\left[-\frac{1}{2{\sigma }^{2}}{({z}_{i,j}^{\mathrm{'}}-{z}_{i,j})}^{2}\right]$ (6)

 $\mathrm{l}\mathrm{n}({z}^{\mathrm{'}}\text{,}p)=-\frac{N}{2}\mathrm{l}\mathrm{n}\left(2\text{π} {\sigma }^{2}\right)-\frac{1}{2{\sigma }^{2}}\sum _{i,j}{({z}_{i,j}^{\mathrm{'}}-{z}_{i,j})}^{2}$ (7)

 $\begin{split} \displaystyle \frac{{\partial }^{2}\mathrm{ln}\;L \left({z}^{\mathrm{'}}\text{,}p\right)}{\partial {p}^{2}} = & \displaystyle \frac{1}{{ \displaystyle \sigma }^{2}}\sum _{i,j}\frac{{\partial }^{2}{z}_{i,j}}{\partial {p}^{2}}\left({z}_{i,j}^{\mathrm{'}} - {z}_{i,j}\right) - \\ &\frac{1}{{\sigma }^{2}} \sum _{i,j}{ \left(\frac{\partial {z}_{i,j}}{\partial p}\right)}^{2} \end{split}$ (8)

 $E\left[\frac{{\partial }^{2}\mathrm{l}\mathrm{n}\;L({z}^{\mathrm{'}}\text{,}p)}{\partial {p}^{2}}\right]=-\frac{1}{{\sigma }^{2}}\sum _{i,j}{\left(\frac{\partial {z}_{i,j}}{\partial p}\right)}^{2}$ (9)

 $\mathrm{v}\mathrm{a}\mathrm{r}\left(\hat{p}\right){\text{≥}} \displaystyle \frac{1}{-E\left[\displaystyle \frac{{\partial }^{2}\mathrm{l}\mathrm{n}\;L({z}^{\mathrm{'}}\text{,}p)}{\partial {p}^{2}}\right]}$ (10)
2.3 基于莱文贝格−马夸特的非线性参数优化

 $r\left(p\right)=z-{z}_{i}^{\mathrm{'}}$ (11)

 ${p}^{\mathrm{*}}=\mathrm{a}\mathrm{r}\mathrm{g}\;\underset{p}{{\rm{min}}}\left\{R\right(p\left)\right\}$ (12)

 $r(p+h)=r\left(p\right)+{\boldsymbol{J}}\left(p\right)h+O(\parallel h{\parallel }^{2})$ (13)

 ${J}_{11}=\frac{\partial {r}_{1}}{\partial a}=-{x}^{2}$ (14)
 ${J}_{12}=\frac{\partial {r}_{1}}{\partial b}=-{y}^{2}$ (15)
 ${J}_{13}=\frac{\partial {r}_{1}}{\partial c}=-x$ (16)
 ${J}_{14}=\frac{\partial {r}_{1}}{\partial d}=-y$ (17)
 ${J}_{15}=\frac{\partial {r}_{1}}{\partial f}=-1$ (18)

 $R(p+h)\simeq L\left(h\right)=R\left(p\right)+{h}^{{\rm{T}}}{{\boldsymbol{J}}}^{{\rm{T}}}r+0.5{h}^{{\rm{T}}}{{\boldsymbol{J}}}^{{\rm{T}}}{\boldsymbol{J}}h$ (19)

$L\left(h\right)$ 的梯度和黑森量分别为

 ${L}^{\mathrm{'}}\left(h\right)={{\boldsymbol{J}}}^{{\rm{T}}}r+{{\boldsymbol{J}}}^{{\rm{T}}}{\boldsymbol{J}}h\text{，}{L}^{\mathrm{'}\mathrm{'}}\left(h\right)={{\boldsymbol{J}}}^{{\rm{T}}}{\boldsymbol{J}}$ (20)

${{L}}^{\mathrm{'}\mathrm{'}}\left({h}\right)$ 独立于h。如果J是满秩，它是对称的。换句话说， ${R}({p}+{h})$ 将有q个极小值，可以通过求解如下式子得到

 $h=-{\left({{\boldsymbol{J}}}^{{\rm{T}}}{\boldsymbol{J}}\right)}^{-1}{{\boldsymbol{J}}}^{{\rm{T}}}r$ (21)

 $h=-{({{\boldsymbol{J}}}^{{\rm{T}}}{\boldsymbol{J}}+\mu {\boldsymbol{I}})}^{-1}{{\boldsymbol{J}}}^{{\rm{T}}}r$ (22)

 $(\parallel h\parallel{\text{≤}} {\varepsilon }_{1})\;{{\rm{and}}}\;[\parallel {r}_{{\rm{new}}}-r\parallel{\text{≤}} (\parallel r\parallel +{\varepsilon }_{2}\left)\right]$ (23)

3 算法性能研究 3.1 实验设备及假定

3.2 算法性能测试

 图 4 3种算法噪声鲁棒性测试结果 Figure 4 Noise robustness test results of the three algorithms

3.3 算法鲁棒性测试

 图 5 3种算法的低对比度测试结果 Figure 5 Low contrast test results of the three algorithms

 图 6 模拟光斑图像中检测到的对象 Figure 6 Simulation of an object detected in a spot image
4 结 论

 [1] 山清. 半主动激光制导炸弹测试系统设计[J]. 激光与红外, 2020, 50(4): 425–428. DOI:10.3969/j.issn.1001-5078.2020.04.007 [2] 宋明珠. 海洋弱小动态目标光学探测技术研究[D]. 长春: 中国科学院大学(中国科学院长春光学精密机械与物理研究所), 2020: 45 − 67. [3] 朱鸿鹄, 施斌, 张诚成. 地质和岩土工程光电传感监测研究新进展—第六届OSMG国际论坛综述[J]. 工程地质学报, 2020, 28(1): 178–188. [4] 何广达, 王洪顺, 李强. 基于计算机视觉的激光检测系统研究[J]. 激光杂志, 2015, 36(9): 44–47. DOI:10.14016/j.cnki.jgzz.2015.09.044 [5] KONG F P, POLO M C, LAMBERT A. Centroid estimation for a Shack–Hartmann wavefront sensor based on stream processing[J]. Applied Optics, 2017, 56(23): 6466–6475. DOI:10.1364/AO.56.006466 [6] WERNER F, GDANIEC N, KNOPP T. First experimental comparison between the Cartesian and the Lissajous trajectory for magnetic particle imaging[J]. Physics in Medicine & Biology, 2017, 62(9): 3407–3421. [7] GRASS D, FESEL J, HOFER S G, et al. Optical trapping and control of nanoparticles inside evacuated hollow core photonic crystal fibers[J]. Applied Physics Letters, 2016, 108(22): 221103. DOI:10.1063/1.4953025 [8] XIN L, XU L J, CAO Z. Laser spot center location by using the gradient-based and least square algorithms[C]//Proceedings of 2013 IEEE International Instrumentation and Measurement Technology Conference. Minneapolis: IEEE, 2013,doi: 10.1109/I2MTC.2013.6555612. [9] LUHMANN T. Eccentricity in images of circular and spherical targets and its impact to 3D object reconstruction[C]//Proceedings of the International Archives of the Photogrammetry, Remote Sensing and Spatial Information Sciences. Riva del Garda: ISPRS, 2014: 363 − 370. [10] FU Z X, HAN Y. Centroid weighted Kalman filter for visual object tracking[J]. Measurement, 2012, 45(4): 650–655. DOI:10.1016/j.measurement.2012.01.004 [11] BU G C, WANG P. Adaptive circle-ellipse fitting method for estimating tree diameter based on single terrestrial laser scanning[J]. Journal of Applied Remote Sensing, 2016, 10(2): 026040. DOI:10.1117/1.JRS.10.026040 [12] WELFER D, SCHARCANSKI J, MARINHO D R. Fovea center detection based on the retina anatomy and mathematical morphology[J]. Computer Methods and Programs in Biomedicine, 2011, 104(3): 397–409. DOI:10.1016/j.cmpb.2010.07.006 [13] ALKORTA J, MARTELEUR M, JACQUES P J. Improved simulation based HR-EBSD procedure using image gradient based DIC techniques[J]. Ultramicroscopy, 2017, 182: 17–27. DOI:10.1016/j.ultramic.2017.06.015 [14] 甘宏, 张超, 李林, 等. 复杂背景下激光条纹中心亚像素提取方法[J]. 光电工程, 2019, 46(2): 82–89. [15] JIN X, LIU L, CHEN Y Q, et al. Point spread function and depth-invariant focal sweep point spread function for plenoptic camera 2.0[J]. Optics Express, 2017, 25(9): 9947–9962. DOI:10.1364/OE.25.009947 [16] LI Q Y, TAKAHASHI K, ZHANG X. Frequency-domain Raman method to measure thermal diffusivity of one-dimensional microfibers and nanowires[J]. International Journal of Heat and Mass Transfer, 2019, 134: 539–546. DOI:10.1016/j.ijheatmasstransfer.2019.01.057 [17] HAMDOLLAHZADEH M, AMIRI R, BEHNIA F. Moving target localization in bistatic forward scatter radars: performance study and efficient estimators[J]. IEEE Transactions on Aerospace and Electronic Systems, 2020, 56(2): 1582–1594. DOI:10.1109/TAES.2019.2934007 [18] 翟新伟, 李志斌. 基于小波变换的高斯曲线拟合在峰值定位中的应用[J]. 光通信技术, 2020, 44(2): 10–13. DOI:10.13921/j.cnki.issn1002-5561.2020.02.003 [19] SEONG N H, JUNG D, KIM J, et al. Evaluation of NDVI estimation considering atmospheric and BRDF correction through himawari-8/AHI[J]. Asia-Pacific Journal of Atmospheric Sciences, 2020, 56(2): 265–274. DOI:10.1007/s13143-019-00167-0