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

Similar documents
Other approaches to obtaining 3D structure

Epipolar geometry contd.

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

CS4670/5760: Computer Vision

Ligh%ng and Reflectance

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

Lecture 22: Basic Image Formation CAP 5415

Using a Raster Display Device for Photometric Stereo

COMP 558 lecture 16 Nov. 8, 2010

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

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

CS6670: Computer Vision

CS6670: Computer Vision

Starting this chapter

Capturing light. Source: A. Efros

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

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

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

Photometric Stereo, Shape from Shading SfS Chapter Szelisky

Photometric Stereo. Photometric Stereo. Shading reveals 3-D surface geometry BRDF. HW3 is assigned. An example of photometric stereo

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

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

Photometric Stereo.

Introduction. Lighting model Light reflection model Local illumination model Reflectance model BRDF

Understanding Variability

CS5670: Computer Vision

Shading. Brian Curless CSE 557 Autumn 2017

CS201 Computer Vision Lect 4 - Image Formation

Lecture 24: More on Reflectance CAP 5415

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

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

Raytracing CS148 AS3. Due :59pm PDT

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

The Rendering Equation. Computer Graphics CMU /15-662

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

Lecture 15: Shading-I. CITS3003 Graphics & Animation

Shading I Computer Graphics I, Fall 2008

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

3D Motion Analysis Based on 2D Point Displacements

Shading. Reading. Pinhole camera. Basic 3D graphics. Brian Curless CSE 557 Fall Required: Shirley, Chapter 10

CENG 477 Introduction to Computer Graphics. Ray Tracing: Shading

Illumination. Illumination CMSC 435/634

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

And if that 120MP Camera was cool

w Foley, Section16.1 Reading

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

Topics and things to know about them:

Module 5: Video Modeling Lecture 28: Illumination model. The Lecture Contains: Diffuse and Specular Reflection. Objectives_template

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

Lighting and Shading

CMSC427 Shading Intro. Credit: slides from Dr. Zwicker

Lighting affects appearance

Light. Properties of light. What is light? Today What is light? How do we measure it? How does light propagate? How does light interact with matter?

General Principles of 3D Image Analysis

Lighting. Figure 10.1

Ray Tracing COMP575/COMP770

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

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

Radiometry and reflectance

Shading 1: basics Christian Miller CS Fall 2011

Paths, diffuse interreflections, caching and radiometry. D.A. Forsyth

Image Processing 1 (IP1) Bildverarbeitung 1

Illumination & Shading

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

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

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

Introduction to Computer Vision. Week 8, Fall 2010 Instructor: Prof. Ko Nishino

Interactive Real-Time Raycasting

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

Path Tracing part 2. Steve Rotenberg CSE168: Rendering Algorithms UCSD, Spring 2017

Announcements. Written Assignment 2 out (due March 8) Computer Graphics

Spring 2012 Final. CS184 - Foundations of Computer Graphics. University of California at Berkeley

The Rasterization Pipeline

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

Shading / Light. Thanks to Srinivas Narasimhan, Langer-Zucker, Henrik Wann Jensen, Ravi Ramamoorthi, Hanrahan, Preetham

Illumination and Shading

Midterm Exam CS 184: Foundations of Computer Graphics page 1 of 11

Comp 410/510 Computer Graphics. Spring Shading

Passive 3D Photography

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

Distributed Ray Tracing

I have a meeting with Peter Lee and Bob Cosgrove on Wednesday to discuss the future of the cluster. Computer Graphics

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

CS5620 Intro to Computer Graphics

Multiple View Geometry

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

Virtual Reality for Human Computer Interaction

Graphics for VEs. Ruth Aylett

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

Global Illumination. Why Global Illumination. Pros/Cons and Applications. What s Global Illumination

Photometric stereo , , Computational Photography Fall 2018, Lecture 17

Visual cues to 3D geometry. Light Reflection and Advanced Shading. Shading. Recognizing materials. size (perspective) occlusion shading

Raytracing. COSC 4328/5327 Scott A. King

Soft shadows. Steve Marschner Cornell University CS 569 Spring 2008, 21 February

13 Distribution Ray Tracing

L2 Data Acquisition. Mechanical measurement (CMM) Structured light Range images Shape from shading Other methods

Global Illumination. COMP 575/770 Spring 2013

A Little Background. Motivation. Motivation

Reading. Shading. An abundance of photons. Introduction. Required: Angel , 6.5, Optional: Angel 6.4 OpenGL red book, chapter 5.

DD2423 Image Analysis and Computer Vision IMAGE FORMATION. Computational Vision and Active Perception School of Computer Science and Communication

Transcription:

Photometric stereo

Radiance Pixels measure radiance This pixel Measures radiance along this ray

Where do the rays come from? Rays from the light source reflect off a surface and reach camera Reflection: Surface absorbs light energy and radiates it back

Light rays interacting with a surface Light of radiance! " comes from light source at an incoming direction # " It sends out a ray of radiance! $ in the outgoing direction # $ How does! $ relate to! "? # " # $ N is surface normal L is direction of light, making # " with normal V is viewing direction, making # $ with normal

Light rays interacting with a surface! "! # N is surface normal L is direction of light, making! " with normal V is viewing direction, making! # with normal Output radiance along V $ # = &! ",! # $ " cos! " Incoming irradiance along L Bi-directional reflectance function (BRDF)

