-
条纹投影3维测量系统结构如图 1所示,主要由投影仪和摄像机两部分构成。测量时首先投影仪投射正弦条纹到被测物体上,同时摄像机在另一方位拍摄被物体表面高度调制的变形条纹;然后估计出变形条纹的相位[20],由此得到投影仪与摄像机图像平面间的对应关系;最后由三角测量原理得到物体表面的3维形貌[21]。相位估计精度是获得高精度3维形貌的关键之一。
-
通过相移进行变形条纹相位估计可以采用最小二乘法。在理想情况下,拍摄的第i幅变形条纹表示为:
$ {I_i}(u, v) = {I_{\rm{b}}}(u, v) + {I_{\rm{a}}}(u, v)\cos \left[ {\varphi (u, v) + {\delta _i}} \right] $
(1) 式中,Ii(u, v)为图像表达式,Ib(u, v)为背景光强,Ia(u, v)为条纹幅度,ϕ(u, v)为变形条纹相位,δi为条纹相移量,(u, v)为像素坐标。根据三角恒等式,对于每个像素点, (1)式可以写成:
$ \begin{array}{*{20}{c}} {{I_i} = a + {I_{\rm{a}}}\cos \phi \cos {\delta _i} - {I_{\rm{a}}}\sin \phi \sin {\delta _i} = }\\ {a + b\cos {\delta _i} + c\sin {\delta _i}} \end{array} $
(2) 式中a=Ib,b=Iacosϕ,c=Iasinϕ。设实际拍摄的条纹为Ii′,求解参量a,b,c使得S最小:
$ \begin{array}{*{20}{c}} {S = \sum\limits_{i = 0}^{M - 1} {{{\left( {{I_i} - I_i^\prime } \right)}^2}} = }\\ {\sum\limits_{i = 0}^{M - 1} {{{\left( {a + b\cos {\delta _i} + c\sin {\delta _i} - I_i^\prime } \right)}^2}} } \end{array} $
(3) 式中,M为相移条纹幅数。由$\frac{{\partial S}}{{\partial a}} = 0, \frac{{\partial S}}{{\partial b}} = 0, \frac{{\partial S}}{{\partial c}} = 0$可得:
$ \mathit{\boldsymbol{X}} = {\mathit{\boldsymbol{A}}^{ - 1}}\mathit{\boldsymbol{B}} $
(4) 式中,
$ \mathit{\boldsymbol{X}} = {\left[ {\begin{array}{*{20}{l}} a&b&c \end{array}} \right]^{\rm{T}}} $
(5) $ \mathit{\boldsymbol{A}} = \left[ {\begin{array}{*{20}{c}} M&{\sum\limits_{i = 0}^{M - 1} {\cos } {\delta _i}}&{\sum\limits_{i = 0}^{M - 1} {\sin } {\delta _i}}\\ {\sum\limits_{i = 0}^{M - 1} {\cos } {\delta _i}}&{\sum\limits_{i = 0}^{M - 1} {{{\cos }^2}} {\delta _i}}&{\sum\limits_{i = 0}^{M - 1} {\cos } {\delta _i}\sin {\delta _i}}\\ {\sum\limits_{i = 0}^{M - 1} {\sin } {\delta _i}}&{\sum\limits_{i = 0}^{M - 1} {\cos } {\delta _i}\sin {\delta _i}}&{\sum\limits_{i = 0}^{M - 1} {{{\sin }^2}} {\delta _i}} \end{array}} \right] $
(6) $ \mathit{\boldsymbol{B}} = {\left[ {\sum\limits_{i = 0}^{M - 1} {I_i^\prime } \;\;\;\sum\limits_{i = 0}^{M - 1} {I_i^\prime } \cos {\delta _i}\;\;\;\sum\limits_{i = 0}^{M - 1} {I_i^\prime } \sin {\delta _i}} \right]^{\rm{T}}} $
(7) 变形条纹的相位可由下式得到:
$ \phi = - \arctan \left( {\frac{c}{b}} \right) $
(8) 根据最小二乘法原理可知,在理想情况下可以得到准确的条纹相位,而当条纹的背景光强、幅度及相移量δi存在误差时, 将导致相位ϕ估计出现误差。在动态3维测量中,运动导致的附加相移是相位估计误差的主要来源。
-
投影仪可以看成是反向工作的摄像机,因此条纹投影3维测量系统等效于一个双目系统。可以在该系统中的一个对极平面(如图 2中射线lp, 1, lp, 2, lc, 1所在的平面)中从摄像机角度来分析运动导致的附加相移。在图 2中,lp和lc分别为投影仪和摄像机的图像平面与对极平面的交线,C0和C1分别为t0和t1时刻被测物体表面与对极平面的交线。假设在t0时刻投影仪图像平面上Pp, 1点对应的条纹相位为ϕ0,Pp, 2点对应的条纹相位为(ϕ0+Δϕ),则摄像机在t0时刻采集的图像平面上Pc, 1点对应的条纹相位为ϕ0。在t1时刻条纹相移了δ1,Pp, 2点对应的条纹相位为(ϕ0+Δϕ+δ1),同时物体表面相对于测量系统也有一定运动量,在图 2中,物体表面与射线lc, 1的交点由Po, 0变为Po, 1,则摄像机在t1时刻采集的图像平面上Pc, 1点对应的条纹相位为(ϕ0+Δϕ+δ1)。由上述分析可知,由于被测物体表面运动,t0, t1时刻摄像机采集到的变形条纹图像相移量由静止时的δ1变为δ1′=Δϕ+δ1。根据相移法原理,为准确估计出t0时刻的变形条纹相位ϕ0,需要获取变形条纹的实际相移量δ1′。
-
当物体表面运动随机时,无法预测附加的相移量,参考文献[14]中提出了傅里叶分析法估计实际相移量。由于傅里叶分析是一种全局分析方法,在条纹无突变情况下该方法获得了良好的效果。然而在条纹存在突变时,突变处的相移量估计存在较大误差,并且误差会以突变处为中心向周围以逐渐衰减的波动形式扩散,形成所谓的“振铃”现象。为减小相移量估计误差,作者采用加窗傅里叶分析方法估计条纹间的相移量。这样条纹相移量估计误差被限制在一定范围内。由于2维加窗傅里叶变换(2-dimensional-windowed Fourier transform,2D-WFT)很容易由1维扩展而来,这里以1维情况来讨论。
1维加窗傅里叶变换(1-dimensional-windowed Fourier transform,1D-WFT)表示如下:
$ {F_{\rm{w}}}\left( {{u_0}, \xi } \right) = \int_{ - \infty }^{ + \infty } g (u)W\left( {u - {u_0}} \right)\exp ( - {\rm{j}}\xi u){\rm{d}}u $
(9) 式中,g(u)为形变条纹的一行数据;W(u)为窗函数,u0为位移量;ξ=2πω, ω为空间频率。
由(9)式可知,加窗傅里叶变换得到的局部频谱受到窗函数的影响。由于高斯窗具有较好的时域和频域性能,这里选用它作为窗函数。引入窗口伸缩因子σ,则窗函数的定义如下:
$ W(u) = \frac{1}{{\sqrt {2{\rm{ \mathsf{ π} }}} \sigma }}\exp \left( { - \frac{{{u^2}}}{{2{\sigma ^2}}}} \right) $
(10) 窗口的大小随着的σ变化而变化,σ增大的同时,窗口也会随着逐渐增大。采用高斯窗的1D-WFT表示如下:
$ \begin{array}{*{20}{l}} {{F_{\rm{w}}}\left( {{u_0}, \xi } \right) = \frac{1}{{\sqrt {2{\rm{ \mathsf{ π} }}} \sigma }}\int_{ - \infty }^{ + \infty } g (u) \times }\\ {\exp \left[ { - \frac{{{{\left( {u - {u_0}} \right)}^2}}}{{2{\sigma ^2}}}} \right]\exp ( - {\rm{j}}\xi u){\rm{d}}u} \end{array} $
(11) 由(11)式得到的是在以u0为中心的邻域内变形条纹频谱。与傅里叶分析相移量估计类似,在频域进行滤波,滤除1级谱外的其它频谱,然后做逆傅里叶变换得到空域信息,其辐角就是变形条纹的相位。这里只求解u0点的相位,通过移动窗口就能得到所有位置的相位。由参考文献[19]可知,这个相位比相移法得到的相位误差大,但是两幅条纹间的相位差即相移量误差较小。为得到变形条纹图间相移量,对每幅图像都采用上述方法求出变形条纹的相位分布再计算相移量。设第i幅图的相位分布为ϕi(u, v),则条纹间实际相移量可表示为:
$ \left\{ {\begin{array}{*{20}{l}} {\delta _0^\prime (u, v) = 0}\\ {\delta _i^\prime (u, v) = {\phi _i}(u, v) - {\phi _{i - 1}}(u, v), (i > 0)} \end{array}} \right. $
(12)
条纹投影动态3维测量中相位高精度估计
High precision phase estimation of projected fringes in dynamic 3-D measurement
-
摘要: 为了提高条纹投影动态3-D形貌测量精度, 采用加窗傅里叶分析辅助相移的方法来减小运动导致的相移误差。首先采用加窗傅里叶分析法估计变形条纹间的实际相移量, 然后采用最小二乘法估计出变形条纹的高精度相位分布, 最后由估计的相位计算得到场景3维形貌。理论分析了物体运动对相移量的影响, 通过仿真研究了所提方法的相移量估计精度, 并搭建了实验系统进行验证。结果表明, 实验中采用所提方法的相位恢复精度达到0.1673rad, 比现有方法有明显提高。该方法用来提高条纹投影动态3-D形貌测量中相位精度是有效的。Abstract: In order to improve the accuracy of dynamic 3-D shape measurement by fringe projection, the windowed Fourier analysis was used to reduce the phase shift error caused by motion. Firstly, the actual phase shift between deformed fringes was estimated by windowed Fourier analysis. Then, the phase distribution of the deformed fringes was estimated with high precision by the least square method. Finally, 3-D shape of the scene was obtained from the estimated phase calculation. The influence of object motion on phase shift was analyzed theoretically. The phase shift estimation accuracy of the proposed method was studied by simulation. An experimental system was built to verify the results. The phase recovery accuracy of the proposed method is 0.1673rad. Compared with the existing methods, this method is obviously improved. The results show that the method is effective.
-
-
[1] CHEN F, BROWN G M, SONG M. Overview of three-dimensional ahape measurement using optical methods[J]. Optical Engineering, 2000, 39(1):10-22. doi: 10.1117/1.602438 [2] SU X Y, ZHANG Q C. Dynamic 3-D shape measurement method: A review[J]. Optics & Lasers in Engineering, 2010, 48(2):191-204. [3] ZHANG S. Recent progresses on real-time 3-D shape measurement using digital fringe projection techniques[J]. Optics & Lasers in Engi- neering, 2010, 48(2): 149-158. [4] LI H Y, LI Y, WANG H. A method for fast acquiring three-dimensional shape and color texture, acta photonica sinica[J]. Acta Photonica Sinica, 2016, 45(1): 0112003 (in Chinese). doi: 10.3788/gzxb20164501.0112003 [5] JEUGHT S V D, DIRCKX J J J. Real-time structured light profilo-metry: A review[J]. Optics & Lasers in Engineering, 2016, 87:18-31. [6] FENG W, ZHANG Q C. Analysis of membrane vibration modes based on structured light projection[J]. Laser Technology, 2015, 39(4):446-449(in Chinese). [7] XU R Ch, ZHOU Y F, ZHANG Q C, et al. 3-D shape measurement based on binocular vision and digital speckle spatio-temporal correlation[J]. Laser Journal, 2018, 39(3): 32-36(in Chinese). [8] SU X Y, ZHANG Q C, CHEN W J. Three-dimensional imaging based on structured illumination [J]. Chinese Journal of Lasers, 2014, 41(2):0209001(in Chinese). doi: 10.3788/CJL201441.0209001 [9] WU Y Sh, ZHANG Q C. Fourier transform profilometry simulation in Matlab[J]. Electronic Science and Technology, 2017, 30(6): 9-12(in Chinese). [10] GENG J. Structured-light 3-D surface imaging: A tutorial [J]. Advances in Optics and Photonics, 2011, 3(2): 128-160. doi: 10.1364/AOP.3.000128 [11] TAKEDA M, MUTOH K. Fourier transform profilometry for the automatic measurement of 3-D object shapes[J]. Applied Optics, 1983, 22(24): 3977-3982. doi: 10.1364/AO.22.003977 [12] ZHANG S, YAN S T. High-resolution, real-time 3-D absolute coordinate measurement based on a phase-shifting method[J]. Optics Express, 2006, 14(7): 2644-2649. doi: 10.1364/OE.14.002644 [13] LI J, SU X Y, GUO L R. Improved fourier-transform profil moetry for the automatic-measurement of 3-dimensional object shapes [J]. Optical Engineering, 1990, 29(12): 1439-1444. doi: 10.1117/12.55746 [14] LI Y, ZHAO C F, QIAN Y X, et al. High-speed and dense three-dimensional surface acquisition using defocused binary patterns for spatially isolated objects[J]. Optics Express, 2010, 18(21): 21628-21635. doi: 10.1364/OE.18.021628 [15] TAO T Y, CHEN Q, DA J, et al. Real-time 3-D shape measurement with composite phase-shifting fringes and multi-view system[J]. Optics Express, 2016, 24(18): 20253. doi: 10.1364/OE.24.020253 [16] WEISE T, LEIBE B, VAN G L. Fast 3-D scanning with automatic motion compensation[C]// IEEE Conference on Computer Vision & Pattern Recognition. New York, USA. IEEE, 2007: 383291. [17] CONG P Y, XIONG Z W, ZHANG Y Y. Accurate dynamic 3-D sensing with Fourier-assisted phase shifting[J]. IEEE Journal of Selected Topics in Signal Processing, 2015, 9(3): 396-399. doi: 10.1109/JSTSP.2014.2378217 [18] DONG F Q, DA F P, HUANG H. Windowed Fourier transform profilometry based on advanced S-transform[J]. Acta Optica Sinica, 2012, 32(5):0512008(in Chinese). doi: 10.3788/AOS201232.0512008 [19] QIAN K M. Two-dimensional windowed Fourier transform for fringe pattern analysis: Principles, applications and implementations[J]. Optics & Lasers in Engineering, 2007, 45(2): 304-317. [20] HAN Y, ZHANG Q C, WU Y Sh. Performance comparison of three basic phase unwrapping algorithms and their hybrids[J]. Acta Optica Sinica, 2018, 38(8): 0815006(in Chinese). doi: 10.3788/AOS201838.0815006 [21] ZHANG H H, LI Y, ZHANG H Y, et al. Calibration of PMP system using virtual planes[J]. Laser Technology, 2010, 34(5): 600-602(in Chinese).