魏泊巖,田慶國(guó)*,葛寶臻
基于彩色編碼相移條紋的相機(jī)標(biāo)定
魏泊巖1,2,田慶國(guó)1,2*,葛寶臻1,2
1天津大學(xué)精密儀器與光電子工程學(xué)院,天津 300072;2光電信息技術(shù)教育部重點(diǎn)實(shí)驗(yàn)室,天津 300072
針對(duì)傳統(tǒng)標(biāo)定方法對(duì)靶標(biāo)特征點(diǎn)模糊噪聲適應(yīng)性低的問(wèn)題,提出一種基于彩色編碼相移條紋的標(biāo)定方法。以液晶顯示面板為標(biāo)定靶,依次顯示水平和垂直彩色編碼相移條紋;通過(guò)顏色通道分離,得到正交相移條紋;結(jié)合相移理論,以正交相位截?cái)嗑€的交點(diǎn)為特征點(diǎn);多次改變靶標(biāo)位姿,提取特征點(diǎn),結(jié)合基于平面二維靶標(biāo)的標(biāo)定理論,實(shí)現(xiàn)單相機(jī)與雙目立體視覺(jué)系統(tǒng)的標(biāo)定。此外,在靶標(biāo)圖樣四角添加彩色編碼相移圓環(huán),實(shí)現(xiàn)特征點(diǎn)的自動(dòng)提取與排序,提高標(biāo)定效率。實(shí)驗(yàn)結(jié)果表明,在拍攝靶標(biāo)圖像模糊時(shí),單相機(jī)標(biāo)定的重投影誤差為0.15 pixels,標(biāo)定后雙目系統(tǒng)的測(cè)量標(biāo)準(zhǔn)偏差為0.1 mm。
相機(jī)標(biāo)定;相位靶標(biāo);相移理論;三維測(cè)量
相機(jī)標(biāo)定是視覺(jué)測(cè)量的關(guān)鍵步驟,標(biāo)定精度直接影響視覺(jué)測(cè)量系統(tǒng)的精度,因此相機(jī)標(biāo)定是視覺(jué)測(cè)量領(lǐng)域的研究熱點(diǎn)[1]?;谄矫娑S靶標(biāo)的標(biāo)定方法操作簡(jiǎn)便,應(yīng)用廣泛[2],此方法使用待標(biāo)定相機(jī)拍攝不同位姿的平面靶標(biāo),提取靶標(biāo)特征點(diǎn)的圖像坐標(biāo),通過(guò)特征點(diǎn)世界坐標(biāo)與圖像坐標(biāo)的映射關(guān)系建立方程,求解相機(jī)的內(nèi)外參數(shù)。精確提取特征點(diǎn)的圖像坐標(biāo)是通過(guò)此方法得到高精度標(biāo)定結(jié)果的前提,常見(jiàn)特征點(diǎn)有圓域的中心[3]與棋盤(pán)格角點(diǎn)[4]。但受環(huán)境因素和相機(jī)對(duì)焦誤差的影響,拍攝的靶標(biāo)圖像會(huì)出現(xiàn)不同程度的模糊[5],影響特征點(diǎn)的提取精度。而相位信息不受拍攝圖像模糊的影響[6],有學(xué)者提出使用顯示相位圖樣的液晶顯示面板作為標(biāo)定靶[7-10],通過(guò)相位編碼建立特征點(diǎn)世界坐標(biāo)與圖像坐標(biāo)的對(duì)應(yīng)關(guān)系,實(shí)現(xiàn)相機(jī)的高精度標(biāo)定。
劉元坤等[7]提出以正交正弦條紋作為靶標(biāo)圖樣,通過(guò)傅里葉分析法計(jì)算正交包裹相位分布,建立特征點(diǎn)圖像坐標(biāo)與世界坐標(biāo)的聯(lián)系,實(shí)現(xiàn)相機(jī)標(biāo)定;李璐璐等[8]針對(duì)使用傅里葉分析法處理正交正弦條紋提取邊緣特征點(diǎn)誤差較大的缺陷,采用四步相移法提取相位,以正交正弦相移條紋作為靶標(biāo)圖樣,提高標(biāo)定精度;此方法在每個(gè)靶標(biāo)位姿下,需要采集8幅圖像。Ma等[9]使用水平和垂直三步相移條紋圖作為靶標(biāo)圖樣,分別提供水平和垂直方向的相位約束,對(duì)特征點(diǎn)進(jìn)行相位編碼;此方法標(biāo)定精度高,穩(wěn)健性好,在每個(gè)靶標(biāo)位姿下,需要采集6幅圖像。楊浩等[10]通過(guò)向平面圓靶標(biāo)投射正交正弦相移條紋,對(duì)平面圓靶標(biāo)特征點(diǎn)進(jìn)行相位編碼,實(shí)現(xiàn)采集圖像模糊時(shí)相機(jī)的高精度標(biāo)定,此方法在每個(gè)靶標(biāo)位姿下,需要采集12幅圖像。相比基于傅里葉分析法的標(biāo)定方法,基于相移理論的標(biāo)定方法精度較高,但在每個(gè)靶標(biāo)位姿下需采集多幅圖像,標(biāo)定流程繁瑣。此外,上述標(biāo)定方法在提取特征點(diǎn)時(shí),需要人為干預(yù),即手動(dòng)點(diǎn)選四個(gè)外角點(diǎn),來(lái)確定特征點(diǎn)提取的目標(biāo)區(qū)域,標(biāo)定過(guò)程復(fù)雜,在此提出特征點(diǎn)自動(dòng)提取與排序算法,簡(jiǎn)化標(biāo)定流程。
為了克服相移條紋標(biāo)定方法采集圖像數(shù)目多、過(guò)程復(fù)雜等問(wèn)題,考慮彩色相位編碼條紋同時(shí)包含彩色信息和相位信息的優(yōu)勢(shì)[11-12],本文提出基于彩色編碼相移條紋的標(biāo)定方法。本方法通過(guò)彩色圖案的RGB通道編碼相移條紋,減少采集圖像的數(shù)目;在靶標(biāo)圖案四角添加彩色編碼相移圓環(huán),實(shí)現(xiàn)特征點(diǎn)自動(dòng)檢測(cè)與排序。實(shí)驗(yàn)結(jié)果表明,采集圖像模糊時(shí),仍可實(shí)現(xiàn)特征點(diǎn)自動(dòng)檢測(cè)與排序,標(biāo)定精度高;圖像模糊程度增加,標(biāo)定結(jié)果保持穩(wěn)定;相同靶標(biāo)位姿變換次數(shù)下,本文方法所需采集圖像數(shù)目為基于正交正弦相移條紋標(biāo)定方法的三分之一,且標(biāo)定精度相當(dāng);采集圖像數(shù)目相同時(shí),本文方法的標(biāo)定精度高于基于正交正弦相移條紋的標(biāo)定方法。
對(duì)于基于平面二維靶標(biāo)的標(biāo)定方法,設(shè)相機(jī)模型為針孔模型[13],世界坐標(biāo)系建立在平面二維靶標(biāo)上,則所有特征點(diǎn)的坐標(biāo)為0,特征點(diǎn)的圖像坐標(biāo)與世界坐標(biāo)的對(duì)應(yīng)關(guān)系為
根據(jù)基于二維平面靶標(biāo)標(biāo)定方法[15]:使用待標(biāo)定相機(jī)拍攝不同位姿的標(biāo)定靶,同時(shí)提取特征點(diǎn)的圖像坐標(biāo),利用特征點(diǎn)圖像坐標(biāo)與世界坐標(biāo)對(duì)應(yīng)關(guān)系,線性求解相機(jī)的內(nèi)外參數(shù);結(jié)合畸變模型,通過(guò)迭代法或多項(xiàng)式近似法[16]求解畸變系數(shù),實(shí)現(xiàn)單相機(jī)的標(biāo)定。
靶標(biāo)包含兩幅彩色圖像:垂直和水平彩色編碼相移條紋圖,其RGB通道的強(qiáng)度分布表示如下:
在每個(gè)靶標(biāo)位置,液晶顯示面板依次顯示垂直和水平彩色編碼相移條紋圖,拍攝得到的垂直和水平彩色編碼相移條紋如圖2所示,其中2(a)為垂直彩色編碼相移條紋圖,2(b)為水平彩色編碼相移條紋圖。
圖1 基于彩色編碼相移條紋的相位靶標(biāo)。(a) 垂直彩色編碼相移條紋圖;(b) 水平彩色編碼相移條紋圖
特征點(diǎn)的提取與排序步驟如下:
2) 用1,2,3表示調(diào)制處理后圖像中三個(gè)顏色通道的灰度分布。結(jié)合相移理論[19],可通過(guò)式(7)得到垂直和水平包裹相位圖。
3) 由于相位調(diào)制區(qū)域與背景存在灰度差異,通過(guò)式(8)分離相位調(diào)制區(qū)域[20]
其中閾值T為0.2時(shí)效果好,可在保留相位信息的前提下,最大程度地去除背景噪聲。在此基礎(chǔ)上,通過(guò)腐蝕膨脹[21]操作,去除包裹相位圖中的離散噪聲點(diǎn)以及孔洞。圖3為最終得到的包裹相位圖,其中3(a)為垂直包裹相位圖,3(b)為水平包裹相位圖。
圖3 去除背景后的效果。(a) 垂直包裹相位圖;(b) 水平包裹相位圖
4) 對(duì)垂直和水平包裹相位圖進(jìn)行邊緣檢測(cè)[22],將邊緣檢測(cè)的結(jié)果直接疊加,保存兩張圖中邊緣交點(diǎn)坐標(biāo)。此時(shí)邊緣交點(diǎn)為特征點(diǎn)和彩色編碼相移圓環(huán)引入的交點(diǎn),對(duì)包裹相位圖橢圓檢測(cè)[23],提取定位點(diǎn)坐標(biāo),通過(guò)判斷邊緣交點(diǎn)與定位點(diǎn)的距離即可去除彩色編碼相移圓環(huán)引入的交點(diǎn),僅保留標(biāo)定所需特征點(diǎn),如圖4(a)所示。
5) 特征點(diǎn)的排序:① 首先對(duì)四個(gè)定位點(diǎn)進(jìn)行排序:選定一個(gè)定位點(diǎn),作為定位點(diǎn)1,通過(guò)判斷特征點(diǎn)是否在定位點(diǎn)1與其余定位點(diǎn)連線同側(cè)確定對(duì)角定位點(diǎn),將定位點(diǎn)1的對(duì)角定位點(diǎn)作為定位點(diǎn)3,其余兩個(gè)定位點(diǎn)分別為定位點(diǎn)2和定位點(diǎn)4,如圖4(b)所示。② 二維平面的射影變換可用式(9)表示:
相機(jī)標(biāo)定步驟為:1) 使用液晶顯示面板作為標(biāo)定靶,改變(33)次標(biāo)定靶的位姿,在每個(gè)靶標(biāo)位姿下,依次顯示垂直和水平彩色編碼相移條紋圖,相機(jī)共計(jì)拍攝2張圖片;2) 對(duì)于每個(gè)位姿下拍攝的垂直和水平彩色編碼相移條紋圖進(jìn)行顏色通道分離,結(jié)合相移理論得到水平和垂直包裹相位圖;3) 提取水平和垂直包裹相位圖相位截?cái)嗑€,進(jìn)行疊加,得到交點(diǎn)像素坐標(biāo);4) 通過(guò)定位點(diǎn)對(duì)特征點(diǎn)進(jìn)行排序;5) 使用基于平面二維靶標(biāo)的標(biāo)定方法[15]實(shí)現(xiàn)相機(jī)標(biāo)定。
為了進(jìn)一步提高標(biāo)定精度,需對(duì)標(biāo)定得到各參數(shù)進(jìn)行非線性優(yōu)化,使得重投影誤差最小,目標(biāo)函數(shù)定義為
單相機(jī)標(biāo)定實(shí)驗(yàn)系統(tǒng)如圖5所示,待標(biāo)定相機(jī)CCD分辨率為5760 pixels′3840 pixels,鏡頭焦距為105 mm,液晶顯示面板的分辨率為3000 pixels′2000 pixels,尺寸為12.3 inch(1 inch=2.54 cm),像素間距為0.087 mm。
相機(jī)對(duì)焦于1.5 m處,此時(shí)前景深為22.4 mm(允許彌散圓半徑為0.03 mm),使用基于平面二維靶標(biāo)的標(biāo)定方法[15]進(jìn)行標(biāo)定,在成像距離1.3 m附近改變15次靶標(biāo)位姿,分別使用棋盤(pán)格靶標(biāo)標(biāo)定方法、文獻(xiàn)[7]提出的基于正交正弦條紋的標(biāo)定方法、文獻(xiàn)[9]提出的基于正交正弦相移條紋的方法以及本文方法進(jìn)行標(biāo)定實(shí)驗(yàn),標(biāo)定靶標(biāo)圖案均通過(guò)液晶顯示面板顯示,其中靶標(biāo)相鄰角點(diǎn)間距為28.7 mm。
相機(jī)內(nèi)參數(shù)標(biāo)定結(jié)果、重投影誤差如表1所示,畸變系數(shù)、標(biāo)定采集的圖像數(shù)如表2所示。
圖4 特征點(diǎn)提取與排序。(a) 特征點(diǎn)提取結(jié)果;(b) 定位點(diǎn)排序;(c) 排序后的特征點(diǎn)
圖5 實(shí)驗(yàn)裝置圖
從標(biāo)定的結(jié)果可以看出,在靶標(biāo)離焦時(shí),靶標(biāo)位姿變換次數(shù)相同的前提下,棋盤(pán)格靶標(biāo)標(biāo)定的重投影誤差最大,為0.53 pixels;三種相位靶標(biāo)的標(biāo)定重投影誤差均在0.21 pixels以下;其中文獻(xiàn)[7]提出的基于正交正弦條紋靶標(biāo)在三種相位靶標(biāo)中,標(biāo)定精度最低,重投影誤差為0.21 pixels;本文相位靶標(biāo)標(biāo)定重投影誤差為0.15 pixels,標(biāo)定精度略低于文獻(xiàn)[9]提出的基于正交正弦相移條紋靶標(biāo),但標(biāo)定所需采集圖像數(shù)目為正交正弦相移條紋靶標(biāo)的三分之一,簡(jiǎn)化了標(biāo)定步驟。
在此基礎(chǔ)上,在采集圖像數(shù)目相同的前提下進(jìn)行標(biāo)定實(shí)驗(yàn),當(dāng)采集圖像總數(shù)為30時(shí),棋盤(pán)格靶標(biāo)標(biāo)定方法可以改變30次靶標(biāo)位姿,文獻(xiàn)[7]的方法可以改變30次位姿,文獻(xiàn)[9]的方法可以改變5次位姿,本文方法可以改變15次位姿,相機(jī)的參數(shù)與液晶顯示面板參數(shù)與上述實(shí)驗(yàn)一致,標(biāo)定得到的內(nèi)參數(shù)、畸變系數(shù)以及重投影誤差如表3所示。
當(dāng)采集圖像數(shù)目相等的前提下,比較各種方法的重投影誤差,本文方法的誤差最小,為0.12 pixels;棋盤(pán)格標(biāo)定方法的誤差為0.47 pixel;文獻(xiàn)[7]方法的誤差為0.26 pixels;文獻(xiàn)[9]方法的誤差最大,為0.53 pixels。
為了進(jìn)一步驗(yàn)證所提標(biāo)定方法在圖像模糊時(shí)的魯棒性,其他實(shí)驗(yàn)參數(shù)不變,通過(guò)改變靶標(biāo)的成像距離,改變離焦程度,得到不同模糊程度的圖像。相機(jī)對(duì)焦于1.5 m處,成像距離分別為1.4 m,1.0 m,0.6 m,在每個(gè)標(biāo)定位置均改變15次標(biāo)定靶的位姿。由于改變成像距離會(huì)改變靶標(biāo)在相機(jī)視野中的占比,為了保證靶標(biāo)在相機(jī)視野中的占比一致,需要改變彩色編碼相移條紋的周期,不同標(biāo)定距離下,條紋周期分別為:(1.4 m, 250 pixels),(1.0 m, 180 pixels),(0.6 m, 100 pixels)。
表1 內(nèi)參數(shù)標(biāo)定結(jié)果
表2 畸變系數(shù)與采集圖像數(shù)目
表3 標(biāo)定結(jié)果
標(biāo)定過(guò)程中拍攝的部分靶標(biāo)圖像與對(duì)應(yīng)特征點(diǎn)提取結(jié)果如圖6所示,其中6(a)~6(c)為距離1.4 m拍攝與提取的結(jié)果,6(d)~6(f)為距離1.0 m拍攝與提取的結(jié)果,6(g)~6(i)為距離0.6 m拍攝與提取的結(jié)果。
從圖6中可以看出,隨著靶標(biāo)離焦距離增加,拍攝的圖像模糊程度增加,但是仍然可以穩(wěn)定提取特征點(diǎn),不同成像距離下內(nèi)參數(shù)、畸變系數(shù)與重投影誤差如表4所示。
從重投影誤差可以看出,隨著待標(biāo)定相機(jī)與標(biāo)定靶距離減小,圖像的離焦程度增大,標(biāo)定重投影誤差較為穩(wěn)定,最大不超過(guò)0.21 pixels,此實(shí)驗(yàn)說(shuō)明在離焦情況下,所提標(biāo)定方法魯棒性良好。
為了進(jìn)一步驗(yàn)證所提標(biāo)定方法的有效性,在單相機(jī)標(biāo)定的基礎(chǔ)上,進(jìn)行雙目立體視覺(jué)系統(tǒng)標(biāo)定和模型重建實(shí)驗(yàn)。使用雙目系統(tǒng)拍攝同一標(biāo)定靶,在標(biāo)定兩相機(jī)內(nèi)外參數(shù)與畸變系數(shù)的基礎(chǔ)上,可得到兩相機(jī)坐標(biāo)系之間的旋轉(zhuǎn)矩陣和平移向量以及系統(tǒng)結(jié)構(gòu)參數(shù)。設(shè)世界坐標(biāo)系與雙目系統(tǒng)左相機(jī)坐標(biāo)系重合,使用標(biāo)定后的雙目系統(tǒng)拍攝待測(cè)物,根據(jù)系統(tǒng)的內(nèi)外參數(shù)對(duì)拍攝得到的圖像進(jìn)行立體校正[24],并對(duì)校正后的圖像進(jìn)行立體匹配[25],得到視差圖,通過(guò)左相機(jī)圖像的像素坐標(biāo)及其對(duì)應(yīng)視差,就可得到對(duì)應(yīng)點(diǎn)的三維坐標(biāo)[26],實(shí)現(xiàn)待測(cè)物的三維重建。
實(shí)驗(yàn)系統(tǒng)如圖7所示,兩相機(jī)除焦距為70 mm外,其余參數(shù)與4.1中一致,兩相機(jī)均對(duì)焦于1.5 m處,在標(biāo)定靶成像距離1.3 m,改變15次標(biāo)定靶位姿,對(duì)雙目立體視覺(jué)系統(tǒng)進(jìn)行標(biāo)定。雙目系統(tǒng)兩相機(jī)內(nèi)參數(shù)與畸變系數(shù)如表5所示,系統(tǒng)結(jié)構(gòu)參數(shù)如表6所示。
使用標(biāo)定后的雙目系統(tǒng)在對(duì)焦位置拍攝角點(diǎn)間距為30 mm的金屬棋盤(pán)格靶標(biāo),對(duì)相鄰角點(diǎn)間距進(jìn)行測(cè)量。左右相機(jī)采集的圖像如圖8(a)、8(b)所示,對(duì)棋盤(pán)格的角點(diǎn)進(jìn)行三維重建,重建效果如圖8(c)所示,水平相鄰角點(diǎn)的平均距離為30.14 mm,垂直相鄰角點(diǎn)的平均距離為30.04 mm,所有相鄰角點(diǎn)平均距離為30.12 mm,標(biāo)準(zhǔn)差0.1 mm,說(shuō)明標(biāo)定方法有效。
圖6 不同距離下拍攝的靶標(biāo)以及對(duì)應(yīng)特征點(diǎn)提取結(jié)果。 (a)~(c) 距離1.4 m拍攝與提取的結(jié)果;(d)~(f) 距離1.0 m拍攝與提取的結(jié)果;(g)~(i) 距離0.6 m拍攝與提取的結(jié)果
表4 標(biāo)定內(nèi)參數(shù)及重投影誤差
圖7 實(shí)驗(yàn)裝置圖
在此基礎(chǔ)上,使用標(biāo)定后的雙目系統(tǒng)在對(duì)焦位置拍攝石膏人像,由于被動(dòng)雙目立體視覺(jué)方法對(duì)表面特征不明顯的物體難以獲取足夠的三維信息[27],因此對(duì)石膏人像進(jìn)行著色,增加被測(cè)物特征點(diǎn),提高立體匹配的精度。左右相機(jī)采集的圖像如圖9(a)、9(b)所示,得到的三維點(diǎn)云圖如圖10所示,其中10(a)為主視圖,10(b)為左視圖,10(c)為右視圖,點(diǎn)云還原了被測(cè)石膏人像的形貌,驗(yàn)證了標(biāo)定方法的有效性,可以應(yīng)用于雙目立體視覺(jué)的三維重建系統(tǒng)。
表5 雙目相機(jī)內(nèi)參數(shù)以及重投影誤差
表6 雙目系統(tǒng)的結(jié)構(gòu)參量
圖8 雙目立體視覺(jué)系統(tǒng)的左右視目圖及棋盤(pán)格角點(diǎn)的三維重建。(a) 左相機(jī)拍攝的標(biāo)定靶;(b) 右相機(jī)拍攝的標(biāo)定靶;(c) 棋盤(pán)格角點(diǎn)的三維重建
圖9 雙目立體視覺(jué)系統(tǒng)的左右視目圖。(a) 左相機(jī)拍攝的石膏人像;(b) 右相機(jī)拍攝的石膏人像
圖10 石膏人像的三維點(diǎn)云圖。(a) 主視圖;(b) 左視圖;(c) 右視圖
本文介紹了通過(guò)液晶顯示面板分別顯示水平和垂直方向的彩色編碼相移條紋來(lái)進(jìn)行相機(jī)標(biāo)定的方法。此方法通過(guò)顏色通道編碼相移條紋,減少標(biāo)定所需采集圖像數(shù)目;通過(guò)在靶標(biāo)圖案四角添加彩色編碼相移圓環(huán),實(shí)現(xiàn)特征點(diǎn)的自動(dòng)排序,簡(jiǎn)化標(biāo)定流程。單相機(jī)標(biāo)定實(shí)驗(yàn)表明,采集靶標(biāo)圖案模糊時(shí),在標(biāo)定靶位姿改變次數(shù)相同的前提下,本文方法的標(biāo)定精度明顯優(yōu)于棋盤(pán)格靶標(biāo),也高于正交正弦條紋靶標(biāo),雖略低于正交正弦相移條紋靶標(biāo),但采集圖像的數(shù)目?jī)H為正交正弦相移條紋靶標(biāo)的三分之一;采集圖像總數(shù)相同時(shí),此標(biāo)定方法的重投影誤差最小,精度最高;不同離焦程度下,標(biāo)定精度穩(wěn)定。雙目系統(tǒng)標(biāo)定實(shí)驗(yàn)表明,標(biāo)定后系統(tǒng)的測(cè)量精度高,可實(shí)現(xiàn)被測(cè)物的三維重建。
[1] Li L L, Zhao W C, Wu F,. Experimental analysis and improvement on camera calibration pattern[J]., 2014, 53(1): 013104.
[2] Mallon J, Whelan P F. Which pattern? Biasing aspects of planar calibration patterns and detection methods[J]., 2007, 28(8): 921–930.
[3] Li D, Tian J D. An accurate calibration method for a camera with telecentric lenses[J]., 2013, 51(5): 538–541.
[4] Liu Z, Wu Q, Chen X,. High-accuracy calibration of low-cost camera using image disturbance factor[J]., 2016, 24(21): 24321–24336.
[5] Bell T, Xu J, Zhang S. Method for out-of-focus camera calibration[J]., 2016, 55(9): 2346–2352.
[6] Wang Y W, Chen X C, Tao J Y,. Accurate feature detection for out-of-focus camera calibration[J]., 2016, 55(28): 7964–7971.
[7] Liu Y K, Su X Y. A new camera calibration technique using FTP method[J].(), 2007, 39(6): 149–153. 劉元坤, 蘇顯渝. 基于傅里葉條紋分析的攝像機(jī)標(biāo)定[J]. 四川大學(xué)學(xué)報(bào)(工程科學(xué)版), 2007, 39(6): 149–153.
[8] Li L L, Zhao W C, Wu F,. Analysis and improvement of characteristic points extraction algorithms in camera calibration[J]., 2014, 34(5): 0515002. 李璐璐, 趙文川, 伍凡, 等. 攝像機(jī)標(biāo)定中的特征點(diǎn)提取算法研究與改進(jìn)[J]. 光學(xué)學(xué)報(bào), 2014, 34(5): 0515002.
[9] Ma M C, Chen X C, Wang K Y. Camera calibration by using fringe patterns and 2D phase-difference pulse detection[J]., 2014, 125(2): 671–674.
[10] Yang H, Cai N, Lin B,. Defocus camera calibration based on sinusoidal phase coding[J]., 2018, 47(7): 0715002. 楊浩, 蔡寧, 林斌, 等. 基于正弦相位編碼的相機(jī)離焦標(biāo)定[J]. 光子學(xué)報(bào), 2018, 47(7): 0715002.
[11] Ge W. Research on 3D measurement based on color phase-encoded fringe projection[D]. Nanjing: Dongnan University, 2016: 4–6.
葛尉. 基于彩色相位編碼條紋投影的三維測(cè)量方法研究[D]. 南京: 東南大學(xué), 2016: 4–6.
[12] Pan J H, Huang P S, Chiang F P. Color phase-shifting technique for three-dimensional shape measurement[J].2006, 45(1): 013602.
[13] Heikkila J. Geometric camera calibration using circular control points[J]., 2000, 22(10): 1066–1077.
[14] Huo J, Yang W, Yang M. A self-calibration technique based on the geometry property of the vanish point[J]., 2010, 30(2): 465–472. 霍炬, 楊衛(wèi), 楊明. 基于消隱點(diǎn)幾何特性的攝像機(jī)自標(biāo)定方法[J]. 光學(xué)學(xué)報(bào), 2010, 30(2): 465–472.
[15] Zhang Z Y. Flexible camera calibration by viewing a plane from unknown orientations[C]//1999, 1: 666–673.
[16] Zhang Z H. Review of single-shot 3D shape measurement by phase calculation-based fringe projection techniques[J]., 2012, 50(8): 1097–1106.
[17] Wang N, Zhang Q C, Ma K. 3-D shape measurement for isolated objects based on color-encoded fringe projection[J]., 2010, 21(8): 1227–1231.王娜, 張啟燦, 麻珂. 基于彩色編碼條紋投影的孤立物體三維測(cè)量[J]. 光電子·激光, 2010, 21(8): 1227–1231.
[18] Liu D H, Lin B. Fourier transform profilometry using zero frequency elimination based on gray modulation[J]., 2011, 40(11): 1697–1701. 劉大海, 林斌. 利用強(qiáng)度調(diào)制消除零頻的傅里葉變換輪廓測(cè)量[J]. 光子學(xué)報(bào), 2011, 40(11): 1697–1701.
[19] Huang P S, Zhang S. Fast three-step phase-shifting algorithm[J]., 2006, 45(21): 5086–5091.
[20] Lu J, Mo R, Sun H B,. Invalid phase values removal method for absolute phase recovery[J]., 2016, 55(2): 387–394.
[21] Nellros F, Thurley M J, Jonsson H,. Automated measurement of sintering degree in optical microscopy through image analysis of particle joins[J]., 2015, 48(11): 3451–3465.
[22] Chen N Q, Wang J J, Yu L A,. Sub-pixel edge detection of led probes based on canny edge detection and iterative curve fitting[C]//,,2014, 6: 131–134.
[23] Yuen H K, Princen J, Illingworth J,. Comparative study of Hough transform methods for circle finding[J]., 1990, 8(1): 71–77.
[24] Tsai R Y. A versatile camera calibration technique for high-accuracy 3D machine vision metrology using off-the-shelf TV cameras and lenses[J]., 1987, 3(4): 323–344.
[25] Kaehler A, Bradski G.[M]. Beijing: O'Reilly Media, Inc., 2016.
[26] Wang S, Xu X. 3D reconstruction based on horopter[J]., 2017, 37(5): 0515004. 王珊, 徐曉. 基于雙目單視面的三維重建[J]. 光學(xué)學(xué)報(bào), 2017, 37(5): 0515004.
[27] Sun J H, Yang Y, Zhang G J. Three dimensional scanning technique using color structured light patterns based on phase moving coding strategy[J]., 2008, 34(1): 122–125. 孫軍華, 楊揚(yáng), 張廣軍. 基于相移的彩色結(jié)構(gòu)光編碼三維掃描技術(shù)[J]. 光學(xué)技術(shù), 2008, 34(1): 122–125.
Camera calibration based on color-coded phase-shifted fringe
Wei Boyan1,2, Tian Qingguo1,2*, Ge Baozhen1,2
1School of Precision Instruments and Opto-Electronics Engineering, Tianjin University, Tianjin 300072, China;2Key Laboratory of Opto-Electronics Information and Technology, Ministry of Education, Tianjin 300072, China
Calibration system
Overview:In the past two decades, camera calibration theory has been continuously developed and improved. The calibration method based on planar two-dimensional targets has been most widely applied. In the actual calibration process, the captured target images would appear to various degrees of blurring due to environmental factors and camera focus errors. The accuracy of feature point extraction would be affected. Since the phase information is not influenced by the blur of the captured image, some scholars have proposed using a liquid crystal display panel that displays phase patterns as a calibration target. The phase code is used to establish the correspondence between feature point world coordinates and image coordinates to achieve high-precision calibration of the camera. Compared with the calibration method based on Fourier analysis, the calibration method based on phase shift theory has higher accuracy. However, its calibration process is cumbersome because multiple images need to be collected for each target pose. Furthermore, such calibration methods require human intervention when extracting feature points, that is, manually selecting four outer corner points to determine a target area for feature point extraction. The calibration process is complicated.
This paper proposes a calibration method based on the color-coded phase-shifted fringe to overcome the shortcomings of the calibration method based on phase-shifted theory. This method encoded a phase-shifted stripe through the RGB channels of a color pattern and used a liquid crystal display panel as a calibration target to sequentially display horizontal and vertical color-coded phase-shifted stripes. Through the color channel separation, orthogonal phase-shifted fringes were obtained. The intersection point of the orthogonal phase truncation line was taken as the characteristic point according to the phase-shifted theory. Applied the calibration theory based on the planar two-dimensional target, the calibration of the single-camera and binocular system was realized by changing the target pose multiple times and extracting feature points. Furthermore, calibration efficiency was improved by adding color-coded phase-shifted rings to the four corners of the target pattern to automatically extract and sort feature points. The single-camera calibration experiment shows that when the target pattern is blurred, the calibration accuracy of the method in this paper is significantly better than that of the chessboard target under the premise that the calibration target pose changes the same number of times. It is slightly higher than the orthogonal sinusoidal fringe target and slightly lower than the orthogonal sinusoidal phase-shifted fringe target. The experiment also shows that the number of pictures collected by this method is only one-third of the orthogonal sinusoidal phase-shifted fringe target. When the total number of collected pictures is the same, the reprojection error of this calibration method is the smallest and the precision is the highest. The calibration accuracy is stable under different defocusing degrees. The binocular system calibration experiment shows that the system has high measurement accuracy after calibration, and it can realize 3D reconstruction of the measured object.
Wei B Y, Tian Q G, Ge B ZCamera calibration based on color-coded phase-shifted fringe[J]., 2021, 48(1): 200118; DOI:10.12086/oee.2021.200118
Camera calibration based on color-coded phase-shifted fringe
Wei Boyan1,2, Tian Qingguo1,2*, Ge Baozhen1,2
1School of Precision Instruments and Opto-Electronics Engineering, Tianjin University, Tianjin 300072, China;2Key Laboratory of Opto-Electronics Information and Technology, Ministry of Education, Tianjin 300072, China
Aiming at the low adaptability of blurring noise of target feature points in traditional calibration methods, a calibration method based on the color-coded phase-shifted fringe is proposed. Using a liquid crystal display panel as the calibration target, horizontal and vertical color-coded phase-shifted stripes are displayed in sequence; the orthogonal phase-shifted stripes are obtained by separating color channels; based on the phase-shifteg theory, the intersections of the orthogonal phase truncation lines are calculated as the feature points. After changing the target position multiple times and extracting feature points, the plane-based camera calibration technique is applied to realize the calibration of both the single camera and the binocular system. Furthermore, color-coded phase-shift circles are added to four corners of the target pattern to automatically extract and sort feature points. Accordingly, the efficiency of calibration is promoted. The experimental results indicate that when the target image is blurred, the reprojection error of the single-camera calibration is 0.15 pixels, and the standard deviation of the binocular system measurement after calibration is 0.1 mm.
camera calibration; phase target; phase-shift theory; 3D measurement
TP391;TB852.1
A
10.12086/oee.2021.200118
National Natural Science Foundation of China (61535008)
* E-mail: tianqingguo@tju.edu.cn
魏泊巖,田慶國(guó),葛寶臻. 基于彩色編碼相移條紋的相機(jī)標(biāo)定[J]. 光電工程,2021,48(1): 200118
Wei B Y, Tian Q G, Ge B ZCamera calibration based on color-coded phase-shifted fringe[J]., 2021, 48(1): 200118
2020-04-10;
2020-06-15
國(guó)家自然科學(xué)基金資助項(xiàng)目(61535008)
魏泊巖(1994-),男,碩士研究生,主要從事計(jì)算機(jī)視覺(jué)的研究。E-mail:weiboyan@tju.edu.cn
田慶國(guó)(1973-),男,博士,副教授,主要從事計(jì)算機(jī)可視化、圖像圖形學(xué)的研究。E-mail:tianqingguo@tju.edu.cn