Computer Vision Sources, shading and photometric stereo Marc Pollefeys COMP 256.

Slides:



Advertisements
Similar presentations
Computer Vision Radiometry. Bahadir K. Gunturk2 Radiometry Radiometry is the part of image formation concerned with the relation among the amounts of.
Advertisements

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?
Computer Vision CS 776 Spring 2014 Photometric Stereo and Illumination Cones Prof. Alex Berg (Slide credits to many folks on individual slides)
Virtual Realism LIGHTING AND SHADING. Lighting & Shading Approximate physical reality Ray tracing: Follow light rays through a scene Accurate, but expensive.
Foundations of Computer Graphics (Spring 2012) CS 184, Lecture 21: Radiometry Many slides courtesy Pat Hanrahan.
Photo-realistic Rendering and Global Illumination in Computer Graphics Spring 2012 Material Representation K. H. Ko School of Mechatronics Gwangju Institute.
Advanced Computer Graphics (Spring 2013) CS 283, Lecture 8: Illumination and Reflection Many slides courtesy.
Computer Vision - A Modern Approach Set: Radiometry Slides by D.A. Forsyth Radiometry Questions: –how “bright” will surfaces be? –what is “brightness”?
Shape-from-X Class 11 Some slides from Shree Nayar. others.
Lecture 23: Photometric Stereo CS4670/5760: Computer Vision Kavita Bala Scott Wehrwein.
AA II z f Surface Radiance and Image Irradiance Same solid angle Pinhole Camera Model.
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.
Stefano Soatto (c) UCLA Vision Lab 1 Homogeneous representation Points Vectors Transformation representation.
Computer Graphics (Fall 2008) COMS 4160, Lecture 19: Illumination and Shading 2
Introduction to Computer Vision CS / ECE 181B Tues, May 18, 2004 Ack: Matthew Turk (slides)
Lecture 32: Photometric stereo, Part 2 CS4670: Computer Vision Noah Snavely.
Image formation 2. Blur circle A point at distance is imaged at point from the lens and so Points a t distance are brought into focus at distance Thus.
Computer Graphics (Fall 2004) COMS 4160, Lecture 16: Illumination and Shading 2 Lecture includes number of slides from.
CSCE 641 Computer Graphics: Radiosity Jinxiang Chai.
1 Dr. Scott Schaefer Radiosity. 2/38 Radiosity 3/38 Radiosity Physically based model for light interaction View independent lighting Accounts for indirect.
Photometric Stereo Merle Norman Cosmetics, Los Angeles Readings R. Woodham, Photometric Method for Determining Surface Orientation from Multiple Images.
Photometric Stereo & Shape from Shading
Course Website: Computer Graphics 16: Illumination.
Lighting affects appearance. Light Source emits photons Photons travel in a straight line When they hit an object they: bounce off in a new direction.
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
EECS 274 Computer Vision Light and Shading. Radiometry – measuring light Relationship between light source, surface geometry, surface properties, and.
Reflectance Map: Photometric Stereo and Shape from Shading
Light in a Newtonian view Chapter 16. Introducing: light Light is the most important source of information for humans Concept of light rays - there are.
Computer Vision - A Modern Approach Set: Sources, shadows and shading Slides by D.A. Forsyth Sources and shading How bright (or what colour) are objects?
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.
Capturing light Source: A. Efros.
Sources, Shadows, and Shading
EECS 274 Computer Vision Sources, Shadows, and Shading.
Steve Sterley. Real World Lighting Physical objects tend to interact with light in three ways: Absorption (black body) Reflection (mirror) Transmission.
Radiometry and Photometric Stereo 1. Estimate the 3D shape from shading information Can you tell the shape of an object from these photos ? 2.
Announcements Office hours today 2:30-3:30 Graded midterms will be returned at the end of the class.
Computer Graphics: Programming, Problem Solving, and Visual Communication Steve Cunningham California State University Stanislaus and Grinnell College.
Illumination and 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.
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.
Tal Amir Advanced Topics in Computer Vision May 29 th, 2015 COUPLED MOTION- LIGHTING ANALYSIS.
01/27/03© 2002 University of Wisconsin Last Time Radiometry A lot of confusion about Irradiance and BRDFs –Clarrified (I hope) today Radiance.
CS552: Computer Graphics Lecture 33: Illumination and Shading.
EECS 274 Computer Vision Sources, Shadows, and Shading.
Computer Graphics: Illumination
Announcements Project 3a due today Project 3b due next Friday.
Illumination and Shading. Illumination (Lighting) Model the interaction of light with surface points to determine their final color and brightness OpenGL.
MAN-522 Computer Vision Spring
Radiometry (Chapter 4).
© 2002 University of Wisconsin
Merle Norman Cosmetics, Los Angeles
Capturing light Source: A. Efros.
Radiosity Dr. Scott Schaefer.
CSCE 441 Computer Graphics: Radiosity
Announcements Project 3b due Friday.
Part One: Acquisition of 3-D Data 2019/1/2 3DVIP-01.
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.
Shape from Shading and Texture
Presentation transcript:

