Lecture 23: Photometric Stereo CS4670/5760: Computer Vision Kavita Bala Scott Wehrwein.

Slides:



Advertisements
Similar presentations
Photometric Image Formation
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
Capturing light Source: A. Efros. Image formation How bright is the image of a scene point?
Shape-from-X Class 11 Some slides from Shree Nayar. others.
Based on slides created by Edward Angel
1 Angel: Interactive Computer Graphics 5E © Addison-Wesley 2009 Shading I.
University of New Mexico
Uncalibrated Geometry & Stratification Sastry and Yang
Visibility Subspaces: Uncalibrated Photometric Stereo with Shadows Kalyan Sunkavalli, Harvard University Joint work with Todd Zickler and Hanspeter Pfister.
Introduction to Computer Vision CS / ECE 181B Tues, May 18, 2004 Ack: Matthew Turk (slides)
Basic Principles of Surface Reflectance
Objectives Learn to shade objects so their images appear three- dimensional Learn to shade objects so their images appear three- dimensional Introduce.
Lecture 32: Photometric stereo, Part 2 CS4670: Computer Vision Noah Snavely.
Previously Two view geometry: epipolar geometry Stereo vision: 3D reconstruction epipolar lines Baseline O O’ epipolar plane.
Object recognition under varying illumination. Lighting changes objects appearance.
Photometric Stereo Merle Norman Cosmetics, Los Angeles Readings R. Woodham, Photometric Method for Determining Surface Orientation from Multiple Images.
Lecture 20: Light, reflectance and photometric stereo
1 Angel: Interactive Computer Graphics 4E © Addison-Wesley 2005 Shading I Ed Angel Professor of Computer Science, Electrical and Computer Engineering,
CS 480/680 Computer Graphics Shading I Dr. Frederick C Harris, Jr.
Light and shading Source: A. Efros.
Computer Vision Spring ,-685 Instructor: S. Narasimhan PH A18B T-R 10:30am – 11:50am Lecture #13.
CS 445 / 645: Introductory Computer Graphics
1 Introduction to Computer Graphics with WebGL Ed Angel Professor Emeritus of Computer Science Founding Director, Arts, Research, Technology and Science.
1/20 Obtaining Shape from Scanning Electron Microscope Using Hopfield Neural Network Yuji Iwahori 1, Haruki Kawanaka 1, Shinji Fukui 2 and Kenji Funahashi.
Analysis of Lighting Effects Outline: The problem Lighting models Shape from shading Photometric stereo Harmonic analysis of lighting.
Geometric Models & Camera Calibration
-Global Illumination Techniques
Y. Moses 11 Combining Photometric and Geometric Constraints Yael Moses IDC, Herzliya Joint work with Ilan Shimshoni and Michael Lindenbaum, the Technion.
Shape from Shading and Texture. Lambertian Reflectance Model Diffuse surfaces appear equally bright from all directionsDiffuse surfaces appear equally.
Capturing light Source: A. Efros.
Sources, Shadows, and Shading
David Luebke 1 10/26/2015 Lighting CS 445/645 Introduction to Computer Graphics David Luebke, Spring 2003.
Radiometry and Photometric Stereo 1. Estimate the 3D shape from shading information Can you tell the shape of an object from these photos ? 2.
Understanding the effect of lighting in images Ronen Basri.
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.
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.
1 Introduction to Computer Graphics with WebGL Ed Angel Professor Emeritus of Computer Science Founding Director, Arts, Research, Technology and Science.
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.
776 Computer Vision Jan-Michael Frahm & Enrique Dunn Spring 2013.
Local Illumination and Shading
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.
1 CSCE 441: Computer Graphics Lighting Jinxiang Chai.
Tal Amir Advanced Topics in Computer Vision May 29 th, 2015 COUPLED MOTION- LIGHTING ANALYSIS.
OpenGL Shading. 2 Objectives Learn to shade objects so their images appear three-dimensional Introduce the types of light-material interactions Build.
Lighting and Reflection Angel Angel: Interactive Computer Graphics5E © Addison-Wesley
01/27/03© 2002 University of Wisconsin Last Time Radiometry A lot of confusion about Irradiance and BRDFs –Clarrified (I hope) today Radiance.
Understanding the effect of lighting in images Ronen Basri.
EECS 274 Computer Vision Sources, Shadows, and Shading.
1 CSCE 441: Computer Graphics Lighting Jinxiang Chai.
Computer vision: geometric models Md. Atiqur Rahman Ahad Based on: Computer vision: models, learning and inference. ©2011 Simon J.D. Prince.
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.
CS5670: Computer Vision Noah Snavely Light & Perception.
MAN-522 Computer Vision Spring
CS4670 / 5670: Computer Vision Kavita Bala Lec 27: Stereo.
Merle Norman Cosmetics, Los Angeles
Announcements Project 3b due Friday.
Announcements Today: evals Monday: project presentations (8 min talks)
Isaac Gang University of Mary Hardin-Baylor
Lecture 28: Photometric Stereo
Announcements Project 3 out today demo session at the end of class.
Shape from Shading and Texture
Physical Problem of Simultaneous Linear Equations in Image Processing
Presentation transcript:

Lecture 23: Photometric Stereo CS4670/5760: Computer Vision Kavita Bala Scott Wehrwein

Announcements PA3 Artifact due tonight PA3 Demos Thursday Signups close at 4:30 today No lecture on Friday

Last Time: Two-View Stereo

Key Idea: use feature motion to understand shape

Today: Photometric Stereo Key Idea: use pixel brightness to understand shape

Today: Photometric Stereo Key Idea: use pixel brightness to understand shape

