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

Slides:



Advertisements
Similar presentations
1 Photometric Stereo Reconstruction Dr. Maria E. Angelopoulou.
Advertisements

Computer Vision Radiometry. Bahadir K. Gunturk2 Radiometry Radiometry is the part of image formation concerned with the relation among the amounts of.
Announcements Project 2 due today Project 3 out today –demo session at the end of class.
Computer Vision Spring ,-685 Instructor: S. Narasimhan Wean 5403 T-R 3:00pm – 4:20pm Lecture #12.
Lecture 35: Photometric stereo CS4670 / 5670 : Computer Vision Noah Snavely.
3D Modeling from a photograph
Machine Vision Laboratory The University of the West of England Bristol, UK 2 nd September 2010 ICEBT Photometric Stereo in 3D Biometrics Gary A. Atkinson.
Computer Vision CS 776 Spring 2014 Photometric Stereo and Illumination Cones Prof. Alex Berg (Slide credits to many folks on individual slides)
1. What is Lighting? 2 Example 1. Find the cubic polynomial or that passes through the four points and satisfies 1.As a photon Metal Insulator.
Shape-from-X Class 11 Some slides from Shree Nayar. others.
1 Angel: Interactive Computer Graphics 5E © Addison-Wesley 2009 Shading I.
December 5, 2013Computer Vision Lecture 20: Hidden Markov Models/Depth 1 Stereo Vision Due to the limited resolution of images, increasing the baseline.
Lecture 23: Photometric Stereo CS4670/5760: Computer Vision Kavita Bala Scott Wehrwein.
Capturing light Source: A. Efros. Review Pinhole projection models What are vanishing points and vanishing lines? What is orthographic projection? How.
May 2004SFS1 Shape from shading Surface brightness and Surface Orientation --> Reflectance map READING: Nalwa Chapter 5. BKP Horn, Chapter 10.
3-D Computer Vision CSc83029 / Ioannis Stamos 3-D Computer Vision CSc Radiometry and Reflectance.
Visibility Subspaces: Uncalibrated Photometric Stereo with Shadows Kalyan Sunkavalli, Harvard University Joint work with Todd Zickler and Hanspeter Pfister.
Lecture 32: Photometric stereo, Part 2 CS4670: Computer Vision Noah Snavely.
Optical Flow Estimation using Variational Techniques Darya Frolova.
Basic Principles of Surface Reflectance Lecture #3 Thanks to Shree Nayar, Ravi Ramamoorthi, Pat Hanrahan.
Object recognition under varying illumination. Lighting changes objects appearance.
Information that lets you recognise a region.
Photometric Stereo Merle Norman Cosmetics, Los Angeles Readings R. Woodham, Photometric Method for Determining Surface Orientation from Multiple Images.
Photometric Stereo & Shape from Shading
Computer Vision Spring ,-685 Instructor: S. Narasimhan PH A18B T-R 10:30am – 11:50am Lecture #13.
Lecture 12 Modules Employing Gradient Descent Computing Optical Flow Shape from Shading.
Lecture 12 Stereo Reconstruction II Lecture 12 Stereo Reconstruction II Mata kuliah: T Computer Vision Tahun: 2010.
Analysis of Lighting Effects Outline: The problem Lighting models Shape from shading Photometric stereo Harmonic analysis of lighting.
Y. Moses 11 Combining Photometric and Geometric Constraints Yael Moses IDC, Herzliya Joint work with Ilan Shimshoni and Michael Lindenbaum, the Technion.
CS447/ Realistic Rendering -- Radiosity Methods-- Introduction to 2D and 3D Computer Graphics.
December 4, 2014Computer Vision Lecture 22: Depth 1 Stereo Vision Comparing the similar triangles PMC l and p l LC l, we get: Similarly, for PNC r and.
Sources, Shadows, and Shading
Course 9 Texture. Definition: Texture is repeating patterns of local variations in image intensity, which is too fine to be distinguished. Texture evokes.
Understanding the effect of lighting in images Ronen Basri.
December 9, 2014Computer Vision Lecture 23: Motion Analysis 1 Now we will talk about… Motion Analysis.
Lec 22: Stereo CS4670 / 5670: Computer Vision Kavita Bala.
Course 10 Shading. 1. Basic Concepts: Light Source: Radiance: the light energy radiated from a unit area of light source (or surface) in a unit solid.
Computer Vision Lecture #10 Hossam Abdelmunim 1 & Aly A. Farag 2 1 Computer & Systems Engineering Department, Ain Shams University, Cairo, Egypt 2 Electerical.
Interreflections : The Inverse Problem Lecture #12 Thanks to Shree Nayar, Seitz et al, Levoy et al, David Kriegman.
Announcements Office hours today 2:30-3:30 Graded midterms will be returned at the end of the class.
November 4, THE REFLECTANCE MAP AND SHAPE-FROM-SHADING.
1 Chapter 5: Sources, Shadows, Shading Light source: Anything emits light that is internally generated Exitance: The internally generated power per unit.
Shape from Shading Course web page: vision.cis.udel.edu/cv February 26, 2003  Lecture 6.
Multiple Light Source Optical Flow Multiple Light Source Optical Flow Robert J. Woodham ICCV’90.
Announcements Final Exam Friday, May 16 th 8am Review Session here, Thursday 11am.
Cornell CS465 Spring 2004 Lecture 4© 2004 Steve Marschner 1 Shading CS 465 Lecture 4.
1Ellen L. Walker 3D Vision Why? The world is 3D Not all useful information is readily available in 2D Why so hard? “Inverse problem”: one image = many.
Active Lighting for Appearance Decomposition Todd Zickler DEAS, Harvard University.
Tal Amir Advanced Topics in Computer Vision May 29 th, 2015 COUPLED MOTION- LIGHTING ANALYSIS.
Image-Based Modeling of Complex Surfaces Todd Zickler DEAS, Harvard University.
Understanding the effect of lighting in images Ronen Basri.
EECS 274 Computer Vision Sources, Shadows, and Shading.
Announcements Project 3a due today Project 3b due next Friday.
1 Resolving the Generalized Bas-Relief Ambiguity by Entropy Minimization Neil G. Alldrin Satya P. Mallick David J. Kriegman University of California, San.
From local motion estimates to global ones - physiology:
MAN-522 Computer Vision Spring
CS4670 / 5670: Computer Vision Kavita Bala Lec 27: Stereo.
Merle Norman Cosmetics, Los Angeles
Common Classification Tasks
Capturing light Source: A. Efros.
Announcements Project 3b due Friday.
Depthmap Reconstruction Based on Monocular cues
Announcements Today: evals Monday: project presentations (8 min talks)
Lecture 28: Photometric Stereo
Announcements Project 3 out today demo session at the end of class.
Chapter 11: Stereopsis Stereopsis: Fusing the pictures taken by two cameras and exploiting the difference (or disparity) between them to obtain the depth.
CS 480/680 Computer Graphics Shading.
Shape from Shading and Texture
Physical Problem of Simultaneous Linear Equations in Image Processing
All images are compressed.
Presentation transcript:

Shape from Shading and Texture

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 

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

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

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

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…

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

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

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

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

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

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

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

Shape from Shading Results [Trucco & Verri]

Shape from Shading Results

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”

Photometric Stereo Setup [Rushmeier et al., 1997]

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.

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

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

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

Helmholtz Stereopsis [Zickler, Belhumeur, & Kriegman]

Helmholtz Stereopsis

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

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.

Shape from Texture Results [Forsyth]