Computer Vision Sources, shading and photometric stereo Marc Pollefeys COMP 256

Computer Vision 2 Last class

Computer Vision 3 Last class

Computer Vision 4 Last class

Computer Vision 5 Announcement Assignment 2 (Photometric Stereo) is posted on course webpage: reconstruct 3D model of face from images under varying illumination (data from Peter Belhumeur’s face database)

Computer Vision 6 Sources and shading How bright (or what colour) are objects? One more definition: Exitance of a source is –the internally generated power radiated per unit area on the radiating surface similar to radiosity: a source can have both –radiosity, because it reflects –exitance, because it emits General idea: But what aspects of the incoming radiance will we model?

Computer Vision 7 Radiosity due to a point sources small, distant sphere radius and exitance E, which is far away subtends solid angle of about

Computer Vision 8 Radiosity due to a point source Radiosity is

Computer Vision 9 Standard nearby point source model N is the surface normal rho is diffuse albedo S is source vector - a vector from x to the source, whose length is the intensity term –works because a dot-product is basically a cosine N S

Computer Vision 10 Standard distant point source model Issue: nearby point source gets bigger if one gets closer –the sun doesn’t for any reasonable binding of closer Assume that all points in the model are close to each other with respect to the distance to the source. Then the source vector doesn’t vary much, and the distance doesn’t vary much either, and we can roll the constants together to get: N S

Computer Vision 11 Shadows cast by a point source A point that can’t see the source is in shadow For point sources, the geometry is simple

Computer Vision 12 Line sources radiosity due to line source varies with inverse distance, if the source is long enough

Computer Vision 13 Area sources Examples: diffuser boxes, white walls. The radiosity at a point due to an area source is obtained by adding up the contribution over the section of view hemisphere subtended by the source –change variables and add up over the source

Computer Vision 14 Radiosity due to an area source rho is albedo E is exitance r(x, u) is distance between points u is a coordinate on the source

Computer Vision 15 Area Source Shadows

Computer Vision 16 Shading models Local shading model –Surface has radiosity due only to sources visible at each point –Advantages: often easy to manipulate, expressions easy supports quite simple theories of how shape information can be extracted from shading Global shading model –surface radiosity is due to radiance reflected from other surfaces as well as from surfaces –Advantages: usually very accurate –Disadvantage: extremely difficult to infer anything from shading values

Computer Vision 17 Photometric stereo Assume: –a local shading model –a set of point sources that are infinitely distant –a set of pictures of an object, obtained in exactly the same camera/object configuration but using different sources –A Lambertian object (or the specular component has been identified and removed)

Computer Vision 18 Projection model for surface recovery - usually called a Monge patch

Computer Vision 19 Reflectance map (lambertian surface; point light source) Horn, 1986 isophote

Computer Vision 20 Photometric stereo - concept Horn, 1986

Computer Vision 21 Image model For each point source, we know the source vector (by assumption). We assume we know the scaling constant of the linear camera. Fold the normal and the reflectance into one vector g, and the scaling constant and source vector into another Vj Out of shadow: In shadow:

Computer Vision 22 Dealing with shadows Known Unknown

Computer Vision 23 Recovering normal and reflectance Given sufficient sources, we can solve the previous equation (most likely need a least squares solution) for g(x, y) Recall that N(x, y) is the unit normal This means that x,y) is the magnitude of g(x, y) This yields a check –If the magnitude of g(x, y) is greater than 1, there’s a problem And N(x, y) = g(x, y) / x,y)

Computer Vision 24 Example figures

Computer Vision 25 Recovered reflectance

Computer Vision 26 Recovered normal field

Computer Vision 27 Recovering a surface from normals - 1 Recall the surface is written as This means the normal has the form: If we write the known vector g as Then we obtain values for the partial derivatives of the surface:

Computer Vision 28 Recovering a surface from normals - 2 Recall that mixed second partials are equal --- this gives us a check. We must have: (or they should be similar, at least) We can now recover the surface height at any point by integration along some path, e.g. Esher

Computer Vision 29 Surface recovered by integration

Computer Vision 30 Photometric stereo example data from:

Computer Vision 31 Alternative approach Reference object with same, but arbitrary, BRDF Use LUT to get from RGB 1 RGB 2 … vector to normal Hertzman and Seitz CVPR’03

Computer Vision 32 Curious Experimental Fact Prepare two rooms, one with white walls and white objects, one with black walls and black objects Illuminate the black room with bright light, the white room with dim light People can tell which is which (due to Gilchrist) Why? (a local shading model predicts they can’t).

Computer Vision 33 Black and white rooms Figure from “Mutual Illumination,” by D.A. Forsyth and A.P. Zisserman, Proc. CVPR, 1989, copyright 1989 IEEE