Light rays interacting with a surface " # " % ( % =! " #, " % ( # cos " # Special case 1: Perfect mirror! " #, " % = 0 unless " # = " % Special case 2: Matte surface! " #, " % =! ' (constant)

Special case 1: Perfect mirror! " #, " % = 0 unless " # = " % Also called Specular surfaces Reflects light in a single, particular direction

Special case 2: Matte surface! " #, " % =! & Also called Lambertian surfaces Reflected light is independent of viewing direction

Lambertian surfaces For a lambertian surface: L r = L i cos i ) L r = L i L N " # " $! is called albedo Think of this as paint High albedo: white colored surface Low albedo: black surface Varies from point to point

Lambertian surfaces Assume the light is directional: all rays from light source are parallel Equivalent to a light source infinitely far away All pixels get light from the same direction L and of the same intensity L i! "! #

Lambertian surfaces Intrinsic Image Decomposition I(x, y) = (x, y)l i L N(x, y) Reflectance image Shading image

Reconstructing Lambertian surfaces I(x, y) = (x, y)l i L N(x, y) Equation is a constraint on albedo and normals Can we solve for albedo and normals?

Solution 1: Recovery from a single image Step 1: Intrinsic image decomposition Reflectance image! ", $ Shading image Li L N(x, y) Decomposition relies on priors on reflectance image What kind of priors? Reflectance image captures the paint on an object surface Surfaces tend to be of uniform color with sharp edges when color changes Images from Barron et al, TPAMI 13

Solution 1: Recovery from a single image Step 2: Decompose shading image into illumination and normals L i L N(x, y) Called Shape-From-Shading Relies on priors on shape: shapes are smooth Far Near

Image credit: Wikipedia Solution 2: Recovery from multiple images I(x, y) = (x, y)l i L N(x, y) Represents an equation in the albedo and normals Multiple images give constraints on albedo and normals Called Photometric Stereo

Multiple Images: Photometric Stereo N L 1 L 3 L 2 V

Photometric stereo - the math I(x, y) = (x, y)l i L N(x, y) Consider single pixel Assume! " = 1 Write G = N G is a 3-vector Norm of G = ' Direction of G = N I = L N I = N T L

Photometric stereo - the math Consider single pixel Assume! " = 1 Write I = N T L G = N G is a 3-vector Norm of G = ' Direction of G = N I = G T L = L T G

Photometric stereo - the math I = L T G Multiple images with different light sources but same viewing direction? I 1 = L T 1 G I 2 = L T 2 G. I k = L T k G

Photometric stereo - the math I 1 = L T 1 G I 2 = L T 2 G Assume lighting directions are known Each is a linear equation in G. I k = L T k G Stack everything up into a massive linear system of equations!

Photometric stereo - the math I 1 = L T 1 G I 2 = L T 2 G. I k = L T k G I = L T G k x 1 vector of intensities k x 3 matrix of lighting directions 3x1 vector of unknowns

Photometric stereo - the math I = L T G k x 1 k x 3 3 x 1 G = L T I What is the minimum value of k to allow recovery of G? How do we recover G if the problem is overconstrained?

Photometric stereo - the math How do we recover G if the problem is overconstrained? More than 3 lights: more than 3 images Least squares min G ki LT Gk 2 Solved using normal equations G =(LL T ) 1 LI

Normal equations ki L T Gk 2 = I T I + G T LL T G 2G T LI Take derivative with respect to G and set to 0 2LL T G 2LI =0 ) G =(LL T ) 1 LI

Estimating normals and albedo from G Recall that G = N kgk = G kgk = N

Multiple pixels We ve looked at a single pixel till now How do we handle multiple pixels? Essentially independent equations!

Multiple pixels: matrix form Note that all pixels share the same set of lights I (1) = L T G (1) I (2) = L T G (2)... I (n) = L T G (n)

Multiple pixels: matrix form Can stack these into columns of a matrix I (1) = L T G (1) I (2) = L T G (2). I (n) = L T G (n) I (1) I (2) I (n) = L T G (1) G (2) G (n) I = L T G

Multiple pixels: matrix form I = L T G #pixels 3 #pixels #lights 3 G I = L T #lights

Estimating depth from normals So we got surface normals, can we get depth? Yes, given boundary conditions Normals provide information about the derivative

Brief detour: Orthographic projection Perspective projection! = # $, & = ' $ If all points have similar depth ( ( *! # $ +, & ' $ +!,-, &,. A scaled version of orthographic projection! = -, & =. Perspective Scaled orthographic

Depth Map from Normal Map We now have a surface normal, but how do we get depth? (cx, c(y + 1),Z x,y+1 ) Assume a smooth surface (cx, cy, Z x,y ) V 2 N V 1 V 1 =(c(x + 1),cy,Z x+1,y ) (cx, cy, Z x,y ) =(c, 0,Z x+1,y Z x,y ) (c(x + 1),cy,Z x+1,y ) 0=N V 1 =(n x,n y,n z ) (c, 0,Z x+1,y Z x,y ) = cn x + n z (Z x+1,y Z x,y ) Get a similar equation for V 2 Each normal gives us two linear constraints on z compute z values by solving a matrix equation 32

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

Determining Light Directions For a perfect mirror, the light is reflected across N: 34

Determining Light Directions L N R = " $ " = $ " $ " = $ " $ " So the light source direction is given by: = - 2 = $ 2 $ " $ " = 2 " $ " $ 35

Determining Light Directions Assume orthographic projection Viewing direction R = [0,0,-1] Normal? ( # and ( ' are unknown, but: (" #, % #, ( # ) (" ', % ', ( ' ) (" #, % # ) (" ', % ' ) " # " ' * + % # % ' * + ( # ( ' * = - * ( # ( ' can be computed " # " ', % # % ', ( # ( ' is the normal Z=1

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

Results from Athos Georghiades 38

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

Questions?