Presentation is loading. Please wait.

Presentation is loading. Please wait.

Shape from Shading and Texture. Lambertian Reflectance Model Diffuse surfaces appear equally bright from all directionsDiffuse surfaces appear equally.

Similar presentations


Presentation on theme: "Shape from Shading and Texture. Lambertian Reflectance Model Diffuse surfaces appear equally bright from all directionsDiffuse surfaces appear equally."— Presentation transcript:

1 Shape from Shading and Texture

2 Lambertian Reflectance Model Diffuse surfaces appear equally bright from all directionsDiffuse surfaces appear equally bright from all directions For point illumination, brightness proportional to cos For point illumination, brightness proportional to cos 

3 Lambertian Reflectance Model Therefore, for a constant-colored object with distant illumination, we can write E = L  l  n E = observed brightness L = brightness of light source  = reflectance (albedo) of surface l = direction to light source n = surface normalTherefore, for a constant-colored object with distant illumination, we can write E = L  l  n E = observed brightness L = brightness of light source  = reflectance (albedo) of surface l = direction to light source n = surface normal

4 Shape from Shading The above equation contains some information about shape, and in some cases is enough to recover shape completely (in theory) if L,  and l are knownThe above equation contains some information about shape, and in some cases is enough to recover shape completely (in theory) if L,  and l are known Similar to integration (surface normal is like a derivative), but only know a part of derivativeSimilar to integration (surface normal is like a derivative), but only know a part of derivative Have to assume surface continuityHave to assume surface continuity

5 Shape from Shading Assume surface is given by Z(x,y)Assume surface is given by Z(x,y) LetLet In this case, surface normal isIn this case, surface normal is

6 Shape from Shading So, writeSo, write Discretize: end up with one equation per pixelDiscretize: end up with one equation per pixel But this is p equations in 2 p unknowns…But this is p equations in 2 p unknowns…

7 Shape from Shading Integrability constraint:Integrability constraint: Wind up with system of 2 p (nonlinear) differential equationsWind up with system of 2 p (nonlinear) differential equations No solution in presence of noise or depth discontinuitiesNo solution in presence of noise or depth discontinuities

8 Estimating Illumination and Albedo Need to know surface reflectance and Illumination brightness and directionNeed to know surface reflectance and Illumination brightness and direction In general, can’t compute from single imageIn general, can’t compute from single image Certain assumptions permit estimating theseCertain assumptions permit estimating these – Assume uniform distribution of normals, look at distribution of intensities in image – Insert known reference object into image – Slightly specular object: estimate lighting from specular highlights, then discard pixels in highlights

9 Variational Shape from Shading Approach: energy minimizationApproach: energy minimization Given observed E(x,y), find shape Z(x,y) that minimizes energyGiven observed E(x,y), find shape Z(x,y) that minimizes energy Regularization: minimize combination of disparity w. data, surface curvatureRegularization: minimize combination of disparity w. data, surface curvature

10 Variational Shape from Shading Solve by techniques from calculus of variationsSolve by techniques from calculus of variations Use Euler-Lagrange equations to get a PDE, solve numericallyUse Euler-Lagrange equations to get a PDE, solve numerically – Unlike with snakes, “greedy” methods tend not to work well

11 Enforcing Integrability Let f Z be the Fourier transform of Z, f p and f q be Fourier transforms of p and qLet f Z be the Fourier transform of Z, f p and f q be Fourier transforms of p and q ThenThen For nonintegrable p and q these aren’t equalFor nonintegrable p and q these aren’t equal

12 Enforcing Integrability Construct and recomputeConstruct and recompute The new p’ and q’ are the integrable equations closest to the original p and qThe new p’ and q’ are the integrable equations closest to the original p and q

13 Difficulties with Shape from Shading Robust estimation of L, , l?Robust estimation of L, , l? ShadowsShadows Non-Lambertian surfacesNon-Lambertian surfaces More than 1 light, or “diffuse illumination”More than 1 light, or “diffuse illumination” InterreflectionsInterreflections

14 Shape from Shading Results [Trucco & Verri]

15 Shape from Shading Results

16 Active Shape from Shading Idea: several (user-controlled) light sourcesIdea: several (user-controlled) light sources More dataMore data – Allows determining surface normal directly – Allows spatially-varying reflectance – Redundant measurements: discard shadows and specular highlights Often called “photometric stereo”Often called “photometric stereo”

17 Photometric Stereo Setup [Rushmeier et al., 1997]

18 Photometric Stereo Math For each point p, can writeFor each point p, can write Constant  incorporates light source brightness, camera sensitivity, etc.Constant  incorporates light source brightness, camera sensitivity, etc.

19 Photometric Stereo Math Solving above equation gives (  /   nSolving above equation gives (  /   n n must be unit-length  uniquely determinedn must be unit-length  uniquely determined Determine  up to global constantDetermine  up to global constant With more than 3 light sources:With more than 3 light sources: – Discard highest and lowest measurements – If still more, solve by least squares

20 Photometric Stereo Results [Rushmeier et al., 1997] Input images Recovered normals (re-lit) Recovered color

21 Helmholtz Stereopsis Based on Helmholtz reciprocity: surface reflectance is the same under interchange of light, viewerBased on Helmholtz reciprocity: surface reflectance is the same under interchange of light, viewer So, take pairs of observations w. viewer, light interchangedSo, take pairs of observations w. viewer, light interchanged Ratio of the observations in a pair is independent of surface materialRatio of the observations in a pair is independent of surface material

22 Helmholtz Stereopsis [Zickler, Belhumeur, & Kriegman]

23 Helmholtz Stereopsis

24 Texture Texture: repeated pattern on a surfaceTexture: repeated pattern on a surface Elements (“textons”) either identical or come from some statistical distributionElements (“textons”) either identical or come from some statistical distribution Shape from texture comes from looking at deformation of individual textons or from distribution of textons on a surfaceShape from texture comes from looking at deformation of individual textons or from distribution of textons on a surface

25 Shape from Texture Much the same as shape from shading, but have more informationMuch the same as shape from shading, but have more information – Foreshortening: gives surface normal (not just one component, as in shape from shading) – Perspective distortion: gives information about depth directly Sparse depth information (only at textons)Sparse depth information (only at textons) – About the same as shape from shading, because of smoothness term in energy eqn.

26 Shape from Texture Results [Forsyth]


Download ppt "Shape from Shading and Texture. Lambertian Reflectance Model Diffuse surfaces appear equally bright from all directionsDiffuse surfaces appear equally."

Similar presentations


Ads by Google