单相机监控偏折术测量方法 下载: 818次
ing at the problem of repeated calibration in the traditional mobile screen deflectometry, a deflectometry measurement method of single-camera monitoring is proposed based on the principle of the phase measurement deflectometry. The two positions of a LCD screen were monitored by an auxiliary camera, and the position of the LCD screen relative to the main camera was determined by the PnP method and the coordinate system transformation. The incident light was determined by the absolute phase tracking of the homonymy phase points at two positions of the LCD screen for the same pixel. Accordingly, the normal line and gradient information were determined and the mirror surface was reconstructed accurately through the radial basis function interpolation. The two cameras with different fields of view were calibrated by the mirror calibration method. The calibration was implemented only once without the repetitive error. The results of the simulation and experiments verify the feasibility of the proposed method and show the method has a relatively high detection accuracy.
1 引言
结构光三维面形测量技术主要针对漫反射表面类物体进行测量,该技术以其速度快、精度高和非接触等优点被广泛应用于工业检测、机械制造、质量控制、生物医学技术等领域。同时,针对镜面、类镜面等反射表面的测量需求也很迫切,如各种光学元件表面、高精密加工零件表面、镜面等。干涉测量技术以其精度高、非接触等优点被应用在镜面测量中,但是操作复杂、价格昂贵,即使对于一般自由曲面的反射表面,也很难进行测量。而相位测量偏折术以其原理简单、成本低、动态测量范围大、全场测量快速、适用于各种镜面物体等优点成为研究热点。
相位测量偏折术[1]用于测量镜面或类镜面的三维面形,测量系统通常采用显示屏幕或投影仪产生相移条纹。相机拍摄经待测镜面调制的变形条纹,通过相移解码技术完成相位测量,再根据系统结构参数和三维面形重建算法完成待测面形恢复。在偏折术测量方法中,主要有光线逆追踪[2]、立体偏折术[3-6] 、软件配置光学测试系统(SCOTS)[7-8]和移动屏幕[9-12]。其中移动屏幕模型是由Petz等[9]提出,采用移动屏幕获取入射光线。其方法是:相机拍摄显示屏幕在两个位置上的相移条纹图像,并通过相位解卷绕算法获得绝对相位;根据绝对相位跟踪,获得同一像素在两个屏幕上的对应点,这两个点的连线就是入射光线;法线是入射光线和反射光线的角平分线;通过三角交汇计算三维点和梯度信息,并根据梯度积分方法确定精确三维面形。
采用移动屏幕偏折术方法测量镜面面形时,需要提前标定显示屏幕和相机的位姿关系。由于至少需要将显示屏幕移动两个位置,每个位置均需要标定,因此在传统移动屏幕偏折术方法中会出现重复标定问题和引入重复标定误差降低重建精度等问题,这给该技术的实际应用带来了一定困难。例如,Petz等[9]的方法采用带有标志点的标定镜标定相机和显示屏幕的位姿关系,标定过程中首先采用摄影测量方法确定镜面表面标志点的坐标,然后通过镜像确定显示屏幕和相机的位姿关系,每次测量均需要进行重新标定。肖永亮等[10]对Petz等的标定方法进行了改进,直接采用高精度平面镜进行标定,提出了镜面标定方法,用三角交汇实现了镜面测量,但是每次测量需要对显示屏幕标定两次。Tang等[11]提出抛物面测量法,即将相机放置在抛物面焦点处对抛物面面形进行测量,但这点要求往往不能满足。测量中运用了近似,不能测量偏离抛物面较大的表面,并且测量受到了水平移动导轨精度的限制。袁婷等[12]提出用小孔光阑表示相机的位置,并且不需要标定相机光线,但是每次测量过程中仍然需要借助坐标测量仪器测量小孔光阑的位置,标定相机和显示屏幕的位姿关系。
基于以上分析,本文提出单相机监控偏折术测量方法。引入第2个相机作为辅助相机,采用此相机监控显示屏幕在该相机坐标系下的位姿关系,通过标定获得两个相机的位姿关系。经过坐标系变换,确定对应于同一条反射光线在两个显示屏幕位置上的同名相位点在主相机下的坐标,同名相位点的连线即可表示为入射光线。法线为反射光线和入射光线的角平分线,梯度从法线中获得。最终通过径向基插值函数[13-15]从梯度数据中精确恢复镜面面形。在测量过程中,只需采用镜面标定法[5,10,16-17]对具有不同视场的主辅相机标定一次。仿真和初步实验验证了所提方法的可行性。
2 单相机监控偏折术测量原理
如
对于镜面点
式中c1
式中
法线
图 1. 单相机监控偏折术测量示意图
Fig. 1. Schematic of deflectometry measurement method of single-camera monitoring
在获得梯度数据后,可通过径向基函数插值法精确确定镜面面形。基于Ettl等[15]提出的径向基函数插值方法,通过将径向基函数引入到广义Hermite插值方法中计算解析插值,并将此方法运用到梯度重建中得到精确的三维插值面形。当待测镜面可定义为两次连续可微的函数时,其面形可由采样点的径向基函数线性组合表示。大多数待测面形均满足此条件,根据采样点及其对应的梯度数据即可求解基函数线性组合的系数矩阵,最终得到精确插值面形。相比传统积分重建方法,比如傅里叶积分法、有限差分法、波前重建法等,该方法能够适用于离散梯度数据,并且允许数据采样点不规则或者采样数据具有不规则边界。
假定待测镜面点
径向基插值函数,选取Wendland Function[14]作为核函数:
式中
曲面定义为采样点的基函数线性组合,可表示为
式中
式中1≤
求得系数矩阵后,代入(6)式进行计算即可获得镜面面形。
3 标定方法
从测量方法中可以看出,首先对系统进行标定,标定主要包括:主相机内参数、辅助相机内参数、主相机和辅助相机的位姿关系。其中,目前相机内参数标定法已相对成熟,比如张正友标定法和迭代标定法,本文采用迭代标定法[19]确定主辅相机内参数。因此本文最主要的标定是确定主相机和辅助相机的位姿关系。
主相机和辅助相机不具有共同视场,其位姿关系标定具有一定的难度。受镜面位姿标定法[11]的启发,采用一个参考平面镜连接主相机和辅助相机的视场,并以平面标定板为桥梁,经过刚体变换确定主相机和辅助相机的位姿关系。
标定如
图 2. 标定示意图。(a)镜面标方法;(b)坐标系刚体变换
Fig. 2. Schematic of calibration. (a) Mirror calibration method; (b) rigid transformation of coordinate system
在实际标定时,以显示屏幕平面作为标定板。主相机通过平面镜获取显示屏幕上相移条纹,根据相位解卷绕算法计算绝对相位,继而根据周期信息获得显示屏幕位置与图像坐标的对应关系信息。当确定主相机内参数后,根据PnP方法从主相机像素点和其对应的显示屏幕上的位置计算显示屏幕在平面镜中虚像相对于主相机的位姿关系。然后平面镜位置改变3次,根据平面镜标定技术[10]中的线性求解算法计算,即可确定显示屏幕和主相机的位姿关系。值得注意的是,显示屏幕满足右手坐标系,其在平面镜中虚像为左手坐标系,在计算过程中需要将显示屏幕虚像的左手坐标系变换为右手坐标系,在文献[
10]中并没有详细说明左右手坐标系变换。本文假定显示屏幕在平面镜中的虚像在主相机中位姿关系的旋转矩阵为
式中
标定完成后,系统即可用于测量。在测量过程中,为了提高入射光线的求解精度,可以将显示屏幕移动两个位置以上,通过直线拟合提高入射光线的检测精度,从而提高三维测量的精度。
4 实验验证
为了验证提出的方法,搭建了单相机监控偏折术测量系统,如
4.1 标定工作
由两个相机分别拍摄多幅圆环标定板图案(见
表 1. 相机内参数标定结果
Table 1. Calibration results of the intrinsic parameters of cameraspixel
|
为了确定单相机监控偏折术测量中两个相机之间的位姿关系,LCD和两个相机之间的位置保持不动。首先利用平面镜对LCD上的相移条纹反射3次,主相机对平面镜上的镜像条纹成像,与此同时辅助相机直接对LCD上的相移条纹成像,最终通过健壮中国剩余定理[20]求解绝对相位,如
图 4. 双相机间位姿关系标定(图中红色方框表示绝对相位)。图(a),(b)和(c)分别为主相机对平面镜3个位姿反射的LCD条纹图案成像;图(d)为辅助相机对LCD条纹图案成像
Fig. 4. Calibration of the positions of two cameras. (a), (b) and (c) are the fringe patterns from LCD captured by camera 1 through mirror reflection at three different positions; (d) is the fringe pattern from LCD captured by camera 2. The images in the red box represent the absolute phases
通过PnP方法求解平面镜中LCD虚像在相机1坐标系下的位姿,经过左右手坐标系变换和镜面标定法确定LCD在主相机坐标系下的位姿关系c1
4.2 径向基函数仿真
通过对径向基函数进行仿真,分析梯度误差对面形重建精度的影响。仿真环境为Matlab R2015a,运行在计算机Intel CoreTM i7-3517UE CPU @1.7GHz+2.2GHz上。仿真球半径为2 mm,采样间隔为0.06 mm。如
图 5. 径向基函数仿真。(a) x方向梯度;(b) y方向梯度;(c)径向基函数插值计算面形;(d)仿真面形误差
Fig. 5. Simulation of the radial basis function. (a) Gradient in x direction; (b) gradient in y direction; (c) surface calculated from gradient data by the radial basis function interpolation; (d) simulated surface height error
当对
图 6. 引入高斯噪声后的(a) RMS误差和(b)最大误差
Fig. 6. (a) RMS error and (b) maximum error after introducing Gaussian noises in the simulation
4.3 面形重建
为了验证所提方法的精度,对一个直径为80 mm,平面度为100 nm的平面镜进行测量。LCD的位置改变两次,分别由主相机和辅助相机拍摄镜面反射条纹图像和LCD上条纹图像,并求解绝对相位,如
图 7. 主相机和辅助相机的相移条纹绝对相位。(a)和(b)为主相机对镜面反射的LCD两个位置的绝对相位(x方向和y方向);(c)和(d)为辅助相机对LCD两个位置的绝对相位
Fig. 7. Absolute phases of phase shifting fringes of camera 1 and camera 2. (a) and (b) are the absolute phases of LCD at two positions captured by camera 1; (c) and (d) are the absolute phases of LCD at two positions captured by camera 2
图 8. 镜面面形计算结果。(a) x方向梯度;(b) y方向梯度;(c) x方向梯度误差;(d) y方向梯度误差;(e)径向基函数插值计算面形;(f)面形误差
Fig. 8. Mirror surface calculation results. (a) Gradient in x direction; (b) gradient in y direction; (c) gradient error in x direction; (d) gradient error in y direction; (e) surface calculation from gradient data by the radial basis function interpolation; (f) surface height error
通过PnP求解LCD两个位置在辅助相机坐标系下的位姿,并根据标定过程中计算得到c1
在精度方面,单相机监控偏折术测量精度优于文献[ 10]的20 μm测量精度。在实用性方面,单相机监控偏折术测量方法只需要一次标定即可用于测量,而传统移动屏幕偏折术每次测量均需要标定两次。在后续工作提高精度方面,通过提高不具有共同视场的两个相机间位姿关系的标定精度即可进一步提高梯度检测精度,从而提高系统测量精度。
5 结论
在相位测量偏折术的基础上,提出了一种基于单相机监控的偏折术测量方法。该方法设备简单成本低,检测方便,可以完成对镜面的整体面形的测量。相比传统偏折术测量方法,系统只需要一次标定,测量过程中不需要进行重复标定,没有重复标定误差,测量精度较高。径向基函数仿真和实验结果表明,该方法重建精度与理论相符。下一步将提高具有不同视场的两个相机的位姿关系标定精度,以便进一步提高检测精度。
[1] Knauer MC, KaminskiJ, HauslerG. Phase measuring deflectometry: A new approach to measure specular free-form surfaces[C]. SPIE, 2004, 5457: 366- 376.
Knauer MC, KaminskiJ, HauslerG. Phase measuring deflectometry: A new approach to measure specular free-form surfaces[C]. SPIE, 2004, 5457: 366- 376.
[2] PerardD, BeyererJ. Three-dimensional measurement of specular free-form surfaces with a structured-lighting reflection technique[C]. SPIE, 1997, 3204: 74- 80.
PerardD, BeyererJ. Three-dimensional measurement of specular free-form surfaces with a structured-lighting reflection technique[C]. SPIE, 1997, 3204: 74- 80.
[4] LowitzschS, KaminskiJ, Knauer MC, et al. Vision and modeling of specular surfaces[C]. Proceedings of 10th International Fall Workshop on Vision, Modeling, and Visualization, 2005: 479- 486.
LowitzschS, KaminskiJ, Knauer MC, et al. Vision and modeling of specular surfaces[C]. Proceedings of 10th International Fall Workshop on Vision, Modeling, and Visualization, 2005: 479- 486.
[6] FaberC, OleschE, KrobotR, et al. Deflectometry challenges interferometry-The competition gets tougher[C]. SPIE, 2012, 8493: 84930R.
FaberC, OleschE, KrobotR, et al. Deflectometry challenges interferometry-The competition gets tougher[C]. SPIE, 2012, 8493: 84930R.
[9] PetzM, RitterR. Reflection grating method for 3D measurement of reflecting surfaces[C]. SPIE, 2001, 4399: 35- 41.
PetzM, RitterR. Reflection grating method for 3D measurement of reflecting surfaces[C]. SPIE, 2001, 4399: 35- 41.
[10] 肖永亮, 苏显渝, 陈文静. 基于自由镜面反射位姿评估的条纹反射摄影测量[J]. 光学学报, 2012, 32(5): 0512003.
肖永亮, 苏显渝, 陈文静. 基于自由镜面反射位姿评估的条纹反射摄影测量[J]. 光学学报, 2012, 32(5): 0512003.
[12] 袁婷, 张峰, 陶小平, 等. 基于相位测量偏折术的反射镜三维面形测量[J]. 光学学报, 2016, 36(2): 0212004.
袁婷, 张峰, 陶小平, 等. 基于相位测量偏折术的反射镜三维面形测量[J]. 光学学报, 2016, 36(2): 0212004.
[13] EttlS, KaminskiJ, HäuslerG. Generalized Hermite interpolation with radial basis functions considering only gradient data[C]. Curve and Surface Fitting: Avignon2006, 2007: 141- 149.
EttlS, KaminskiJ, HäuslerG. Generalized Hermite interpolation with radial basis functions considering only gradient data[C]. Curve and Surface Fitting: Avignon2006, 2007: 141- 149.
[16] Hesch JA, Mourikis AI, Roumeliotis SI. Mirror-based extrinsic camera calibration[M] //The 8 International Workshop on the Algorithmic Foundation of Robotics. Berlin, Heidelberg: Spinger, 2009: 285- 299.
Hesch JA, Mourikis AI, Roumeliotis SI. Mirror-based extrinsic camera calibration[M] //The 8 International Workshop on the Algorithmic Foundation of Robotics. Berlin, Heidelberg: Spinger, 2009: 285- 299.
[17] 付生鹏, 赵吉宾, 夏仁波, 等. 基于平面镜的相机-显示器快速标定方法[J]. 仪器仪表学报, 2013, 34(12): 2770-2776.
付生鹏, 赵吉宾, 夏仁波, 等. 基于平面镜的相机-显示器快速标定方法[J]. 仪器仪表学报, 2013, 34(12): 2770-2776.
Fu Shengpeng, Zhao Jibin, Xia Renbo, et al. A mirror-based fast camera-screen calibration method[J]. Chinese Journal of Scientist Instrumentation, 2013, 34(12): 2770-2776.
[19] DattaA, Kim JS, KanadeT. Accurate camera calibration using iterative refinement of control points[C]. 2009 IEEE 12th International Conference on Computer Vision Workshops (ICCV Workshops), 2009: 1201- 1208.
DattaA, Kim JS, KanadeT. Accurate camera calibration using iterative refinement of control points[C]. 2009 IEEE 12th International Conference on Computer Vision Workshops (ICCV Workshops), 2009: 1201- 1208.
[20] 张旭, 朱利民, 屠大维, 等. 基于健壮中国剩余定理的频率选择准则及其在相位解包裹中的应用[J]. 中国激光, 2012, 39(11): 1108009.
张旭, 朱利民, 屠大维, 等. 基于健壮中国剩余定理的频率选择准则及其在相位解包裹中的应用[J]. 中国激光, 2012, 39(11): 1108009.
Zhang Xu, Zhu Limin, Tu Dawei, et al. Frequency selection rule based on robust Chinese remainder theorem and its application in phase unwrapping[J]. Chinese J Lasers, 2012, 39(11): 1108009.
李晨, 张旭, 屠大维, 贾君慧, 崔伟, 张璨. 单相机监控偏折术测量方法[J]. 光学学报, 2017, 37(10): 1012007. Chen Li, Xu Zhang, Dawei Tu, Junhui Jia, Wei Cui, Can Zhang. Deflectometry Measurement Method of Single-Camera Monitoring[J]. Acta Optica Sinica, 2017, 37(10): 1012007.