Photometric Stereo Input (1 of 12) Normals (RGB colormap) Normals (vectors)Shaded 3D rendering Textured 3D rendering What results can you get?

Modeling Image Formation Let’s track a “ray” of light all the way from light source to the sensor. Now we need to reason about: How light interacts with the scene How a pixel value is related to light energy in the world

Directional Lighting Key property: all rays are parallel Equivalent to an infinitely distant point source

Lambertian Reflectance Image intensity Surface normal Light direction Image intensity cos(angle between N and L)

Lambertian Reflectance 1.Reflected energy is proportional to cosine of angle between L and N (incoming) 2.Measured intensity is viewpoint-independent (outgoing)

Lambertian Reflectance: Incoming 1.Reflected energy is proportional to cosine of angle between L and N

Lambertian Reflectance: Incoming 1.Reflected energy is proportional to cosine of angle between L and N

Lambertian Reflectance: Incoming Light hitting surface is proportional to the cosine 1.Reflected energy is proportional to cosine of angle between L and N

Lambertian Reflectance: Outgoing 1.Measured intensity is viewpoint-independent

Lambertian Reflectance: Outgoing 1.Measured intensity is viewpoint-independent

Lambertian Reflectance: Outgoing 1.Measured intensity is viewpoint-independent

Lambertian Reflectance: Outgoing Measured intensity 1.Measured intensity is viewpoint-independent

Image Formation Model: Final 1.Diffuse albedo: what fraction of incoming light is reflected? Introduce scale factor 2.Light intensity: how much light is arriving? Compensate with camera exposure (global scale factor) 3.Camera response function Assume pixel value is linearly proportional to incoming energy (perform radiometric calibration if not)

A Single Image: Shape from Shading Assume is 1 for now. What can we measure from one image? is the angle between N and L Add assumptions: A few known normals (e.g. silhouettes) Smoothness of normals In practice, SFS doesn’t work very well: assumptions are too restrictive, too much ambiguity in nontrivial scenes.

Multiple Images: Photometric Stereo N L1L1 L2L2 V L3L3 Write this as a matrix equation:

Solving the Equations 22

Solving the Equations 23 When is L nonsingular (invertible)? >= 3 light directions are linearly independent, or: All light direction vectors cannot lie in a plane. What if we have more than one pixel? Stack them all into one big system.

More than Three Lights Solve using least squares (normal equations): Or equivalently, use the SVD. Given G, solve for N and as before. 24

More than one pixel I 3 x # images NL = * 1 x 31 x # images Previously:

More than one pixel I 3 x # images NL = p x 3p x # images * Stack all pixels into one system: Solve as before.

Color Images Now we have 3 equations for a pixel: Simple approach: solve for N using grayscale or a single channel. Then fix N and solve for each channel’s : 27

Depth Map from Normal Map We now have a surface normal, but how do we get depth? 28 V1V1 V2V2 N orthographic projection Assume a smooth surface Get a similar equation for V 2 Each normal gives us two linear constraints on z compute z values by solving a matrix equation

Determining Light Directions 29 Trick: Place a mirror ball in the scene. The location of the highlight is determined by the light source direction.

For a perfect mirror, the light is reflected across N: So the light source direction is given by: Determining Light Directions 30

For a sphere with highlight at point H: R = direction of the camera from C = Determining Light Directions 31 Compute N:

Results 32 from Athos Georghiades

Results Input (1 of 12) Normals (RGB colormap) Normals (vectors)Shaded 3D rendering Textured 3D rendering

For (unfair) Comparison Multi-view stereo results on a similar object 47+ hrs compute time 34 State-of-the-art MVS result Ground truth

Taking Stock: Assumptions 35 LightingMaterialsGeometryCamera directionaldiffuse convex / no shadows linear known direction no inter- reflections orthographic > 2 nonplanar directions no subsurface scattering

Questions?

What we’ve seen so far: [Woodham 1980] Next up: Unknown light directions [Hayakawa 1994] Unknown Lighting 37

Unknown Lighting 38 Diffuse albedo Light intensity Surface normalsLight directions

Unknown Lighting 39 Surface normals, scaled by albedo Light directions, scaled by intensity

Unknown Lighting 40 M n = # images p = # pixels L N = * Same as before, just transposed:

Unknown Lighting 41 = * ML N Measurements (one image per row) Light directions (scaled by intensity) Surface normals (scaled by albedo) Both L and N are now unknown! This is a matrix factorization problem.

= * ML N There’s hope: We know that M is rank 3 (n x 3) (3 x p) (n x p) Unknown Lighting

MU V = Use the SVD to decompose M: SVD gives the best rank-3 approximation of a matrix. Unknown Lighting

MU V = Use the SVD to decompose M: What do we do with ? Unknown Lighting

MU V = Use the SVD to decompose M: What do we do with ? Unknown Lighting

MU V = Use the SVD to decompose M: Can we just do that? Unknown Lighting

MU V = Use the SVD to decompose M: Can we just do that?…almost. The decomposition is non-unique up to an invertible 3x3 A. Unknown Lighting

MU V = Use the SVD to decompose M: Unknown Lighting

MU V = Use the SVD to decompose M: You can find A if you know 6 points with the same reflectance, or 6 lights with the same intensity. Unknown Lighting

Unknown Lighting: Ambiguities Multiple combinations of lighting and geometry can produce the same sets of images. Add assumptions or prior knowledge about geometry or lighting, etc. to limit the ambiguity.

Questions?

Since 1994… Workarounds for many of the restrictive assumptions. Webcam photometric stereo: Ackermann et al. 2012

Since 1994… Photometric stereo from unstructured photo collections (different cameras and viewpoints): Shi et al, 2014

Non-Lambertian (shiny) materials: Since 1994… Hertzmann and Seitz, 2005