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

Similar documents
CS4670/5760: Computer Vision

CS5670: Computer Vision

Radiance. Pixels measure radiance. This pixel Measures radiance along this ray

Other approaches to obtaining 3D structure

Ligh%ng and Reflectance

Epipolar geometry contd.

Lambertian model of reflectance I: shape from shading and photometric stereo. Ronen Basri Weizmann Institute of Science

Lecture 22: Basic Image Formation CAP 5415

Assignment #2. (Due date: 11/6/2012)

CS6670: Computer Vision

Prof. Trevor Darrell Lecture 18: Multiview and Photometric Stereo

Lighting affects appearance

Shading I Computer Graphics I, Fall 2008

Photometric Stereo.

And if that 120MP Camera was cool

Capturing light. Source: A. Efros

CSE 167: Introduction to Computer Graphics Lecture #6: Lights. Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2016

Image Formation: Light and Shading. Introduction to Computer Vision CSE 152 Lecture 3

Illumination Models & Shading

CS6670: Computer Vision

Using a Raster Display Device for Photometric Stereo

Photometric stereo. Recovering the surface f(x,y) Three Source Photometric stereo: Step1. Reflectance Map of Lambertian Surface

Lecture 15: Shading-I. CITS3003 Graphics & Animation

Rendering: Reality. Eye acts as pinhole camera. Photons from light hit objects

Lecture 24: More on Reflectance CAP 5415

CS5620 Intro to Computer Graphics

Announcements. Image Formation: Light and Shading. Photometric image formation. Geometric image formation

Announcements. Photometric Stereo. Shading reveals 3-D surface geometry. Photometric Stereo Rigs: One viewpoint, changing lighting

Lighting affects appearance

Video Mosaics for Virtual Environments, R. Szeliski. Review by: Christopher Rasmussen

Photometric Stereo with Auto-Radiometric Calibration

Lights, Surfaces, and Cameras. Light sources emit photons Surfaces reflect & absorb photons Cameras measure photons

Radiometry and reflectance

