趙涵卓,高 楠,孟召宗,張宗華
雙視角三維測量系統(tǒng)同時標(biāo)定方法
趙涵卓,高 楠*,孟召宗,張宗華
河北工業(yè)大學(xué)機械工程學(xué)院,天津 300130
針對現(xiàn)有標(biāo)定方法在相機無公共視場情況下的局限性,本文提出使用雙平面標(biāo)定板對雙相機進(jìn)行同時標(biāo)定的方法。通過推導(dǎo)兩個相機與兩個標(biāo)定板間的坐標(biāo)變換,將待標(biāo)定相機與參考相機的相對位姿關(guān)系的求解轉(zhuǎn)換為較為成熟的手眼標(biāo)定方程求解。通過實驗驗證:該方法可實現(xiàn)雙相機的同時標(biāo)定,且方法的絕對誤差不超過0.089 mm,較為可靠;在雙視角三維測量系統(tǒng)中,與相位-深度的累積誤差不超過0.116 mm,可為進(jìn)一步的數(shù)據(jù)融合提供可靠的初值。此外,由于本方法靈活方便,可適用于多視角三維測量系統(tǒng)的同時標(biāo)定。
雙視角測量;全局標(biāo)定;系統(tǒng)標(biāo)定;條紋投影
條紋投影測量法由于其結(jié)構(gòu)簡單、精度和分辨率高、可全場測量等突出的優(yōu)點[1],被廣泛應(yīng)用在各個領(lǐng)域,其中單視角的條紋投影系統(tǒng)組成簡單,能夠快速、方便地測量被測目標(biāo)物體的三維信息。目前關(guān)于單視角系統(tǒng)的研究已有很多[2-5],雙視角系統(tǒng)是單視角系統(tǒng)的延伸,通過擴展相機的視場,獲得更大范圍的三維幾何信息。在雙視角三維測量系統(tǒng)中,兩相機坐標(biāo)系之間相互獨立,所以需要確定兩相機的相對位姿關(guān)系并將兩相機坐標(biāo)系統(tǒng)一到一個坐標(biāo)系下,這一過程被稱為全局標(biāo)定,全局標(biāo)定是實現(xiàn)雙視角及多視角系統(tǒng)標(biāo)定的關(guān)鍵[6]。
近些年來,國內(nèi)外學(xué)者提出了許多雙相機及多相機全局標(biāo)定方法。例如,蘇顯渝等人[7]利用經(jīng)緯儀或激光跟蹤儀組成空間坐標(biāo)系測量系統(tǒng)測得各個相機之間的角度及距離關(guān)系,求解出多相機之間的轉(zhuǎn)換關(guān)系。魯亞楠等人[8]提出了通過旋轉(zhuǎn)臺帶動平面標(biāo)靶旋轉(zhuǎn)適當(dāng)角度,即可求解出旋轉(zhuǎn)臺旋轉(zhuǎn)角度與待標(biāo)定相機坐標(biāo)系之間的非線性關(guān)系,得到多相機之間的轉(zhuǎn)換矩陣的方法。Liu Z等人[9]使用激光雷達(dá)掃描得到組成立體靶標(biāo)的三個標(biāo)板之間的位姿關(guān)系,然后利用該立體靶標(biāo)完成三個相機的標(biāo)定。以上方法簡單有效,但是均需借助輔助設(shè)備,成本較高。Besl等人[10]基于ICP(iterative closest point)算法提出了多視角三維數(shù)據(jù)的融合方法,該方法及其改進(jìn)算法后來也成為相機視角中應(yīng)用最廣泛的融合算法。但是,兩相機相對位姿關(guān)系初值的準(zhǔn)確性會直接決定ICP算法的速度和魯棒性,對于多相機初值的確定有以下幾個方法:楚圣輝等人[11]將一個大平面標(biāo)定板置于4個待標(biāo)定相機的公共視場內(nèi),以標(biāo)定板為中介統(tǒng)一各個相機坐標(biāo)系到一個坐標(biāo)系來完成多相機的全局標(biāo)定,但是該方法只適用于多相機視角方向一致的情況;潘華偉等人[12]對該類方法進(jìn)行改進(jìn),采用平面標(biāo)定板依次標(biāo)定兩個相鄰相機的內(nèi)外參數(shù),最后逐個將各相機坐標(biāo)系轉(zhuǎn)換到一個相機坐標(biāo)系,該方法雖然可完成無公共視場的多個相機的標(biāo)定,但是操作復(fù)雜且無法實現(xiàn)多相機的同時標(biāo)定。郎威等人[13]提出了通過旋轉(zhuǎn)臺帶動平面標(biāo)靶旋轉(zhuǎn)適當(dāng)角度,求解出旋轉(zhuǎn)臺旋轉(zhuǎn)角度與待標(biāo)定相機坐標(biāo)系之間的轉(zhuǎn)換關(guān)系,繼而求得多相機之間的相對位姿關(guān)系,該方法性能穩(wěn)定,但只能獲取特定視角下三維數(shù)據(jù)的位置關(guān)系。
本文針對現(xiàn)有雙視角及多視角三維測量系統(tǒng)中全局標(biāo)定方法中存在的局限性,提出了一種利用兩塊平面標(biāo)定板實現(xiàn)雙視角全局標(biāo)定的方法:將待標(biāo)定相機坐標(biāo)系與參考坐標(biāo)系的轉(zhuǎn)換矩陣的求解轉(zhuǎn)換為機器人領(lǐng)域中研究較為成熟的手眼標(biāo)定方程的求解問題。該方法無需額外的輔助設(shè)備,操作簡單,且可滿足大部分測量場景的精度要求。
圖1 測量系統(tǒng)模型
單視角相移條紋投影測量系統(tǒng)的數(shù)學(xué)模型如圖1所示。經(jīng)過一系列公式推導(dǎo),相位和深度數(shù)據(jù)之間的關(guān)系可用一個多項式對其進(jìn)行擬合[14]:
由于標(biāo)定板中所有標(biāo)識點的w和w是精確已知的,因此可以通過該標(biāo)識點找到相機坐標(biāo)系中所有特征點的位置。將標(biāo)定板在相機和投影儀的公共市場內(nèi)任意擺放若干個位置,并令中間的一個位置為參考面,則該參考面可描述為
一旦平面方程的參數(shù)確定,其他任何位置的標(biāo)定板上的點對應(yīng)參考面的高度便可表示為
這樣標(biāo)定板只要在相機和投影儀的公共視場內(nèi)任意擺放若干個位置便可完成每個視角下相對深度值。相對相位值可通過相移法[15]及最佳條紋法相結(jié)合的方法獲取。
考慮雙平面標(biāo)靶的第次和次這兩個擺放位置,結(jié)合兩個標(biāo)定板之間位置關(guān)系不變、兩個相機之間位置關(guān)系也不變這兩個約束條件,則可將式(6)整理得:
進(jìn)一步的整理合并可得:
為了驗證本文提出的標(biāo)定方法的準(zhǔn)確性,根據(jù)條紋投影三維測量技術(shù)的原理,研制了一套如圖3所示的雙視角三維測量系統(tǒng)固定于光學(xué)平臺上,作為該課題所需的硬件系統(tǒng)。選用精度高、可靠性強且輸出穩(wěn)定的BenQCP270的數(shù)字投影儀一臺,物理分辨率是1024 pixels×768 pixels;選用具有高速傳輸、信噪比高、實用性強等優(yōu)點的SVS-eco655CVGE相機兩臺,其分辨率為1280 pixels×1024 pixels,搭配的鏡頭的變焦焦距為12 mm~36 mm。
首先完成兩個視角的相機標(biāo)定及全局標(biāo)定,標(biāo)定用的雙棋盤格標(biāo)定板如圖4,其中每個標(biāo)定板上的棋盤格數(shù)量為13×12,每個棋盤格的邊長為6 mm,兩個標(biāo)定板之間的位置靈活可調(diào),當(dāng)兩個相機均可拍攝到較高質(zhì)量的圖像時,對兩個標(biāo)定板分別進(jìn)行固定,使兩個標(biāo)定板固定連接為一體。具體標(biāo)定流程如下:
步驟1:將如圖5所示的雙平面標(biāo)定板擺放于相機視場中20個位置,使每個位置與相機光軸有較大的夾角并盡量使其與光軸對稱;
步驟2:相機1拍攝標(biāo)定板1,相機2拍攝標(biāo)定板2,兩相機分別將采集到的標(biāo)定板圖像傳輸?shù)接嬎銠C;
步驟3:分別載入兩個相機采集的圖像,輸入特征點物理間距,提取特征點角點坐標(biāo),使用張正友法完成兩相機的內(nèi)參及畸變系數(shù)的標(biāo)定;
步驟4:利用標(biāo)定出的畸變系數(shù)對兩個棋盤格標(biāo)定板的圖像坐標(biāo)進(jìn)行畸變校正,并重復(fù)步驟3,更精確求解出相機的內(nèi)參。
步驟5:利用本文提出的多相機全局標(biāo)定方法和已修正畸變的雙平面標(biāo)定板上的特征點的像素及相機坐標(biāo),進(jìn)行全局標(biāo)定。
為了驗證全局標(biāo)定精度,將一個較大的高精度陶瓷平面標(biāo)定板擺放在兩個相機前,如圖5所示,該標(biāo)定板棋盤格的標(biāo)準(zhǔn)間距為20 mm。假設(shè)相機1拍攝的特征點在相機1坐標(biāo)系下的三維坐標(biāo)為b1,其相鄰特征點在相機2坐標(biāo)系下的三維坐標(biāo)為b2。根據(jù)全局標(biāo)定結(jié)果將b2轉(zhuǎn)換到相機1坐標(biāo)系下得到b1。計算b1與b1之間的距離,將計算距離與真實距離之間的誤差作為全局標(biāo)定的絕對誤差。本文將驗證標(biāo)定板擺放了三個位置,每個圖驗證位置處選擇如圖6中標(biāo)紅的44個距離,計算得到的最大誤差、最小誤差和平均誤差如表1所示。
由全局標(biāo)定的驗證結(jié)果可知,本文確定的全局標(biāo)定方法標(biāo)定誤差最高為0.089 mm,標(biāo)定結(jié)果較為可靠。
圖3 雙視角三維測量系統(tǒng)
圖4 雙棋盤格標(biāo)定板
圖5 全局標(biāo)定精度驗證
圖6 選取的驗證距離
圖7 雙圓環(huán)標(biāo)定板
表1 全局標(biāo)定精度驗證結(jié)果
由于條紋投影三維測量中需要向標(biāo)定板投射高對比度的條紋以完成相位的提取,但由于標(biāo)定板上黑色棋盤格部分對條紋具有低反射率,解算得到的絕對相位會缺失一部分的相位數(shù)據(jù),導(dǎo)致最終標(biāo)定精度的下降。故在兩個子系統(tǒng)的同時標(biāo)定中采用如圖7的兩個等間距圓環(huán)標(biāo)定板完成,其中每個標(biāo)定板上的圓環(huán)數(shù)量為9×12,每兩個相鄰圓環(huán)中心的間距為7.5 mm。這樣每個視角都使用的是對應(yīng)的圓環(huán)標(biāo)定板進(jìn)行標(biāo)定,從而既可以實現(xiàn)無重疊視場節(jié)點間的同時標(biāo)定,還可以避免圓環(huán)由于傾斜角度過大而導(dǎo)致的圓心偏差。本系統(tǒng)選擇的相移條紋數(shù)為100、99及90,每組條紋圖之間的相位差為π/2,即每組條紋圖都符合四步相移法。
系統(tǒng)標(biāo)定完成之后,使用具有平行面的臺階來驗證系統(tǒng)精度,該臺階面之間的真實間距由精度為1 μm的三坐標(biāo)測量儀測得。與系統(tǒng)標(biāo)定實驗相同,利用相移法及最佳條紋相結(jié)合的方法獲得臺階表面的絕對相位信息,由已標(biāo)定的系統(tǒng)參數(shù)和得到的臺階的展開相位可算出每個臺階面上所有點的相對深度,恢復(fù)出臺階的三維形貌。如圖8為視角1恢復(fù)的實驗結(jié)果,圖9為視角2恢復(fù)的實驗結(jié)果。在每個臺階面上選擇靠臺階面中間的大部分點擬合出5個相互平行的平面,然后在每個臺階面上均勻地取一定量的點,利用Geomagic 11中的工具測量它們到相鄰臺階面的距離,再對其進(jìn)行平均,就可比較準(zhǔn)確地得到相鄰臺階面的測量間距。
由于兩個視角恢復(fù)出的三維點云在兩個相機坐標(biāo)系中,而兩個相機坐標(biāo)系之間的轉(zhuǎn)換關(guān)系已通過全局標(biāo)定得到,于是我們將兩片點云轉(zhuǎn)換到一個坐標(biāo)系下進(jìn)行融合,融合結(jié)果如圖10所示,可見無明顯的分層和錯位的現(xiàn)象。然后同樣對融合的臺階面之間的距離進(jìn)行擬合計算,便可得到融合臺階的測量結(jié)果。視角1、視角2恢復(fù)出的臺階以及兩視角融合臺階的測量距離和測量誤差見表2,由實驗結(jié)果可知,本文采用的全局標(biāo)定方法和子系統(tǒng)標(biāo)定方法的累計誤差不超過0.116 mm。
本文針對雙視角三維測量系統(tǒng)同時標(biāo)定方法進(jìn)行了研究。針對現(xiàn)有標(biāo)定方法中存在的局限性,采用一種新的方法,以雙平面標(biāo)定板為中介,求解出待標(biāo)定相機坐標(biāo)系與參考坐標(biāo)系的轉(zhuǎn)換矩陣。該方法無需輔助設(shè)備便可以實現(xiàn)無公共視場的雙視角系統(tǒng)的同時標(biāo)定,增強了標(biāo)定的靈活性。此外,本文確定的全局標(biāo)定方法適用于多視角三維測量系統(tǒng),當(dāng)相機數(shù)量多于兩個時,增加對應(yīng)相機數(shù)量的標(biāo)定板,便可實現(xiàn)多個相機的同時標(biāo)定。
圖8 視角1恢復(fù)的臺階三維形貌
圖9 相機2視角恢復(fù)的臺階三維形貌
圖10 兩視角融合效果圖
表2 雙視角測量結(jié)果(單位:mm)
[1] Bai X F, Zhang Z H. 3D shape measurement based on colour fringe projection techniques[J]., 2017, 38(8): 1912–1925. 白雪飛, 張宗華. 基于彩色條紋投影術(shù)的三維形貌測量[J]. 儀器儀表學(xué)報, 2017, 38(8): 1912–1925.
[2] Tang Y, Chen W J, Zhang Q,. BP neural network applied to 3D object measurement based on fringe pattern projection[J]., 2007, 34(12): 61–65. 唐燕, 陳文靜, 張強, 等. 神經(jīng)網(wǎng)絡(luò)獲取三維面形研究[J]. 光電工程, 2007, 34(12): 61–65.
[3] Li B W, Zhang S. Superfast high-resolution absolute 3D recovery of a stabilized flapping flight process[J]., 2017, 25(22): 27270–27282.
[4] Fan S H, Liu C R, Qi X T,. Accuracy analysis and verification of structured light 3D measurement system[J]., 2014, 41(5): 52–56. 范生宏, 劉昌儒, 亓?xí)酝? 等. 結(jié)構(gòu)光三維測量系統(tǒng)精度分析及驗證[J]. 光電工程, 2014, 41(5): 52–56.
[5] Luo J, Yuan J H. Geometric calibration method of 3D photogrammetric instruments using grating projection[J]., 2005, 32(11): 43–48, 67. 羅劍, 袁家虎. 光柵投影式三維攝影測量儀的幾何標(biāo)定方法[J]. 光電工程, 2005, 32(11): 43–48, 67.
[6] Chen M Y, Tang Y C, Zhou X J,. High-accuracy multi-camera reconstruction enhanced by adaptive point cloud correction algorithm[J]., 2019, 122: 170–183.
[7] Su X Y, Cheng X X, Guo L R. An automated method for 360° surface measurement of 3-D objects[J]., 1989, 9(7): 670–672. 蘇顯渝, 程曉雪, 郭履容. 三維物體360°面形自動測量方法[J]. 光學(xué)學(xué)報, 1989, 9(7): 670–672.
[8] Lu Y N, Wan Z J, Wang X J. Solution to relative position of cameras without public FOV[J]., 2017, 38(3): 400–405. 魯亞楠, 萬子敬, 王向軍. 一種無公共視場相機位置關(guān)系的求解方法[J]. 應(yīng)用光學(xué), 2017, 38(3): 400–405.
[9] Liu Z, Meng Z Z, Gao N,. Calibration of the relative orientation between multiple depth cameras based on a three-dimensional target[J]., 2019, 19(13): 3008.
[10] Besl P J, McKay N D. A method for registration of 3-D shapes[J]., 1992, 14(2): 239–256.
[11] Chu S H, Zhang H M, Chen S,. Research on the calibration method of multi eye stereo vision in large scenes[J]., 2017(15): 33–38. 楚圣輝, 張慧萌, 陳碩, 等. 大場景下多目立體視覺標(biāo)定方法的研究[J]. 現(xiàn)代計算機(專業(yè)版), 2017(15): 33–38.
[12] Pan H W, Yang Z X, Gao C M,. Multi-camera calibration method using planar patterns[J]., 2011, 28(11): 4357–4360. 潘華偉, 楊振先, 高春鳴, 等. 一種基于平面模板的多攝像機標(biāo)定方法[J]. 計算機應(yīng)用研究, 2011, 28(11): 4357–4360.
[13] Lang W, Xue J P, Li C H,. Splicing of multi-view point clouds based on calibrated parameters of turntable[J]., 2019, 46(11): 1104003. 郎威, 薛俊鵬, 李承杭, 等. 基于旋轉(zhuǎn)臺參數(shù)標(biāo)定實現(xiàn)多視角點云拼接[J]. 中國激光, 2019, 46(11): 1104003.
[14] Zhang Z, Zhang D, Peng X. Performance analysis of a 3D full-field sensor based on fringe projection[J]., 2004, 42(3): 341–353.
[15] Zhou C L, Si S C, Gao C Y,. Two-step phase-shifting profilometry based on Gram-Schmidt orthonormalization[J]., 2013, 40(6): 37–42. 周燦林, 司書春, 高成勇, 等. 基于格萊姆-施密特正交化兩步相移輪廓術(shù)[J]. 光電工程, 2013, 40(6): 37–42.
[16] Tsai R Y, Lenz R K. A new technique for fully autonomous and efficient 3D robotics hand/eye calibration[J]., 1989, 5(3): 345–358.
[17] Mao J F, Shao H F, Jiang L,. Quaternion geometrical analysis on solving equationRR=RR[J]., 2010, 15(6): 951–957. 毛劍飛, 邵黃芳, 蔣莉, 等. 求解方程RR=RR的四元數(shù)幾何研究[J]. 中國圖象圖形學(xué)報, 2010, 15(6): 951–957.
[18] Wang C Y, Li L J. Hand-eye calibration algorithm for robot based on quaternion[J]., 2019, 38(12): 133–135. 王昌云, 李立君. 基于四元數(shù)的機器人手眼標(biāo)定算法[J]. 傳感器與微系統(tǒng), 2019, 38(12): 133–135.
[19] Hu W, Liu C, Fu L,. An algorithm for robot hand eye calibration with high accuracy[J]., 2018, 43(9): 19–24. 胡為, 劉沖, 傅莉, 等. 一種高精度的機器人手眼標(biāo)定算法[J]. 火力與指揮控制, 2018, 43(9): 19–24.
[20] Wei Z Z, Gao M, Zhou F Q,. Robot extended eye-in-hand calibration method based on an assistant camera[J]., 2008, 35(9): 76–80, 121. 魏振忠, 高明, 周富強, 等. 基于輔助攝像機的機器人延伸手眼標(biāo)定方法[J]. 光電工程, 2008, 35(9): 76–80, 121.
Method of simultaneous calibration of dual view 3D measurement system
Zhao Hanzhuo, Gao Nan*, Meng Zhaozong, Zhang Zonghua
College of Mechanical Engineering, Hebei University of Technology, Tianjin 300130, China
Global calibration diagram
Overview:The fringe projection measurement method is widely used in various fields due to its simple structure, high precision, and resolution, full field measurement, etc. The research on the single-view system of the fringe projection measurement method has been relatively mature. The dual-view fringe projection measurement system is an extension of the single-view fringe projection measurement system, a larger range of three-dimensional geometric information can be obtained by expanding the camera's field of view. In the dual-view fringe projection measurement system, the three-dimensional measurement results of the subsystem are always restored in the camera coordinate system, while the two camera coordinate systems are independent of each other in the dual-view fringe projection measurement system. Therefore, it is necessary to solve the transformation relationship between the two camera coordinate systems, the process of solving the transformation relationship between the two camera coordinate systems is called global calibration. Global calibration is the most important task in the calibration of dual and multi view systems. However, the existing global calibration methods require expensive auxiliary equipment when the two cameras have no common field of view, which adds a certain cost to the calibration, and when the viewing angle of the system is more than two, the method of relying on the auxiliary equipment is limited. Aiming at the limitations of the existing global calibration methods, this paper proposes a method to achieve dual-view global calibration by using two plane calibration boards: Firstly, through a series of derivation, the problem of solving the transformation matrix between the two camera coordinate systems is transformed into the problem of solving the hand-eye calibration equation which is more mature in the field of robot; Secondly, adjust the two calibration boards to the appropriate position according to the placement of the camera, and fix the two calibration boards; Thirdly, place the two calibration boards at several positions in the field of view of the two cameras at the same time to obtain several equations; Finally, the conversion matrix between the two cameras is obtained by using the quaternion method, least square method, and nonlinear optimization. The method identified in this paper does not require additional auxiliary equipment, and it is proved by quantitative experiments: this method can realize the calibration of dual cameras simultaneously and the absolute error of the method does not exceed 0.089 mm, which is relatively reliable; in the dual-view 3D measurement system, the cumulative error of global calibration and phase-depth does not exceed 0.116 mm, which can provide a reliable initial value for further data fusion. In addition, the global calibration method determined in this paper is suitable for multi-view 3D measurement systems. When the number of cameras is more than two, the calibration board corresponding to the number of cameras can be added to achieve simultaneous calibration of multiple cameras.
Zhao H Z, Gao N, Meng Z Z,Method of simultaneous calibration of dual view 3D measurement system[J]., 2021, 48(3): 200127; DOI:10.12086/oee.2021.200127
Method of simultaneous calibration of dual view 3D measurement system
Zhao Hanzhuo, Gao Nan*, Meng Zhaozong, Zhang Zonghua
College of Mechanical Engineering, Hebei University of Technology, Tianjin 300130, China
In view of the limitations of the existing methods when the camera has no common field of view, this paper proposes a method of using two plane calibration plates to calibrate two cameras at the same time. By deriving the coordinate transformation between the two cameras and two calibration plates, the solution of the relative pose relationship between any camera and the reference camera is transformed into a more mature hand-eye calibration equation. The experimental results show that this method can achieve simultaneous calibration of two cameras, and the absolute error is less than 0.089 mm. In the dual vision 3D measurement system, the cumulative error with phase height is less than 0.116 mm, which can provide a reliable initial value for the next step of data fusion.
dual vision measurement; global calibration; system calibration; fringe projection
Major Project of the Scientific Equipment Development of China (2017YFF0106404), National Natural Science Foundation of China (51675160), and Major Basic Research Projects of Hebei Applied Basic Research Program (15961701D)
10.12086/oee.2021.200127
TH741
A
* E-mail: ngao@hebut.edu.cn
趙涵卓,高楠,孟召宗,等. 雙視角三維測量系統(tǒng)同時標(biāo)定方法[J]. 光電工程,2021,48(3): 200127
Zhao H Z, Gao N, Meng Z Z,Method of simultaneous calibration of dual view 3D measurement system[J]., 2021, 48(3): 200127
2020-04-18;
2020-09-14
國家重大科學(xué)儀器設(shè)備開發(fā)重點專項(2017YFF0106404);國家自然科學(xué)基金資助項目(51675160);河北省應(yīng)用基礎(chǔ)研究計劃重點基礎(chǔ)研究資助項目(15961701D)
趙涵卓(1992-),女,碩士研究生,主要從事光學(xué)三維測量的研究。E-mail:972466185@qq.com
高楠(1982-),男,博士研究生,副教授,主要從事光學(xué)測量與光譜檢測方面的研究。E-mail:ngao@hebut.edu.cn
版權(quán)所有?2021中國科學(xué)院光電技術(shù)研究所