Computer Vision 34 Figure from “Mutual Illumination,” by D.A. Forsyth and A.P. Zisserman, Proc. CVPR, 1989, copyright 1989 IEEE A view of a white room, under dim light. Below, we see a cross-section of the image intensity corresponding to the line drawn on the image.

Computer Vision 35 Figure from “Mutual Illumination,” by D.A. Forsyth and A.P. Zisserman, Proc. CVPR, 1989, copyright 1989 IEEE A view of a black room, under bright light. Below, we see a cross-section of the image intensity corresponding to the line drawn on the image.

Computer Vision 36 What’s going on here? local shading model is a poor description of physical processes that give rise to images –because surfaces reflect light onto one another This is a major nuisance; the distribution of light (in principle) depends on the configuration of every radiator; big distant ones are as important as small nearby ones (solid angle) The effects are easy to model It appears to be hard to extract information from these models

Computer Vision 37 Interreflections - a global shading model Other surfaces are now area sources - this yields: Vis(x, u) is 1 if they can see each other, 0 if they can’t

Computer Vision 38 What do we do about this? Attempt to build approximations –Ambient illumination Study qualitative effects –reflexes –decreased dynamic range –smoothing Try to use other information to control errors

Computer Vision 39 Ambient Illumination Two forms –Add a constant to the radiosity at every point in the scene to account for brighter shadows than predicted by point source model Advantages: simple, easily managed (e.g. how would you change photometric stereo?) Disadvantages: poor approximation (compare black and white rooms –Add a term at each point that depends on the size of the clear viewing hemisphere at each point (see next slide) Advantages: appears to be quite a good approximation, but jury is out Disadvantages: difficult to work with

Computer Vision 40 At a point inside a cube or room, the surface sees light in all directions, so add a large term. At a point on the base of a groove, the surface sees relatively little light, so add a smaller term.

Computer Vision 41 Reflexes A characteristic feature of interreflections is little bright patches in concave regions –Examples in following slides –Perhaps one should detect and reason about reflexes? –Known that artists reproduce reflexes, but often too big and in the wrong place

Computer Vision 42 Figure from “Mutual Illumination,” by D.A. Forsyth and A.P. Zisserman, Proc. CVPR, 1989, copyright 1989 IEEE At the top, geometry of a semi-circular bump on a plane; below, predicted radiosity solutions, scaled to lie on top of each other, for different albedos of the geometry. When albedo is close to zero, shading follows a local model; when it is close to one, there are substantial reflexes.

Computer Vision 43 Radiosity observed in an image of this geometry; note the reflexes, which are circled. Figure from “Mutual Illumination,” by D.A. Forsyth and A.P. Zisserman, Proc. CVPR, 1989, copyright 1989 IEEE

Computer Vision 44 Figure from “Mutual Illumination,” by D.A. Forsyth and A.P. Zisserman, Proc. CVPR, 1989, copyright 1989 IEEE At the top, geometry of a gutter with triangular cross-section; below, predicted radiosity solutions, scaled to lie on top of each other, for different albedos of the geometry. When albedo is close to zero, shading follows a local model; when it is close to one, there are substantial reflexes.

Computer Vision 45 Radiosity observed in an image of this geometry; above, for a black gutter and below for a white one Figure from “Mutual Illumination,” by D.A. Forsyth and A.P. Zisserman, Proc. CVPR, 1989, copyright 1989 IEEE

Computer Vision 46 Figure from “Mutual Illumination,” by D.A. Forsyth and A.P. Zisserman, Proc. CVPR, 1989, copyright 1989 IEEE At the top, geometry of a gutter with triangular cross- section; below, predicted radiosity solutions, scaled to lie on top of each other, for different albedos of the geometry. When albedo is close to zero, shading follows a local model; when it is close to one, there are substantial reflexes.

Computer Vision 47 Radiosity observed in an image of this geometry for a white gutter. Figure from “Mutual Illumination,” by D.A. Forsyth and A.P. Zisserman, Proc. CVPR, 1989, copyright 1989 IEEE

Computer Vision 48 Smoothing Interreflections smooth detail –E.g. you can’t see the pattern of a stained glass window by looking at the floor at the base of the window; at best, you’ll see coloured blobs. –This is because, as I move from point to point on a surface, the pattern that I see in my incoming hemisphere doesn’t change all that much –Implies that fast changes in the radiosity are local phenomena.

Computer Vision 49 Fix a small patch near a large radiator carrying a periodic radiosity signal; the radiosity on the surface is periodic, and its amplitude falls very fast with the frequency of the signal. The geometry is illustrated above. Below, we show a graph of amplitude as a function of spatial frequency, for different inclinations of the small patch. This means that if you observe a high frequency signal, it didn’t come from a distant source.

Computer Vision 50 Next class: Color F&P Chapter 6