劉 軍,后士浩,張 凱,晏曉娟
?
基于單目視覺車輛姿態(tài)角估計(jì)和逆透視變換的車距測量
劉 軍,后士浩,張 凱,晏曉娟
(江蘇大學(xué)汽車與交通工程學(xué)院,鎮(zhèn)江 212013)
針對一般的單目視覺測距方法忽略汽車在行駛過程中姿態(tài)角變化的問題,該文提出了一種基于變參數(shù)逆透視變換和道路消失點(diǎn)檢測的單目視覺測距模型,實(shí)現(xiàn)了車輛在相對運(yùn)動(dòng)過程中的縱向距離和橫向距離實(shí)時(shí)測量。首先,該文通過基于紋理方向估計(jì)的道路消失點(diǎn)檢測算法計(jì)算出汽車運(yùn)動(dòng)的偏航角和俯仰角,然后運(yùn)用變參數(shù)的逆透視變換和幾何建模分析方法,建立車輛測距模型。對不同道路環(huán)境和測距方法的2組對比試驗(yàn)分析該文方法的可行性和有效性,結(jié)果表明,該文所提出的測距模型能夠有效測量縱向70 m、橫向4 m以內(nèi)的目標(biāo)車輛距離,測量誤差在5%以內(nèi),且道路環(huán)境越好,誤差越小,道路良好的平坦道路測距誤差在3%以內(nèi);該文算法的平均處理速度達(dá)到了40幀/s。
算法;模型;車輛;單目視覺;逆透視變換;道路消失點(diǎn)檢測;單目測距
在智能車和高級駕駛輔助系統(tǒng)中,車輛檢測和測距是對道路交通信息理解的關(guān)鍵內(nèi)容,也是汽車避免危險(xiǎn)而做出響應(yīng)的前提條件。視覺機(jī)器學(xué)習(xí)方法被廣泛運(yùn)用在車輛檢測任務(wù)上,而車輛測距技術(shù)是在車輛檢測任務(wù)的基礎(chǔ)上發(fā)展而成的一項(xiàng)技術(shù)。測量車輛的縱向距離和橫向距離可以對車輛進(jìn)行準(zhǔn)確定位,而且還可以為汽車行駛過程中縱向、橫向提供安全距離控制[1-5]。
目前基于毫米波雷達(dá)和激光雷達(dá)等主動(dòng)式傳感器的測距方法[6-7]價(jià)格昂貴,掃描范圍和速度有限,同時(shí)易受外界信號(hào)干擾。而基于視覺類被動(dòng)式傳感器的測距方法,價(jià)格低廉,信息豐富,具有更廣泛的應(yīng)用范圍?,F(xiàn)有的視覺測距方法主要為單目視覺和立體視覺測距?;诹Ⅲw視覺的測距方法[8-11]直觀明了,測量精度較高,但這種方法需融合匹配多個(gè)攝像頭的信息,計(jì)算量大,實(shí)現(xiàn)實(shí)時(shí)測距的成本相對較高,使其在汽車上的應(yīng)用受到限制。
此外,基于單目視覺的測距方法算法簡單,計(jì)算量小,成本低廉且實(shí)時(shí)性能更好。近年來國內(nèi)外對單目視覺測距方法的研究取得了一些成果[12-15],主要分為擬合建模法、逆透視變換法、成像幾何關(guān)系法以及光學(xué)投影特性法。徐超等[16]提出了一種通過特征變換匹配算法估計(jì)坦克的姿態(tài)角,從而用匹配的模板和目標(biāo)圖像來模擬立體視覺,將單目測距轉(zhuǎn)化為雙目視覺的平面測距方法,但是其需要大量的姿態(tài)角匹配模板,模板匹配不佳時(shí)會(huì)造成很大的測距誤差,并且需要消耗大量的匹配時(shí)間。余厚云等[17-18]提出了一種基于車道線消失點(diǎn)的幾何模型測量前方目標(biāo)車輛的縱向距離的方法,但其只適用于結(jié)構(gòu)化的道路,未考慮汽車運(yùn)動(dòng)的偏航角、俯仰角的變化,也沒有考慮橫向距離測量的問題。許宇能等[19]提出了一種基于道路消失點(diǎn)計(jì)算攝像機(jī)偏航角和俯仰角的6自由度變換測距模型,把整個(gè)測距模型建立在考慮攝像機(jī)畸變的針孔模型上,其需要標(biāo)定大量的攝像機(jī)內(nèi)外參數(shù)而帶來了測量誤差。吳駿等[20]提出了一種基于檢測車輛位置信息的車輛縱向距離測量幾何模型,但未考慮到偏航角、俯仰角的實(shí)時(shí)補(bǔ)償,只適用于結(jié)構(gòu)化道路。
Tuohy等[21]提出了一種基于逆透視變換的測距方法,通過逆透視變換還原出道路平面的信息,并且該平面與真實(shí)道路平面具有線性的比例關(guān)系,該方法簡單易行,但是其沒有考慮汽車運(yùn)動(dòng)的偏航角和俯仰角補(bǔ)償,導(dǎo)致在汽車產(chǎn)生偏航和俯仰運(yùn)動(dòng)時(shí)會(huì)產(chǎn)生較大的測距誤差。Nakamura等[22]提出了一種基于水平方向和垂直方向三角幾何關(guān)系聯(lián)合估計(jì)車寬長度的單目視覺車輛測距方法;Han等[23]提出了基于車寬長度估計(jì)的單目視覺車輛測距方法,并綜合考慮了結(jié)構(gòu)化道路和非結(jié)構(gòu)化道路2種測距環(huán)境;文獻(xiàn)[22-23]通過卡爾曼濾波算法減少由于車輛俯仰角變化引起的測距誤差,但是對非正前方目標(biāo)的車寬長度估計(jì)存在較大誤差,且并沒有從俯仰角變化的機(jī)理上進(jìn)行建模分析,只是在跟蹤過程中減小車寬長度的估計(jì)誤差。Bao等[24]提出了一種基于車寬的平均長度與檢測車輛的實(shí)際距離之間存在的線性關(guān)系的單目視覺車輛測距方法,但是其沒有考慮到汽車運(yùn)動(dòng)過程中的姿態(tài)角變化,同時(shí)統(tǒng)計(jì)得到的車寬平均值只能保證平均的測距精度,對單個(gè)車輛目標(biāo)的測距誤差較大。
上述逆透視變換測距方法沒有考慮汽車運(yùn)動(dòng)的偏航角、俯仰角補(bǔ)償,成像幾何關(guān)系測距方法需要標(biāo)定大量的攝像機(jī)內(nèi)外參數(shù)。為提高車輛單目視覺測距在復(fù)雜應(yīng)用場景的精度和穩(wěn)定性,在已有目標(biāo)檢測算法的基礎(chǔ)下,本文提出了基于汽車姿態(tài)角估計(jì)的單目視覺車輛測距算法,利用基于紋理的道路消失點(diǎn)檢測跟蹤方法建立實(shí)時(shí)的車輛縱向和橫向距離檢測幾何模型。本文敘述了算法的實(shí)現(xiàn)過程,并以某型號(hào)的試驗(yàn)車為例,進(jìn)行了測距試驗(yàn),最終給出了相應(yīng)的結(jié)果和分析。
根據(jù)透視投影原理,所有平行的直線經(jīng)過透視投影后都會(huì)相交于一點(diǎn),該點(diǎn)稱為消失點(diǎn)。道路消失點(diǎn)是道路環(huán)境的重要信息,其總是指向道路的盡頭,可以為智能車導(dǎo)航系統(tǒng)提供重要的方向信息和道路邊界信息,同時(shí)可用來估計(jì)汽車運(yùn)動(dòng)的姿態(tài)角[25-28]。
對存在顯著紋理方向的像素點(diǎn)取最大2個(gè)Gabor能量響應(yīng)值計(jì)算顯著紋理方向,估計(jì)方程[28]如下。
1)最大的2個(gè)Gabor能量響應(yīng)方向若為1=0和4=135o,則
2)其他情況,則
顯著紋理方向()定義為
為了降低每幀圖片里的敏感噪聲對消失點(diǎn)檢測的干擾,對當(dāng)前幀消失點(diǎn)的位置與之前20幀的位置取平均值,同時(shí)通過幀間消失點(diǎn)位移的大小來調(diào)節(jié)候選消失點(diǎn)的分布,大大增加了消失點(diǎn)檢測的穩(wěn)定性。在不同光照和道路環(huán)境下道路消失點(diǎn)檢測的試驗(yàn)效果示例如圖1所示。
式中1為存在偏航角時(shí)成像平面中消失點(diǎn)的橫坐標(biāo)。
新的像平面(粗線矩形區(qū)域)是由于攝像機(jī)偏航角的存在,導(dǎo)致標(biāo)準(zhǔn)成像平面(細(xì)線矩形區(qū)域)向左偏移得到的,但這并不會(huì)導(dǎo)致視場角的改變,因此水平視場角仍然存在如下關(guān)系
由式(5)和(6)可知
同理,對于攝像機(jī)的俯仰角,也和消失點(diǎn)存在著類似的關(guān)系,即
式中1為存在偏航角時(shí)成像平面中消失點(diǎn)的縱坐標(biāo)。
注:為成像平面的水平方向像素?cái)?shù)量,為攝像機(jī)的焦距,2為攝像機(jī)水平視場角范圍,為攝像機(jī)偏航角。在攝像機(jī)沒有偏航角和俯仰角時(shí)成像平面中消失點(diǎn)坐標(biāo)為(0,0),當(dāng)存在偏航角時(shí)成像平面中消失點(diǎn)的坐標(biāo)為(1,1),為水平方向的偏移量。
Note:is the number of horizontal pixels in the imaging plane,is the camera focal length, 2is the horizontal field angle of camera,is the yaw angle of camera. When the camera has no yaw and pitch angle, the vanishing point coordinates are(0,0). While having a yaw angle, the coordinates of the vanishing point in the imaging plane are(1,1);is an offset in the horizontal direction.
圖2 攝像機(jī)偏航角估計(jì)示意圖
Fig.2 Diagram of camera yaw angle estimation
當(dāng)攝像機(jī)存在偏航角和俯仰角時(shí),固定參數(shù)的逆透視變換不能恢復(fù)道路平面的平行關(guān)系,而存在很大的橫向或者縱向的畸變。假設(shè)世界坐標(biāo)系的原點(diǎn)位于光心處,建立如圖3所示的攝像機(jī)偏航角、俯仰角對逆透視變換的影響示意圖,攝像機(jī)偏航角會(huì)使得逆透視變換俯視圖存在一定的旋轉(zhuǎn),但是準(zhǔn)確恢復(fù)了道路平面俯視圖的平行關(guān)系;俯仰角的存在則會(huì)使逆透視變換俯視圖不能恢復(fù)實(shí)際道路俯視圖的平行關(guān)系[29],使得在實(shí)際測距時(shí),存在較大的誤差,不能滿足使用要求。因此,必須提出一種方法能夠?qū)z像機(jī)俯仰角進(jìn)行實(shí)時(shí)的補(bǔ)償以消除這種畸變對測距的影響。
注:θ為攝像機(jī)俯仰角。
假設(shè)世界坐標(biāo)系軸與軸位于地平面上,兩軸的交點(diǎn)與攝像機(jī)光心在地面上的正投影重合,文獻(xiàn)[29]建立了攝像機(jī)存在俯仰角時(shí)的動(dòng)態(tài)逆透視變換方程,用以消除攝像機(jī)俯仰角的存在導(dǎo)致的透視畸變效果。其變換方程如下
首先,標(biāo)定實(shí)際道路俯視圖與逆透視變換俯視圖之間的縱向比例系數(shù),如圖4a所示,在透視圖中每隔3 m的實(shí)際距離作等距橫向標(biāo)線,然后進(jìn)行逆透視變換,如圖4b所示,縱向比例系數(shù)可以描述為
式中d為某一橫向標(biāo)線至本車車頭的實(shí)際距離,h′為逆透視變換俯視圖對應(yīng)的像素高度,e1為標(biāo)定出的縱向比例系數(shù)。
進(jìn)一步,假設(shè)不考慮檢測車輛與本車的形狀大小,為求道路方向上攝像機(jī)存在偏航角時(shí)目標(biāo)車輛與本車的縱向距離及橫向距離,對圖像進(jìn)行抽象簡化分析。如圖5所示,當(dāng)攝像機(jī)偏航角為時(shí),假定棋盤格為路面,其透視圖如圖5a所示,實(shí)際道路平面俯視圖如圖5b所示,逆透視變換俯視圖如圖5c所示,圖5b與圖5c中的點(diǎn)一一對應(yīng)。圖5b中為透視圖下邊界所對應(yīng)的道路上的線段,點(diǎn)為中點(diǎn),過點(diǎn)作直線垂直于車道線即棋盤格網(wǎng)格線(車道線只用來說明攝像機(jī)存在偏航角的參考),過點(diǎn)作直線平行于車道線;為檢測車輛在地面上的位置點(diǎn),作垂直于,則為道路方向上檢測車輛目標(biāo)點(diǎn)與攝像機(jī)之間的縱向距離,為橫向距離,垂直于,垂足為;連接交于點(diǎn),垂直于。
圖5 單目視覺測距模型分析示意圖
在圖5c中,已知(x,y)、(x, y)、(x, y),則點(diǎn)的坐標(biāo)為(x,y),根據(jù)透視圖與逆透視變換俯視圖之間的關(guān)系,設(shè)對應(yīng)的為d,對應(yīng)的為d,則
由式(11)得
根據(jù)式(12)~(13)可知
式中為透視圖下邊界所對應(yīng)的實(shí)際距離的一半。
在Rt△中,∠=,則檢測車輛的縱向、橫向距離分別為
納入標(biāo)準(zhǔn):①以上患者均符合糖尿病腎病的臨床診斷標(biāo)準(zhǔn)[2];②所有患者均同意該次研究,并簽訂知情同意書。
式中(x,y)為逆透視變換俯視圖中所求目標(biāo)車輛的坐標(biāo),+、-分別為檢測車輛在本車縱向軸線的右側(cè)和左側(cè)。
而實(shí)際測距時(shí),車輛的形狀大小是不能被忽略的。根據(jù)檢測車輛的位置信息,當(dāng)車輛包圍框右下角橫坐標(biāo)小于/2時(shí),檢測車輛在本車縱向軸線的左側(cè),根據(jù)包圍框右下點(diǎn)坐標(biāo)計(jì)算式(19);當(dāng)車輛包圍框左下角橫坐標(biāo)大于/2時(shí),檢測車輛在本車縱向軸線的右側(cè),根據(jù)包圍框左下點(diǎn)坐標(biāo)計(jì)算式(19);反之,則說明檢測車輛在本車的正前方,此時(shí)橫向距離為0,式(19)的縱向距離計(jì)算公式可簡化為
式中y為透視圖檢測車輛包圍框底邊中點(diǎn)的縱坐標(biāo)對應(yīng)到逆透視變換俯視圖中的值。
為了便于驗(yàn)證本文提出的方法,本文通過安裝在某型號(hào)別克車上的單目攝像機(jī)抓取已知攝像機(jī)偏航角、俯仰角和車輛距離的圖片,進(jìn)行試驗(yàn)結(jié)果分析驗(yàn)證。試驗(yàn)中利用陀螺儀測量偏航角和俯仰角,卷尺測量目標(biāo)車輛距本車的縱向、橫向距離。攝像機(jī)安裝情況:安裝在車內(nèi)后視鏡處,離地高度為1.3 m,攝像機(jī)分辨率為×=720×576 像素,焦距為8 mm,透視圖下邊界所對應(yīng)的實(shí)際距離的一半=1.58 m,縱向比例系數(shù)1=0.1453。
本文試驗(yàn)程序的運(yùn)行平臺(tái)為英特爾酷睿i7 7700K @ 3.0GHz,顯卡為NVIDIA GTX 1060。軟件的運(yùn)行平臺(tái)為Windows 10、Caffe以及Visual Studio 2013,使用C++代碼實(shí)現(xiàn)了本文算法和基于Caffe框架的SSD目標(biāo)檢測算法[30]的融合,本文測距算法流程如圖6所示。
圖6 本文測距算法流程圖
本文分別使用8個(gè)不同的偏航角和俯仰角度值,通過陀螺儀測得的真實(shí)數(shù)值(測量角度)和本文所述的計(jì)算角度對比,驗(yàn)證本文提出的方法,結(jié)果如表1所示。從表1數(shù)據(jù)可知,除了1°左右的偏角由于本身實(shí)際角度值很小而造成的誤差百分比較大外,其余汽車姿態(tài)角的計(jì)算值與實(shí)際測量值誤差均在10%以內(nèi)。
表1 本文計(jì)算角度與測量角度對比
表2 兩組試驗(yàn)的計(jì)算距離與實(shí)際距離對比
注:橫向距離是檢測的車輛目標(biāo)到攝像頭的距離,縱向距離是其到本車車頭的距離,表示為(橫向距離,縱向距離),文獻(xiàn)[22-23]的橫向距離由車寬長度估計(jì)的方法計(jì)算得到。
Note: Horizontal distance is distance from detected vehicle object to the camera and longitudinal distance is the distance from detected vehicle object to the front of the host vehicle. They are expressed as (horizontal distance, longitudinal distance). The horizontal distance in [22-23] is calculated from the vehicle width estimation.
圖7所示為本文測距算法在不同路況下的檢測結(jié)果,圖中包圍框上方左邊表示橫向距離,右邊表示縱向距離,可以看出,本文算法的平均處理速度達(dá)到了40幀/s,符合實(shí)時(shí)性測距的要求。文獻(xiàn)[22-23]方法同本文在相同車輛檢測算法下的平均處理速度分別達(dá)到了80和55幀/s,主要是因?yàn)楸疚脑诘缆废c(diǎn)檢測和跟蹤部分增加了算法耗時(shí)的緣故。
進(jìn)一步分析,本文測距方法產(chǎn)生誤差的主要原因有:
1)攝像機(jī)的安裝誤差和測量誤差。根據(jù)本文試驗(yàn)算法,攝像機(jī)光心應(yīng)該安裝在本車縱向軸線上;用卷尺測量攝像機(jī)的離地高度D以及值時(shí)存在誤差,以及地面地磚之間存在的縫隙,試驗(yàn)中均未考慮在內(nèi)。
2)攝像機(jī)標(biāo)定和畸變產(chǎn)生的誤差。攝像機(jī)的焦距本文未進(jìn)行標(biāo)定,而是采用儀器廠家提供的數(shù)據(jù);攝像機(jī)畸變會(huì)產(chǎn)生輕微的透視失真,在逆透視變換的過程中產(chǎn)生誤差。
3)消失點(diǎn)檢測存在誤差,直接造成了攝像機(jī)偏航角、俯仰角的計(jì)算存在誤差,進(jìn)一步導(dǎo)致逆透視變換存在透視畸變。消失點(diǎn)檢測產(chǎn)生誤差的原因主要有道路環(huán)境惡劣,以及陽光強(qiáng)烈照射下的暈光會(huì)使道路顯著紋理方向誤檢,帶來很大的檢測誤差。
其中1)是本文試驗(yàn)的固有誤差,試驗(yàn)中基本保持不變,而2)、3)屬于可以通過優(yōu)化方法減少的誤差來源,也是本研究后續(xù)應(yīng)該關(guān)注的內(nèi)容。攝像機(jī)的內(nèi)參數(shù)可以通過標(biāo)定來減少誤差;輕微的畸變可以通過矯正減少誤差;消失點(diǎn)的檢測是本文研究的基礎(chǔ),因此也是改進(jìn)的主要方向。雖然本文考慮了攝像機(jī)俯仰角的補(bǔ)償,但是隨著道路條件的變化,消失點(diǎn)的檢測誤差也隨之而變化,因此對于基于道路消失點(diǎn)的測距算法,通過提高消失點(diǎn)檢測的準(zhǔn)確性和穩(wěn)定性可以提高實(shí)時(shí)測距的性能,使單目視覺測距算法更具有魯棒性。
注:FPS(frames per second)為幀速,描述動(dòng)態(tài)視頻的流暢度,幀·s-1。
本文將道路消失點(diǎn)的檢測用于單目視覺車輛測距,提出了一種基于變參數(shù)逆透視變換的幾何測距模型,對攝像機(jī)俯仰角進(jìn)行了動(dòng)態(tài)補(bǔ)償,同時(shí)在測距模型中將攝像機(jī)由于車輛變道超車等引起的偏航角進(jìn)行建模分析,建立了統(tǒng)一的數(shù)學(xué)模型。對提出的基于道路消失點(diǎn)的汽車姿態(tài)角估計(jì)模型進(jìn)行了試驗(yàn)驗(yàn)證,同時(shí)對本文完整的測距模型進(jìn)行了驗(yàn)證分析,試驗(yàn)結(jié)果表明,本文提出的測距模型能有效測量縱向70 m以內(nèi)、橫向4 m以內(nèi)的車輛距離,對不同道路環(huán)境的車輛測距誤差在5%以內(nèi),且算法的平均處理速度達(dá)到了40幀/s,實(shí)時(shí)性能好,魯棒性高,滿足智能車系統(tǒng)對算法實(shí)時(shí)性和準(zhǔn)確性的要求,有一定的工程應(yīng)用價(jià)值。
[1] Park K Y, Hwang S Y. Robust range estimation with a monocular camera for vision-based forward collision warning system[J]. The Scientific World Journal, 2014, 2014(2): 923632.
[2] 劉慶華,邱修林,謝禮猛,等. 基于行駛車速的車輛防撞時(shí)間預(yù)警算法[J]. 農(nóng)業(yè)工程學(xué)報(bào),2017,33(12):99-106.
Liu Qinghua, Qiu Xiulin, Xie Limeng, et al. Anti-collision warning time algorithm based on driving speed of vehicle[J]. Transactions of the Chinese Society of Agricultural Engineering (Transactions of the CSAE), 2017, 33(12): 99-106. (in Chinese with English abstract)
[3] Ding P, Zhang J, Zhou Y, et al. Anti-collision warning algorithm based on visual perception in front of vehicle[C]// International Conference on Mechanical, Electronic, Control and Automation Engineering, 2017: 51-55.
[4] Lin H Y, Chen L Q, Lin Y H, et al. Lane departure and front collision warning using a single camera[C]//International Symposium on Intelligent Signal Processing and Communications Systems, IEEE, 2013: 64-69.
[5] Wu C F, Lin C J, Lin H Y, et al. Adjacent lane detection and lateral vehicle distance measurement using vision-based neuro-fuzzy approaches[J]. Journal of Applied Research & Technology, 2013, 11(2): 251-258.
[6] 方建超,周興林,毛雪松. 利用多普勒激光雷達(dá)實(shí)現(xiàn)距離和速度同步測量[J]. 光電工程,2016,43(12):212-218.
Fang Jianchao, Zhou Xinglin, Mao Xuesong. Doppler laser radar for measuring range and speed simultaneously[J]. Opto-Electronic Engineering, 2016, 43(12): 212-218. (in Chinese with English abstract)
[7] 劉軍輝,陳宏濱. 基于FMCW雷達(dá)測距的車輛防碰撞系統(tǒng)[J]. 桂林電子科技大學(xué)學(xué)報(bào),2016,36(5):349-354.
Liu Junhui, Chen Hongbin. A vehicle anti-collision system based on FMCW radar ranging[J]. Journal of Guilin University of Electronic Technology, 2016, 36(5): 349-354. (in Chinese with English abstract)
[8] Lim B, Woo T, Kim H. Integration of vehicle detection and distance estimation using stereo vision for real-time AEB system[C]//International Conference on Vehicle Technology and Intelligent Transport Systems, 2017: 211-216.
[9] Lü X Z, Wang M T, Qi Y F, et al. Research on ranging method based on binocular stereo vision[C]//Advanced Materials Research, 2014: 2075-2081.
[10] Long H M, Guo H Y, Liang F, et al. Distance measurement algorithm based on binocular stereo vision[C]//Applied Mechanics & Materials, 2014: 948-952.
[11] 項(xiàng)榮,應(yīng)義斌,蔣煥煜,等. 基于雙目立體視覺的番茄定位[J]. 農(nóng)業(yè)工程學(xué)報(bào),2012,28(5):161-167.
Xiang Rong, Ying Yibin, Jiang Huanyu, et al. Localization of tomatoes based on binocular stereo vision[J]. Transactions of the Chinese Society of Agricultural Engineering (Transactions of the CSAE), 2012, 28(5): 161-167.(in Chinese with English abstract)
[12] Li B, Zhang X, Sato M. Pitch angle estimation using a Vehicle-Mounted monocular camera for range measurement[C]// International Conference on Signal Processing, IEEE, 2015: 1162-1168.
[13] Rezaei M, Terauchi M, Klette R. Robust vehicle detection and distance estimation under challenging lighting conditions[J]. IEEE Transactions on Intelligent Transportation Systems, 2015, 16(5): 2723-2743.
[14] Adamshuk R, Carvalho D, Neme J H Z, et al. On the applicability of inverse perspective mapping for the forward distance estimation based on the HSV colormap[C]// IEEE International Conference on Industrial Technology, IEEE, 2017.
[15] Ho H W, Croon G D, Chu Q P. Distance and velocity estimation using optical flow from a monocular camera[J]. International Journal of Micro Air Vehicles, 2017, 9(3): 198-208.
[16] 徐超,高敏,曹歡. 單目圖像中姿態(tài)角估計(jì)的坦克目標(biāo)測距方法[J]. 光子學(xué)報(bào),2015,44(5):140-147.
Xu Chao, Gao Min, Cao Huan. The attitude angle estimation-based distance measurement of tank target in monocular image[J]. Acta Photonica Sinica, 2015, 44(5): 140-147. (in Chinese with English abstract)
[17] 余厚云,張為公. 基于單目視覺傳感器的車距測量與誤差分析[J]. 傳感器與微系統(tǒng),2012,31(9):10-13.
Yu Houyun, Zhang Weigong. Vehicle distance measurement and its error analysis based on monocular vision sensor[J]. Transducer & Microsystem Technologies, 2012, 31(9): 10-13. (in Chinese with English abstract)
[18] 顧兆倫,邵雨辰,謝揚(yáng)振,等. 多環(huán)境下的實(shí)時(shí)前車檢測與車距測量[J]. 信號(hào)處理,2015,31(9):1188-1194.
Gu Zhaolun, Shao Yuchen, Xie Yangzhen, et al. Real-time Vehicle detection and distance measurement in multi- environment[J]. Journal of Signal Processing, 2015, 31(9): 1188-1194. (in Chinese with English abstract)
[19] 許宇能,朱西產(chǎn),馬志雄,等. 基于單目攝像頭的車輛前方道路三維重建[J]. 汽車技術(shù),2014(2):48-52.
Xu Yuneng, Zhu Xichan, Ma Zhixiong, et al. Three-dimensional reconstruction of the road ahead of vehicle based on mono-vision[J]. Automobile Technology, 2014(2): 48-52. (in Chinese with English abstract)
[20] 吳駿,李文杰,耿磊,等. 基于單目視覺的前方車輛檢測與測距[J]. 計(jì)算機(jī)工程,2017,43(2):26-32.
Wu Jun, Li Wenjie, Geng Lei, et al. Preceding vehicle detection and ranging based on monocular vision[J]. Computer Engineering, 2017, 43(2): 26-32. (in Chinese with English abstract)
[21] Tuohy S, O’Cualain D, Jones E, et al. Distance determination for an automobile environment using inverse perspective mapping in OpenCV[C]// Signals and Systems Conference. IET, 2010: 100-105.
[22] Nakamura K, Ishigaki K, Ogata T, et al. Real-time monocular ranging by Bayesian triangulation[C]// Intelligent Vehicles Symposium. IEEE, 2013: 1368-1373.
[23] Han J, Heo O, Park M, et al. Vehicle distance estimation using a mono-camera for FCW/AEB systems[J]. International Journal of Automotive Technology, 2016, 17(3): 483-491.
[24] Bao D, Wang P. Vehicle distance detection based on monocular vision[C]// International Conference on Progress in Informatics and Computing. IEEE, 2017: 187-191.
[25] Moghadam P, Starzyk J A, Wijesoma W S. Fast vanishing-point detection in unstructured environments[J]. IEEE Transactions on Image Processing A Publication of the IEEE Signal Processing Society, 2012, 21(1): 425-430.
[26] Kong H, Audibert J Y, Ponce J. Vanishing point detection for road detection[C]// Computer Vision and Pattern Recognition, 2009. CVPR 2009. IEEE Conference on. IEEE, 2009: 96-103.
[27] Nguyen L, Phung S L, Bouzerdoum A. Enhanced pixel-wise voting for image vanishing point detection in road scenes[C]// IEEE International Conference on Acoustics, Speech and Signal Processing. IEEE, 2017: 1852-1856.
[28] Shi J, Wang J, Fu F. Fast and robust vanishing point detection for unstructured road following[J]. IEEE Transactions on Intelligent Transportation Systems, 2016, 17(4): 970-979.
[29] Zhang D, Fang B, Yang W, et al. Robust inverse perspective mapping based on vanishing point[C]//International Conference on Security, Pattern Analysis, and Cybernetics, IEEE, 2014: 458-463.
[30] Liu W, Anguelov D, Erhan D, et al. SSD: single shot multibox detector[C]//European Conference on Computer Vision. Springer, Cham, 2016: 21-23.
Vehicle distance measurement with implementation of vehicle attitude angle estimation and inverse perspective mapping based on monocular vision
Liu Jun, Hou Shihao, Zhang Kai, Yan Xiaojuan
(,,212013,)
Due to the change of vehicle steering attitude caused by road conditions and driver’s intention during driving, location information of detected vehicles relative to the host vehicle is also changed. Aiming at the problem that the method of monocular vision ranging ignores changes in attitude angle in the process of driving, this paper presents a monocular vision ranging model based on inverse perspective mapping (IPM) of variable parameters and road vanishing point detection, which achieves a real-time measurement of longitudinal and horizontal distance during vehicle relative movement by taking advantage of location information of vehicle detection so that it can locate and detect the vehicle on the ground plane as well as provide a good environment perception for advanced driver assistance system (ADAS) and intelligent vehicle system. Firstly, owing to the relationship between changes in attitude angle and the coordinates of road vanishing point, the yaw angle and pitch angle of vehicle motion are calculated in real time through the algorithm for road vanishing point detection, which is based on texture orientation estimation. The algorithm, which possesses a better robustness under different light and road conditions, estimates dominant texture orientation of pixels according to joint activities and confidence measure of Gabor filter with 4 directions, and vanishing point candidates are confirmed by the modified locally adaptive soft voting and particle filter tracking algorithm. On account of the yaw angle which leads to a certain degree of rotation in the top view of IPM and the existence of the pitch angle which leaves the top view of IPM unable to restore the parallel relationship of thetop view of actual road, IPM of variable parameters based on the coordinate of road vanishing point is used to compensate for the pitch angle to eliminate the influence of inverse perspective distortion, thereby restoring the parallel relationship of road plane and measuring longitudinal distance between the detected vehicle and the host vehicle using calibrated longitudinal scale factor. Then a modeling analysis of the yaw angle of vehicle motion during the process of IPM is made and the effects of the shape and size of the detected vehicle on ranging model are considered. When the horizontal axis in the lower-right bounding box of detected vehicle is less than half of the number of horizontal pixels in the imaging plane, the detected vehicle would be on the left of the host vehicle and its longitudinal and horizontal distance are calculated in accordance with the coordinate in the lower-right bounding box, while the horizontal axis in the lower-left bounding box of detected vehicle is greater than half of the number of horizontal pixels in the imaging plane, the detected vehicle would be on the right of the host vehicle and its longitudinal and horizontal distance are calculated in accordance with the coordinate in the lower-left bounding box; otherwise, it would be directly in front of the host vehicle with the horizontal distance being zero, and its longitudinal distance is calculated in accordance with the coordinate in the middle base of bounding box. Finally, the vehicle ranging model on the basis of location information of vehicle detection is established to consider compensating for attitude angle. The feasibility and effectiveness of this method are analyzed from 2 groups of contrast experiments on different road environments and ranging methods, and the results show that the proposed ranging model can effectively measure the distance of detected vehicles within about 70 m in the longitudinal direction and 4 m in the horizontal direction, having a measurement error of less than 5%; and the better the road environment, the smaller the error; the ranging error of a good flat road is within 3%, and the average processing speed of this algorithm reaches 40 frames/s.
algorithms; models; vehicles; monocular vision; inverse perspective mapping; road vanishing point detection; monocular ranging
劉 軍,后士浩,張 凱,晏曉娟. 基于單目視覺車輛姿態(tài)角估計(jì)和逆透視變換的車距測量[J]. 農(nóng)業(yè)工程學(xué)報(bào),2018,34(13):70-76.doi:10.11975/j.issn.1002-6819.2018.13.009 http://www.tcsae.org
Liu Jun, Hou Shihao, Zhang Kai, Yan Xiaojuan. Vehicle distance measurement with implementation of vehicle attitude angle estimation and inverse perspective mapping based on monocular vision[J]. Transactions of the Chinese Society of Agricultural Engineering (Transactions of the CSAE), 2018, 34(13): 70-76. (in Chinese with English abstract) doi:10.11975/j.issn.1002-6819.2018.13.009 http://www.tcsae.org
2017-11-08
2018-04-10
國家自然科學(xué)基金項(xiàng)目(51275212)
劉 軍,教授,博士,主要研究方向?yàn)槠囍鲃?dòng)安全。Email:Liujun@ujs.edu.cn
10.11975/j.issn.1002-6819.2018.13.009
TP391;U491.6
A
1002-6819(2018)-13-0070-07