数字图像处理-光度立体视觉.ppt
Image&Vision Lab信息视觉处理信息视觉处理 光度立体视觉光度立体视觉 Photometric StereoImage&Vision LabMaterials from:Image&Vision LabDC&CV Lab.DC&CV Lab.CSIE NTU双向反射分布函数(双向反射分布函数(BRDF)pThe bidirectional reflectance distribution function is the fraction of incident light emitted in one direction when the surface is illuminated from another direction.pratio of the scene radiance to the scene irradianceBi-directional Reflectance FunctionImage&Vision Lab:Polar angle :Azimuth angleImage&Vision Lab双向反射分布函数(双向反射分布函数(BRDF):polar angle between surface normal and lens center :azimuth angle of the sensor :emitting from :incident to :irradiance of the incident light at the illuminated surface :radiance of the reflected light :ratio of the scene radiance to the scene irradianceDifferential reflectance model:Image&Vision Lab双向反射分布函数(双向反射分布函数(BRDF)p定义:输出方向的辐射度与输入方向的辐照度的比率;pBRDF可以从零(在该方向没有反射光)变化至无穷大(输出方向的单位辐射度来自于输入方向任意小的辐射度);pBRDF在输入和输出方向是对称的。(著名的Helmholtz互易原理);p尽管对于某些输入与输出的角度,BDRF可以较大,但对大多数来说它不能大。事实上平均值必须相当小。Image&Vision Labsourcesurfacereflectionsurfaceincidentdirection bodyreflection Body Reflection:Diffuse ReflectionMatte AppearanceNon-Homogeneous MediumClay,paper,etc Surface Reflection:Specular ReflectionGlossy AppearanceHighlightsDominant for MetalsImage Intensity =Body Reflection+Surface ReflectionMechanisms of ReflectionImage&Vision LabBody Reflection:Diffuse ReflectionMatte AppearanceNon-Homogeneous MediumClay,paper,etcSurface Reflection:Specular ReflectionGlossy AppearanceHighlightsDominant for MetalsMany materials exhibitboth Reflections:Example SurfacesImage&Vision Labviewingdirectionsurfaceelementnormalincidentdirection Lambertian BRDF is simply a constant:albedo Surface appears equally bright from ALL directions!(independent of )Surface Radiance:Commonly used in Vision and Graphics!source intensitysource intensity IDiffuse Reflection and Lambertian BRDFImage&Vision LabDiffuse Reflection and Lambertian BRDFImage&Vision LabCANT perceive the shape of the snow covered terrain!CAN perceive shape in regions lit by the street lamp!WHY?White-out:Snow and Overcast SkiesImage&Vision Lab Assume Lambertian Surface with Albedo=1(no absorption)Assume Sky radiance is constant Substituting in above Equation:Radiance of any patch is the same as Sky radiance!(white-out condition)Diffuse Reflection from Uniform SkyImage&Vision Labsource intensity Isurfaceelementnormalincidentdirectionviewingdirectionspecular/mirror direction Mirror BRDF is simply a double-delta function:Valid for very smooth surfaces.All incident light energy reflected in a SINGLE direction (only when =).Surface Radiance:specular albedoSpecular Reflection and Mirror BRDFImage&Vision LabObserved Image Color =a x Body Color+b x Specular Reflection ColorRGBKlinker-Shafer-Kanade 1988Color of Source(Specular reflection)Color of Surface(Diffuse/Body Reflection)Does not specify any specific model forDiffuse/specular reflectionCombing Specular and Diffuse:Dichromatic ReflectionImage&Vision LabDiffuse and Specular Reflectiondiffusespeculardiffuse+specularImage&Vision LabPhotometric StereoImage&Vision LabImage Intensity and 3D GeometrypShading as a cue for shape reconstructionpWhat is the relation between intensity and shape?uReflectance MapImage&Vision LabSurface Normalsurface normalEquation of planeorLetSurface normalImage&Vision LabGradient SpaceNormal vectorSource vectorplane is called the Gradient Space(pq plane)Every point on it corresponds to a particular surface orientationImage&Vision LabReflectance MappRelates image irradiance I(x,y)to surface orientation(p,q)for given source direction and surface reflectancepLambertian case:source brightness:surface albedo(reflectance):constant(optical system)Image irradiance:Let then Image&Vision LabpLambertian caseReflectance Map(Lambertian)cone of constantIso-brightness contourReflectance MapImage&Vision LabpLambertian caseiso-brightnesscontourNote:is maximum whenReflectance MapImage&Vision LabpGlossy surfaces(Torrance-Sparrow reflectance model)diffuse termspecular termDiffuse peakSpecular peakReflectance MapImage&Vision LabShape from a Single Image?pGiven a single image of an object with known surface reflectance taken under a known light source,can we recover the shape of the object?pGiven R(p,q)(pS,qS)and surface reflectance)can we determine(p,q)uniquely for each image point?NOImage&Vision LabSolutionpTake more imagesuPhotometric stereopAdd more constraintsuShape-from-shadingImage&Vision LabPhotometric StereoImage&Vision LabpWe can write this in matrix form:Image irradiance:Lambertian case:Photometric StereoImage&Vision LabSolving the EquationsinverseImage&Vision LabMore than Three Light SourcespGet better results by using more lightspLeast squares solution:pSolve for as beforeMoore-Penrose pseudo inverseImage&Vision LabColor ImagespThe case of RGB imagesuget three sets of equations,one per color channel:uSimple solution:first solve for n using one channeluThen substitute known n into above equations to getuOr combine three channels and solve for nImage&Vision LabComputing light source directionspTrick:place a chrome sphere in the sceneuthe location of the highlight tells you the source directionImage&Vision LabpFor a perfect mirror,light is reflected about NSpecular Reflection-RecappWe see a highlight when pThen s is given as follows:Image&Vision LabComputing the Light Source DirectionpCan compute N by studying this figureuHints:luse this equation:lcan measure c,h,and r in the imageNrNCHchChrome sphere that has a highlight at position h in the imageimage planesphere in 3DImage&Vision LabDepth from NormalspGet a similar equation for V2uEach normal gives us two linear constraints on zucompute z values by solving a matrix equationV1V2NImage&Vision Lab积分方法积分方法p积分的方法可以分为局部方法(local approach)和全局方法(global approach)两类。局部方法比较容易操作,计算效率也比较高,可是它会传递误差,因此对光度立体得到的法向数据要求很精确。Image&Vision Lab局部和全局积分方法局部和全局积分方法p局部方法:Coleman和 Jain提出了一种扫描算法,是从点P相邻两点的法向矢量来计算P点的深度。Healey 和 Jain是从P 点的相邻8个点的法向来恢复P点的深度的。Wu 和 Li 用格林理论和多路径积分去恢复相对高度。最简单的局部积分方法就是利用梯度从不同路径积分,然后去平均p全局方法:把表面积分当作一个优化问题。因为他把梯度数据当成全局数据,所以这种算法比较抗噪声。Ikeuchi用最小二乘法从针图来估计表面深度。Horn、Frankot and Chellappa、Simchony等也提出了一些相应的全局算法。Image&Vision Lab积分方法的比较积分方法的比较真实形状Image&Vision Lab不同方法积分结果不同方法积分结果Possion方程优化方法对尺度的保持比较好Frankot Chellapp频域优化的方法对形态保持的比较好Image&Vision Lab不同方法积分结果不同方法积分结果仿射变换方法加权能量方程Image&Vision LabLimitationspBig problemsuDoesnt work for shiny things,semi-translucent thingsuShadows,inter-reflectionspSmaller problemsuCamera and lights have to be distantuCalibration requirementslmeasure light source directions,intensitieslcamera response functionImage&Vision LabTrick for Handling ShadowspWeight each equation by the pixel brightness:pGives weighted least-squares matrix equation:pSolve for as beforeImage&Vision Lab由多个视图获取表面法线与发射率由多个视图获取表面法线与发射率p一个球面组成的5幅图像,是使用正交投影从一个视角得到的。Image&Vision Lab由多个视图获取表面法线与发射率由多个视图获取表面法线与发射率p表面的反射系数Image&Vision Lab由多个视图获取表面法线与发射率由多个视图获取表面法线与发射率p法线向量场Image&Vision Lab由法线获取表面形状由法线获取表面形状p通过积分求形状Image&Vision Lab实际例子实际例子p乒乓球图像:(a)(b)(c)(d)(e)(f)(g)(h)Image&Vision Lab实际例子实际例子p恢复结果:Image&Vision LabOriginal ImagesImage&Vision LabResults-ShapeShallow reconstruction(effect of interreflections)Accurate reconstruction(after removing interreflections)Image&Vision LabResults-AlbedoNo Shading InformationImage&Vision LabOriginal ImagesImage&Vision LabResults-ShapeImage&Vision LabResults-AlbedoImage&Vision LabResults1.Estimate light source directions2.Compute surface normals3.Compute albedo values4.Estimate depth from surface normals5.Relight the object(with original texture and uniform albedo)Image&Vision Lab成像系统成像系统Image&Vision Labp传统的光度立体视觉视觉需要光源从多个方向依次对物体照明,并拍摄多幅图像,才能完成光度立体的计算需要。近些年来,有学者提出了彩色光度立体的概念,即分别用红、绿、蓝三色光从三个方向对物体进行光照,在一幅彩色图像中分别进行三色光的光度计算,进而恢复立体信息。最新进展最新进展Image&Vision Lab最新进展最新进展p三色光同时记录的光度信息是彼此分离的,因为照相机对三色光的光度记录是分开的,对于Bayer相机来说,虽然没有分别记录,但是CCD上每一个像素点的只对一种色光感应,因此也能够进行光度彩色光度立体。Image&Vision Lab进一步学习材料进一步学习材料pDavid A.Forsyth等著,林学訚 等译.计算机视觉一种现代方法M.北京:电子工业出版社,2004.6.pDense Photometric stereo,http:/www.cse.ust.hk/cktang/sample_pub/dense_ps_pami06.pdf