Lighting and Shading Computer Graphics I Lecture 7. Light Sources Phong Illumination Model Normal Vectors [Angel, Ch

Computer Graphics. Illumination and Shading

Lighting. To do. Course Outline. This Lecture. Continue to work on ray programming assignment Start thinking about final project

Passive 3D Photography

Comp 410/510 Computer Graphics. Spring Shading

CSE 167: Lecture #7: Color and Shading. Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2011

Light source estimation using feature points from specular highlights and cast shadows

Image-based Lighting

Illumination & Shading

Multiple View Geometry

Other Reconstruction Techniques

Problem Set 4 Part 1 CMSC 427 Distributed: Thursday, November 1, 2007 Due: Tuesday, November 20, 2007

Topic 12: Texture Mapping. Motivation Sources of texture Texture coordinates Bump mapping, mip-mapping & env mapping

Starting this chapter

WHY WE NEED SHADING. Suppose we build a model of a sphere using many polygons and color it with glcolor. We get something like.

Light Transport CS434. Daniel G. Aliaga Department of Computer Science Purdue University

Topic 11: Texture Mapping 11/13/2017. Texture sources: Solid textures. Texture sources: Synthesized

Computer Graphics (CS 4731) Lecture 16: Lighting, Shading and Materials (Part 1)

CENG 477 Introduction to Computer Graphics. Ray Tracing: Shading

Announcements. Radiometry and Sources, Shadows, and Shading

CS635 Spring Department of Computer Science Purdue University

CSE 167: Introduction to Computer Graphics Lecture #6: Colors. Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2013

Topic 11: Texture Mapping 10/21/2015. Photographs. Solid textures. Procedural

Announcement. Lighting and Photometric Stereo. Computer Vision I. Surface Reflectance Models. Lambertian (Diffuse) Surface.

Introduction to Computer Graphics 7. Shading

Dense 3D Reconstruction. Christiano Gava

CSE 167: Introduction to Computer Graphics Lecture #7: Lights. Jürgen P. Schulze, Ph.D. University of California, San Diego Spring Quarter 2015

Photometric Stereo. Lighting and Photometric Stereo. Computer Vision I. Last lecture in a nutshell BRDF. CSE252A Lecture 7

Radiance. Radiance properties. Radiance properties. Computer Graphics (Fall 2008)

Photometric stereo , , Computational Photography Fall 2018, Lecture 17

Inverse Light Transport (and next Separation of Global and Direct Illumination)

Specularities Reduce Ambiguity of Uncalibrated Photometric Stereo

Computer Graphics. Shading. Based on slides by Dianna Xu, Bryn Mawr College

Orthogonal Projection Matrices. Angel and Shreiner: Interactive Computer Graphics 7E Addison-Wesley 2015

Topics and things to know about them:

Computer Graphics (CS 543) Lecture 7b: Intro to lighting, Shading and Materials + Phong Lighting Model

Understanding Variability

Illumination and Shading

Photometric*Stereo* October*8,*2013* Dr.*Grant*Schindler* *

Virtual Reality for Human Computer Interaction

Lighting and Shading

DIFFUSE-SPECULAR SEPARATION OF MULTI-VIEW IMAGES UNDER VARYING ILLUMINATION. Department of Artificial Intelligence Kyushu Institute of Technology

Structure from Motion. Lecture-15

BIL Computer Vision Apr 16, 2014

CS 381 Computer Graphics, Fall 2008 Midterm Exam Solutions. The Midterm Exam was given in class on Thursday, October 23, 2008.

CMSC427 Shading Intro. Credit: slides from Dr. Zwicker

Today. Global illumination. Shading. Interactive applications. Rendering pipeline. Computergrafik. Shading Introduction Local shading models

CS452/552; EE465/505. Intro to Lighting

Shading. Why we need shading. Scattering. Shading. Objectives

So far, we have considered only local models of illumination; they only account for incident light coming directly from the light sources.

Announcement. Photometric Stereo. Computer Vision I. Shading reveals 3-D surface geometry. Shape-from-X. CSE252A Lecture 8

CS 4620 Midterm, March 21, 2017

Using a Raster Display for Photometric Stereo

CS130 : Computer Graphics Lecture 8: Lighting and Shading. Tamar Shinar Computer Science & Engineering UC Riverside

Local Illumination. CMPT 361 Introduction to Computer Graphics Torsten Möller. Machiraju/Zhang/Möller

Distributed Ray Tracing

Stereo and Epipolar geometry

Global Illumination CS334. Daniel G. Aliaga Department of Computer Science Purdue University

Dense 3D Reconstruction. Christiano Gava

Final project bits and pieces

Lighting. Figure 10.1

Multi-View 3D-Reconstruction

Structure from motion

Pipeline Operations. CS 4620 Lecture 10

CMSC427 Advanced shading getting global illumination by local methods. Credit: slides Prof. Zwicker

Today. Global illumination. Shading. Interactive applications. Rendering pipeline. Computergrafik. Shading Introduction Local shading models

Pipeline Operations. CS 4620 Lecture Steve Marschner. Cornell CS4620 Spring 2018 Lecture 11

Transcription:

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

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

Last Time: Two-View Stereo

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 What results can you get? Input (1 of 12) Normals (RGB colormap) Normals (vectors) Shaded 3D rendering Textured 3D rendering

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

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

Lambertian Reflectance I = N L 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 1. Reflected energy is proportional to cosine of angle between L and N Light hitting surface is proportional to the cosine

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

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

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

Lambertian Reflectance: Outgoing 2. Measured intensity is viewpoint-independent Measured intensity / B 0 cos( ) 1 cos( ) A / 1 cos( ).

Image Formation Model: Final 1. Diffuse albedo: what fraction of incoming light is reflected? Introduce scale factor k d 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 k d is 1 for now. What can we measure from one image? cos 1 (I) 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 L 3 L 2 V L 1 Write this as a matrix equation:

Solving the Equations 22

Solving the Equations 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. 23

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

More than one pixel Previously: 1 x # images I 1 x 3 = N * 3 x # images L

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

Color Images Now we have 3 equations for a pixel: Simple approach: solve for N using grayscale or a single channel. k d Then fix N and solve for each channel s : I i L i N T k d i ( L i N T ) 2 i 27

Depth Map from Normal Map We now have a surface normal, but how do we get depth? orthographic projection V 2 N V 1 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 28

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

Determining Light Directions For a perfect mirror, the light is reflected across N: I e I i 0 if V otherwise R So the light source direction is given by: L = 2(N R)N R 30

Determining Light Directions For a sphere with highlight at point H: N H rn C sphere in 3D h c image plane Compute N: N x = x h r N y = y h r x c y c N z = p 1 x 2 y 2 R = direction of the camera from C = [0 0 1] T L = 2(N R)N R 31

Results from Athos Georghiades 32

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 State-of-theart MVS result Ground truth 34

Taking Stock: Assumptions Lighting Materials Geometry Camera directional diffuse convex / no shadows linear known direction no interreflections orthographic > 2 nonplanar directions no subsurface scattering 35

Questions?

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

Unknown Lighting Surface normals Light directions I = kn `L Diffuse albedo Light intensity 38

Unknown Lighting Surface normals, scaled by albedo Light directions, scaled by intensity I = N L 39

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

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

Unknown Lighting M ij = L i N j j j n jx i M ij i = l ix l iy l iz * n jy n jz N (3 x p) M (n x p) L (n x 3) There s hope: We know that M is rank 3

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

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

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

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

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

Unknown Lighting Use the SVD to decompose M: M = U p A A 1 p V L = U p A S = A 1p V

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

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. [Belhumeur et al. 97]

Questions?

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

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

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

Cookie Paint Clear Elastomer

Lights, cam mera, action mera, Sensor Lig ghts Cam mera