資料來(lái)源:Robert Collins,CSE486, Penn State第8講Stereo Vision
深度信息感知是人類(lèi)產(chǎn)生立體視覺(jué)的前提。生理過(guò)程一定是相當(dāng)復(fù)雜,此處,我們只從物理角度,并采用數(shù)學(xué)的方法來(lái)討論。
Inferring depth from images taken at the same time by two or more cameras.

基本透視投影



透視投影是多對(duì)一的關(guān)系,投影線(xiàn)上的任何一點(diǎn)對(duì)應(yīng)同一個(gè)像點(diǎn)。

如果用兩個(gè)攝像機(jī),則可以消除這種多對(duì)一,從而能夠確定第三維坐標(biāo)Z的值,即深度信息。

為什么可以感知深度信息呢?我們的左右眼從略微不同的角度觀(guān)察景物,而這種視差與物體所處的位置有關(guān)。

重要的概念之一:視差(Parallax)

自己可以體驗(yàn)一下:將手指頭放在離眼睛不同距離的位置,并輪換睜、閉左右眼,可以發(fā)現(xiàn)手指在不同距離的位置,視覺(jué)差也不同,且距離越近,視差越大。


重要概念之二:Anaglyph image(來(lái)自wiki)
Anaglyph images are used to provide a stereoscopic 3D effect, when viewed with glasses where the two lenses are different (usually chromatically opposite) colors, such as red andcyan. Images are made up of two color layers, superimposed, but offset with respect to each other to produce a depth effect. Usually the main subject is in the center, while the foreground and background are shifted laterally in opposite directions. The picture contains two differently filtered colored images, one for each eye. When viewed through the "color coded" "anaglyph glasses", they reveal an integrated stereoscopic image. The visual cortexof the brain fuses this into perception of a three dimensional scene or composition.




這種立體照片的原理是利用特殊的眼鏡,使左右眼接收不同顏色的光線(xiàn),通過(guò)大腦合成立體照片。
關(guān)于深度信息的感知理論還在發(fā)展中,這是一個(gè)復(fù)雜的過(guò)程,很難用單一的理論來(lái)完全描述,決定深度信息感覺(jué)的因素很多。如消失線(xiàn),同類(lèi)物體的大小,遮擋關(guān)系等等。甚至,用單眼也可以感知深度信息。


下面著重借助幾何和代數(shù)的方法來(lái)描述立體感知。先從簡(jiǎn)單的情況開(kāi)始......
假設(shè)兩個(gè)相機(jī)的內(nèi)部參數(shù)一致,如焦距、鏡頭等等,為了數(shù)學(xué)描述的方便,需引入坐標(biāo),由于坐標(biāo)是人為引入的,因此客觀(guān)世界中的事物可以處于不同的坐標(biāo)系中。假設(shè)兩個(gè)相機(jī)的X軸方向一致,像平面重疊,如下圖所示,坐標(biāo)系以左相機(jī)為準(zhǔn),右相機(jī)相對(duì)于左相機(jī)是簡(jiǎn)單的平移,用坐標(biāo)表示為(Tx,0,0)

Tx一般稱(chēng)為基線(xiàn)(baseline),根據(jù)三角形相似關(guān)系,很容易得出空間中的一點(diǎn)P(X,Y,Z)分別在左右像平面上的投影坐標(biāo)。



因此,左相機(jī)像平面像點(diǎn)的坐標(biāo)為
xl=fXZ
yl=fYZ
右相機(jī)平面像點(diǎn)的坐標(biāo)為
xr=fX?TxZ
yr=fYZ
顯然,深度信息Z和視差(Disparity / Parallax) d
成反比,這與我們用手指做試驗(yàn)是相吻合的,這也是為什么近的物體看起來(lái)比遠(yuǎn)的物體移動(dòng)得快。

image



