|
发布时间: 2017-12-16 |
图像理解和计算机视觉 |
|
|
收稿日期: 2017-06-23; 修回日期: 2017-09-12
基金项目: 智慧海洋科技创新基金项目(2015HUST);上海航天科技创新基金项目(sast2016063)
第一作者简介:
冯帆(1994-), 男, 华中科技大学自动化学院模式识别与智能控制专业硕士研究生, 主要研究方向为模式识别、图像处理、计算机视觉技术。E-mail:m201672443@hust.edu.cn.
中图法分类号: TP301.6
文献标识码: A
文章编号: 1006-8961(2017)12-1701-08
|
摘要
目的 深度信息的获取是3维重建、虚拟现实等应用的关键技术,基于单目视觉的深度信息获取是非接触式3维测量技术中成本最低、也是技术难度最大的手段。传统的单目方法多基于线性透视、纹理梯度、运动视差、聚焦散焦等深度线索来对深度信息进行求取,计算量大,对相机精度要求高,应用场景受限,本文基于固定光强的点光源在场景中的移动所带来的物体表面亮度的变化,提出一种简单快捷的单目深度提取方法。方法 首先根据体表面反射模型,得到光源照射下的物体表面的辐亮度,然后结合光度立体学推导物体表面辐亮度与摄像机图像亮度之间的关系,在得到此关系式后,设计实验,依据点光源移动所带来的图像亮度的变化对深度信息进行求解。结果 该算法在简单场景和一些日常场景下均取得了较好的恢复效果,深度估计值与实际深度值之间的误差小于10%。结论 本文方法通过光源移动带来的图像亮度变化估计深度信息,避免了复杂的相机标定过程,计算复杂度小,是一种全新的场景深度信息获取方法。
关键词
单目视觉; 光度立体学; 表面辐亮度; 图像亮度变化; 深度恢复
Abstract
Objective The development of machine vision field has made the use of visual methods to solve the problem of deep extraction a major topic in computer vision research. The scene image acquired by the monocular vision system is the projection of the 3D space in the 2D plane. The depth information is lost during this transformation. In turn, the process of extracting depth from 2D images involves the acquisition of monocular depth information. The acquisition of depth information based on monocular vision is the least costly and the most difficult means of non-contact 3D measurement technology. For a long time, the basic method is to analyze the surface brightness of the object under different light sources by use of the brightness equation to solve the surface normal and the 3D reconstruction of the surface of the object. Contrary to the proposed method, photometric techniques typically require multiple light sources, which are generally limited to a wide range of scenarios. The use of photometric 3D technology for 3D reconstruction of the surface of a single object to restore the effect is accurate. Thus, most existing photometric stereoscopic techniques assume that incident light is parallel to light and that light intensity does not change with distance to simplify the calculation process of the surface normal. To achieve this condition, the actual application must be light intensity, distance light source, or a large area of the array of light sources; such algorithm is used in the light source near the point of light (i.e., the light intensity) to meet the distance of the square inverse decay (i.e., in line with the actual situation) and achieve low cost. The extraction of depth information is the key technology of 3D reconstruction and virtual reality. Traditional monocular methods are computationally large that the application scenario is limited. Monocular information should be used to find a convenient way for quickly extracting the depth of a scene. Method In this study, we integrate photometric 3D, imaging principles, computer vision, and many other technologies for analysis. The radiance of surface of object illuminated by light source is obtained using the body surface reflection model, and the relation between the radiance of surface of object and the brightness of camera image is deduced using photometric stereo theory. The relationship between depth and change is found on the basis of the change in the brightness of image. The algorithm based on the said relationship is designed to obtain depth information. Result The algorithm is applied on various experimental scenarios. First, the depth value is estimated for the ladder-like object in the relatively simple scene. The actual distance is accurately measured by the scale, and the value is obtained after 2 decimal places. Then, the algorithm is used to calculate the depth value, which is after 4 decimal places, under the experimental conditions with a maximum total error of 8.6%. Results show that the maximum error of the experiment is less than 9%. The experimental conditions can be improved on the basis of the overall experimental results to achieve the desired requirements of the algorithm. Experimental results show that the proposed algorithm achieves good recovery in simple scenes and other daily scenes and that the accuracy of depth values is over 90%. Conclusion In this study, depth information is estimated by the image intensity change caused by the movement of light source, thereby avoiding the complicated camera calibration process. The algorithm presents a low computational complexity and is a new method for obtaining depth information. Meanings This study provides a new idea for acquiring monocular depth information based on image brightness cues. The method is based on the analysis of the relationship between surface radiance and image brightness and uses the change in light intensity of the point light source in the process of moving to obtain the scene depth value. The method requires only three pictures for processing, has simple hardware requirements and small calculation complexity, and does not need significant edge of scene and other geometric information. However, only the preliminary principle and performance verification of the proposed depth extraction method are presented herein. In the future work, the proposed method will be improved and optimized by analyzing non-ideal light sources in the case of light reflection of object and using mixed surface reflection models to fit the surface of the non-diffused reflector.
Key words
monocular vision; photometric stereo; surface radiance; image brightness change; depth recovery
0 引言
随着机器视觉领域的发展,利用视觉方法来解决深度提取问题也逐渐成为了计算机视觉领域研究的热点之一。单目视觉系统所获取到的场景图像是3维空间在2维平面的投影,在此变换中会丢失深度信息,对其进行逆求解,从2维图像中提取深度的过程就是单目深度信息的获取。
20世纪后期,Grimson[1]基于人类视觉系统率先提出了机器视觉模型及相关算法。之后,深度信息在机器视觉领域的应用开始引起各国学者关注。1987年,Ikeuchi[2]提出了基于双目视觉系统的深度恢复方法,首次将机器视觉技术应用于深度提取,而后又有Shao等人[3]基于此方法提出改进,使得深度恢复效果得到了一定提升。
进入21世纪,伴随着硬件设备的更新,人们开始尝试将单目图像中提取的深度线索运用到深度信息领域,其中包括线性透视,物体遮挡,以及运动视差等。
线性透视是指通过瞳孔中心的光线一般给出中心投影的真实图像,由于该现象的存在,较近的物体所占视角大,看起来较大;较远的物体所占视角小,看起来较小。2004年,Battiato等人[4]将此信息用于提取图像深度,取得了不错的效果。
物体遮挡是判断物体前后关系的重要条件。当观察者移动时,遮挡关系的改变可以使人们更容易判断物体的前后关系[5]。
运动视差也是一种十分重要的深度线索,当观察者在固定环境中运动时,由于物体的距离不同,导致视角变化快慢产生差异,从而导致产生运动视差。由此而衍生的SFM[6](structure from motion)方法,结合光流,用运动来估计场景的3维结构。
此外,依托图像采集设备,聚焦线索也十分常用,图像能够在镜片焦点处呈现最清晰的像,由此而采集不同焦距下同一场景的图像来进行深度信息的恢复,主要有基于聚焦[7]和散焦[8]两种方法。
近年来,伴随着机器学习技术的长足进步,人们也开始将此技术运用到图像深度恢复领域,先对大量2维图像及其对应的深度图进行训练,再对新的输入图像进行深度提取。Harman等人[9]正是基于此思想,提出了基于机器学习的深度恢复方法。
深度信息提取的相关问题一直是计算机视觉领域的热门研究方向,现有的很多光度立体视觉技术也致力于此,其基本方法是通过分析物体表面在不同光源照射下的表面亮度变化,根据亮度方程求解表面法向,进而积分对物体表面进行3维重建。相对于本文的深度获取方法,光度立体学技术一般需要多光源,受限于此,一般也很少应用于大范围场景中。但利用光度立体技术进行3维重建对单一物体的表面细节的恢复效果很好,是优于本算法的一个方面。且为了简化表面法向的计算过程,现有的大多数光度立体技术通常假设表面入射光为平行光[10],且光强不随距离发生变化,为达到这一条件,实际应用中必须采用光强度的远距离点光源或大面积的阵列光源,而本文算法中的光源采用的是近点光源,其光照强度满足距离的平方反比衰减,更符合实际情况,且实现成本更低。
本文提出一种全新的基于光强的单目深度信息获取方法,综合利用了物理光学、立体视觉和图像处理技术,推导出深度信息与物体反射光强之间的关系。该方法仅需要1个可移动光源加上相机拍摄的3张图片,即可快捷地获取深度信息,并通过实验初步验证了该方法的可行性。
1 物体表面反射模型
场景亮度对应光源表面射出的光通量,图像照度则对应图像平面得到的光通量。在图 1的基础上,可以定义物体表面双向反射分布函数,记
$ f\left( {{\theta _i},{\phi _i};{\theta _e},{\phi _e}} \right) = \frac{{\delta L\left( {{\theta _e},{\phi _e}} \right)}}{{\delta E\left( {{\theta _i},{\phi _i}} \right)}} $ | (1) |
实际上多数自然表面对辐射的波长而言都是粗糙表面。当目标物的表面足够粗糙,以至于它对可见光辐射的反射辐射亮度在以目标物的中心的2π空间中呈常数,则称该物体为漫反射体,亦称朗伯体。漫反射又称朗伯(Lambert)反射,也称各向同性反射。根据这个定义可知朗伯体表面的BRDF即
$ f\left( {{\theta _i},{\phi _i};{\theta _e},{\phi _e}} \right) = \frac{1}{{\rm{ \mathsf{ π} }}} $ | (2) |
此外,朗伯体物体表面为完全漫反射表面即向所有的方向以同样的辐亮度反射,则得到此类表面的双向反射分布函数为一个常数为
$ f\left( {{\theta _i},{\phi _i};{\theta _e},{\phi _e}} \right) = \lambda $ | (3) |
考虑点光源对表面进行照射,光线入射方向与物体表面面元法线方向有
$ E = \frac{I}{{{D^2}}}\cos \left( {{\theta _i}} \right) $ | (4) |
式中,
当物体表面收到这样的辐照时,根据双向反射函数可得表面辐亮度为
$ L = \lambda \frac{I}{{{D^2}}}{r_d} \times \cos \left( {{\theta _i}} \right) $ | (5) |
式中,
2 图像亮度与表面辐亮度关系
数字成像过程是物体表面发射的光子能量在CCD像平上积分的过程,下面分析图像亮度与物体表面辐亮度的关系。
2.1 立体角
2.2 辐亮度与辐照度
辐亮度[13]指的是辐射体沿着辐射方向、单位面积、单位立体角上的辐射通量,其单位为瓦特/(平方米·立体角)(W/(m2·sr)), 计算公式为
$ {L_r} = \frac{{{\rm{d}}\phi }}{{{\rm{d}}{\omega _r}\cos \left( {{\theta _r}} \right){\rm{d}}{A_r}}} $ | (7) |
辐照度[13]用来表征物体表面所接收到的光照,定义为辐射传输方向上的单位立体角内,通过垂直于该方向上的单位面积、单位波长间隔的辐射功率,其单位为瓦特/平方米(W/m2), 计算公式为
$ {L_i} = \frac{{{\rm{d}}\phi }}{{{\rm{d}}{A_i}}} $ | (8) |
人们能看到日常生活中的物体是因为它们表面的反射光线进入到人眼。对于照相机而言同理,且物体反射进入的入射光越多,图像看起来也会更亮。将第1节推导得到的物体表面反射辐亮度式(5)作为输入,接着推导物体表面辐射到照相机成像的过程,定量分析图像亮度与物体表面辐亮度的关系。
如图 3所示展示了物体表面面元d
首先,依据辐射度相关知识可知物体表面辐射到透镜上的能量d
$ {\rm{d}}\phi = {L_r}{\rm{d}}{A_0}\cos \left( \alpha \right){\rm{d}}{\omega _0} $ | (9) |
式中,d
根据2.1中立体角的有关概念得到式(9)中表面面元与透镜之间的立体角为
$ {\rm{d}}{\omega _0} = \frac{{{\rm{ \mathsf{ π} }}{d^2}}}{{4{r^2}}}\cos \left( \theta \right) $ | (10) |
式中,
$ \frac{{{\rm{d}}{A_p}\cos \left( \theta \right)}}{{{{\left| {OA'} \right|}^2}}} = \frac{{{\rm{d}}{A_0}\cos \left( \alpha \right)}}{{{r^2}}} $ | (11) |
由几何关系可知
$ \left| {OA'} \right| = \frac{f}{{\cos \left( \theta \right)}} $ | (12) |
将式(10)—式(12)代入到式(9)中整理可得
$ {\rm{d}}\phi = \frac{{\rm{ \mathsf{ π} }}}{4}{L_r}{\left( {\frac{d}{f}} \right)^2}{\rm{d}}{A_p}{\cos ^4}\left( \theta \right) $ | (13) |
进一步根据辐照度相关知识可得图像表面面元的辐照度为
$ {L_i} = \frac{{{\rm{d}}\phi }}{{{\rm{d}}{A_p}}} = \frac{{\rm{ \mathsf{ π} }}}{4}{L_r}{\left( {\frac{d}{f}} \right)^2}{\cos ^4}\left( \theta \right) $ | (14) |
辐照度正比于图像亮度,所以
$ I\left( {x,y} \right) = k{L_i} = k\frac{{\rm{ \mathsf{ π} }}}{4}{L_r}{\left( {\frac{d}{f}} \right)^2}{\cos ^4}\left( \theta \right) $ | (15) |
式中,
3 利用亮度信息进行单目深度信息提取
图像表面亮度与物体表面辐亮度成正比,根据物体表面反射模型可知物体表面辐亮度又与点光源到物体距离有直接关系,也就是改变点光源与物体之间的距离,图像亮度也会随之变化,根据这一信息,提出一种利用亮度信息进行单目深度信息提取的算法。
3.1 算法图像采集过程分析
式(5)描述的是点光源发射光强与物体表面辐亮度的关系,式(15)描述的是物体表面辐亮度与图像亮度的关系,联立两式可得图像亮度与点光源之间的关系,即
$ \begin{array}{*{20}{c}} {I\left( {x,y} \right) = k\lambda {r_d}\frac{{\rm{ \mathsf{ π} }}}{4}\frac{I}{{{D^2}}}{{\left( {\frac{d}{f}} \right)}^2} \times }\\ {{{\cos }^4}\left( \theta \right)\cos \left( {{\theta _i}} \right)} \end{array} $ | (16) |
在3次图像采集过程中,摄像机位置不变,焦距、曝光时间不变,则式(16)中参数
$ {K_d} = k\lambda {r_d}\frac{{\rm{ \mathsf{ π} }}}{4}{\left( {\frac{d}{f}} \right)^2}{\cos ^4}\left( \theta \right) $ | (17) |
代入式(16)中,得
$ I\left( {x,y} \right) = {K_d}\frac{I}{{{D^2}}}\cos \left( {{\theta _i}} \right) $ | (18) |
如图 4所示,对算法过程进行阐述,红色虚线所示为摄像机光轴,摄像机在场景中任意位置,先采集环境光状态下的场景图像
由式(18)可得到
$ \left\{ \begin{array}{l} {I_2} = {I_1} + {K_d}\frac{I}{{{D^2}}}\cos \left( {{\theta _i}} \right)\\ {I_3} = {I_1} + {K_d}\frac{I}{{{{\left( {D - \Delta d} \right)}^2}}}\cos \left( {{{\theta '}_i}} \right) \end{array} \right. $ | (19) |
解得
$ D = \Delta d \cdot \frac{1}{{1 - \sqrt {\frac{{\left( {{I_2} - {I_1}} \right)\cos \left( {{{\theta '}_i}} \right)}}{{\left( {{I_3} - {I_1}} \right)\cos \left( {{\theta _i}} \right)}}} }} $ | (20) |
3.2 算法误差分析
在图像采集过程中,影响cos(
对于物体在摄像机视场中所处位置,越接近摄像机视场边缘误差越大,所以在后面的误差分析中都选取摄像机视场边缘作为前提。
对于物体表面面元朝向所带的误差,进行分析:如图 5所示,为使面元
法线方向带来的误差变化分3个阶段:从
日常场景中,摄像机视角不大,此处假设摄像机横向视场为8 m,取视场边缘点进行分析,当光源距离物体垂直距离为物体移动距离的50倍时,得到∠
由图 6可知,当光源移动距离在10 cm附近时,∠
取∠
由图 7(b)可知,虽比值与1的相对误差最大值达到5%左右,但当
综合以上两个因素的分析,为保证测量范围更广,在算法中取光源移动距离即Δ
综合以上分析,在算法中取光源移动距离即Δ
$ D = \Delta d \cdot \frac{1}{{1 - \sqrt {\frac{{\left( {{I_2} - {I_1}} \right)}}{{\left( {{I_3} - {I_1}} \right)}}} }} $ | (21) |
即在已知Δ
4 实验与结果分析
针对提出的算法对不同的场景进行了实验,分析了深度恢复效果。图像采集时需要禁止相机的自动曝光、自动降噪等功能,采取固定的光圈、快门和焦距,以保证3幅图像的成像参数尽量一致。
4.1 简单场景
图 8所示为利用算法进行深度恢复时所需的3幅图像,对图 9中标注的阶梯状的盒子所形成的场景进行深度恢复并得到如图 10所示的恢复图。
从实验结果可见,本方法可以有效估计出前后物体的深度变化,阶梯状信息明显,表 1对深度值进行了定量分析。
表 1
简单场景深度恢复值误差分析
Table 1
Error analysis of simple scene depth restoration
盒子 | 实际距离/m | 实验距离/m | 绝对误差/% |
1号 | 2.2 | 2.011 0 | 8.6 |
2号 | 2.4 | 2.198 0 | 8.4 |
3号 | 2.6 | 2.465 4 | 5.17 |
从绝对误差上来讲,此种方法的误差小于8.6%,且在距离逐渐增大时,随着cos(
4.2 其他场景
5 结论
提出了一种基于图像亮度线索的单目深度信息获取方法。该方法在分析了物体表面辐亮度与图像亮度的关系的基础上,利用点光源在移动过程中所带来的图像亮度变化信息,求解场景深度值。深度提取过程只需拍摄3幅图像,对硬件要求简单,计算复杂度小,不需要场景存在显著的边缘等几何信息,最后通过实验验证了此方法的可行性。
本文提出的深度提取方法仅仅通过了初步的原理和性能验证,在未来工作中还有进一步完善和优化的空间,其中主要包括:分析在非理想点光源照明情况下的物体反射强度;采用混合表面反射模型以适应非全漫反射物体表面。
参考文献
-
[1] Grimson W E L. A computer implementation of a theory of human stereo vision[J]. Philosophical Transactions of the Royal Society B:Biological Sciences, 1981, 292(1058): 217–253. [DOI:10.1098/rstb.1981.0031]
-
[2] Ikeuchi K. Determining a depth map using a dual photometric stereo[J]. The International Journal of Robotics Research, 1987, 6(1): 15–31. [DOI:10.1177/027836498700600102]
-
[3] Shao M, Simchony T, Chellappa R. New algorithms from reconstruction of a 3-D depth map from one or more images[C]//Proceedings of the Computer Society Conference on Computer Vision and Pattern Recognition. Ann Arbor, MI, USA:IEEE, 1988:530-535.[DOI:10.1109/CVPR.1988.196286]
-
[4] Battiato S, Capra A, Curti S, et al. 3D stereoscopic image pairs by depth-map generation[C]//Proceedings of the 2nd International 3D Data Processing, Visualization and Transmission. Thessaloniki, Greece:IEEE, 2004:124-131.[DOI:10.1109/TDPVT.2004.1335185]
-
[5] Zhou Y, Hu B, Zhang J Q. Occlusion detection and tracking method based on Bayesian decision theory[C]//Pacific-Rim Symposium on Image and Video Technology. Berlin, Heidelberg:Springer, 2006:474-482.[DOI:10.1007/11949534_47]
-
[6] Koenderink J J, Van Doorn A J. Affine structure from motion[J]. Journal of the Optical Society of America A, 1991, 8(2): 377–385. [DOI:10.1364/JOSAA.8.000377]
-
[7] Ens J, Lawrence P. An investigation of methods for determining depth from focus[J]. IEEE Transactions on Pattern Analysis and Machine Intelligence, 1993, 15(2): 97–108. [DOI:10.1109/34.192482]
-
[8] Tao M W, Hadap S, Malik J, et al. Depth from combining defocus and correspondence using light-field cameras[C]//Proceedings of the IEEE International Conference on Computer Vision. Sydney, NSW, Australia:IEEE, 2013:673-680.[DOI:10.1109/ICCV.2013.89]
-
[9] Harman P V, Flack J, Fox S, et al. Rapid 2D-to-3D conversion[C]//Proceedings of the Volume 4660, Stereoscopic Displays and Virtual Reality Systems IX. San Jose, California, United States:SPIE, 2002.[DOI:10.1117/12.468020]
-
[10] Schnieders D, Wong K Y K, Dai Z W. Polygonal light source estimation[C]//Proceedings of the Asian Conference on Computer Vision. Berlin, Heidelberg:Springer, 2009:96-107.[DOI:10.1007/978-3-642-12297-2_10]
-
[11] Ngan A, Durand F, Matusik W. Experimental analysis of BRDF models[C]//Proceedings of the Sixteenth Eurographics Conference on Rendering Techniques. Konstanz, Germany:ACM, 2005:117-126.[DOI:10.2312/EGWR/EGSR05/117-126]
-
[12] Zhang Y M. Applied Optics[M]. Beijing: Mechanical Industry Press, 1982. [ 张以谟. 应用光学[M]. 北京: 机械工业出版社, 1982.]
-
[13] Ramamoorthi R, Hanrahan P. On the relationship between radiance and irradiance:determining the illumination from images of a convex Lambertian object[J]. Journal of the Optical Society of America A, 2001, 18(10): 2448–2459. [DOI:10.1364/JOSAA.18.002448]