分享

计算机视觉基础1——视差与深度信息

 学海无涯GL 2014-02-05

资料来源:Robert Collins,CSE486, Penn State第8讲

Stereo Vision

深度信息感知是人类产生立体视觉的前提。生理过程一定是相当复杂,此处,我们只从物理角度,并采用数学的方法来讨论。

Inferring depth from images taken at the same time by two or more cameras.

image image

基本透视投影

image

image

image

透视投影是多对一的关系,投影线上的任何一点对应同一个像点。

image

如果用两个摄像机,则可以消除这种多对一,从而能够确定第三维坐标Z的值,即深度信息。

image

为什么可以感知深度信息呢?我们的左右眼从略微不同的角度观察景物,而这种视差与物体所处的位置有关。

image

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

image

自己可以体验一下:将手指头放在离眼睛不同距离的位置,并轮换睁、闭左右眼,可以发现手指在不同距离的位置,视觉差也不同,且距离越近,视差越大。

image

image

重要概念之二:Anaglyph image(来自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 and cyan. 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.

image image

image

image

这种立体照片的原理是利用特殊的眼镜,使左右眼接收不同颜色的光线,通过大脑合成立体照片。

关于深度信息的感知理论还在发展中,这是一个复杂的过程,很难用单一的理论来完全描述,决定深度信息感觉的因素很多。如消失线,同类物体的大小,遮挡关系等等。甚至,用单眼也可以感知深度信息。

image

image

image

 

下面着重借助几何和代数的方法来描述立体感知。先从简单的情况开始......

假设两个相机的内部参数一致,如焦距、镜头等等,为了数学描述的方便,需引入坐标,由于坐标是人为引入的,因此客观世界中的事物可以处于不同的坐标系中。假设两个相机的X轴方向一致,像平面重叠,如下图所示,坐标系以左相机为准,右相机相对于左相机是简单的平移,用坐标表示为(Tx,0,0)

image

image

Tx一般称为基线(baseline),根据三角形相似关系,很容易得出空间中的一点P(X,Y,Z)分别在左右像平面上的投影坐标。

image

image

image

因此,左相机像平面像点的坐标为

xl=fXZ             yl=fYZ

右相机平面像点的坐标为

xr=fX?TxZ      yr=fYZ

image

显然,深度信息Z和视差(Disparity / Parallax) d成反比,这与我们用手指做试验是相吻合的,这也是为什么近的物体看起来比远的物体移动得快。

image

下一节:立体视觉基础2——相机成像的几何描述

    本站是提供个人知识管理的网络存储空间,所有内容均由用户发布,不代表本站观点。请注意甄别内容中的联系方式、诱导购买等信息,谨防诈骗。如发现有害或侵权内容,请点击一键举报。
    转藏 分享 献花(0

    0条评论

    发表

    请遵守用户 评论公约

    类似文章 更多