视差与深度信息

资料来源: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=fXTxZ        yr=fYZ

image

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

image

转自:http://www.cnblogs.com/gemstone/articles/2293806.html

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值