Shape from Shading Course web page: vision.cis.udel.edu/cv February 26, 2003  Lecture 6.

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
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)
Advanced Computer Graphics
Foundations of Computer Graphics (Spring 2012) CS 184, Lecture 21: Radiometry Many slides courtesy Pat Hanrahan.
Basic Principles of Surface Reflectance
Review Pinhole projection model What are vanishing points and vanishing lines? What is orthographic projection? How can we approximate orthographic projection?
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.
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.
1 CSCE 641: Computer Graphics Lighting Jinxiang Chai.
Introduction to Computer Vision CS / ECE 181B Tues, May 18, 2004 Ack: Matthew Turk (slides)
Basic Principles of Surface Reflectance
Computer Vision Sources, shading and photometric stereo Marc Pollefeys COMP 256.
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.
Basic Principles of Surface Reflectance Lecture #3 Thanks to Shree Nayar, Ravi Ramamoorthi, Pat Hanrahan.
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 Graphics (Spring 2008) COMS 4160, Lecture 22: Global Illumination
1 Angel: Interactive Computer Graphics 4E © Addison-Wesley 2005 Shading I Ed Angel Professor of Computer Science, Electrical and Computer Engineering,
Stockman MSU/CSE Math models 3D to 2D Affine transformations in 3D; Projections 3D to 2D; Derivation of camera matrix form.
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.
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.
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
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.
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
EECS 274 Computer Vision Sources, Shadows, and Shading.
Radiometry and Photometric Stereo 1. Estimate the 3D shape from shading information Can you tell the shape of an object from these photos ? 2.
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.
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.
1 Chapter 5: Sources, Shadows, Shading Light source: Anything emits light that is internally generated Exitance: The internally generated power per unit.
Color and Brightness Constancy Jim Rehg CS 4495/7495 Computer Vision Lecture 25 & 26 Wed Oct 18, 2002.
Announcements Final Exam Friday, May 16 th 8am Review Session here, Thursday 11am.
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.
Announcements Final is Thursday, March 18, 10:30-12:20 –MGH 287 Sample final out today.
1 CSCE 441: Computer Graphics Lighting Jinxiang Chai.
CS552: Computer Graphics Lecture 33: Illumination and Shading.
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.
Announcements Project 3a due today Project 3b due next Friday.
MAN-522 Computer Vision Spring
© University of Wisconsin, CS559 Spring 2004
Merle Norman Cosmetics, Los Angeles
Capturing light Source: A. Efros.
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
Physical Problem of Simultaneous Linear Equations in Image Processing
Presentation transcript:

Shape from Shading Course web page: vision.cis.udel.edu/cv February 26, 2003  Lecture 6

Announcements Changed HW1 page to a PDF file to eliminate font problems (let me know if hyperlinks don’t work) Read about color in Forsyth & Ponce, Chapter 6-6.1, 6.3, 6.5 for Friday

Outline Light sources –Exitance –Point sources Photometric stereo –Shape from point sources at infinity Complications—e.g., interreflections More kinds of light sources

Light Source Exitance Just like radiosity, but generated internally –Foreshortening because off-normal viewing angles make patch look smaller

Point Light Source Model as tiny (radius ² ) light-emitting sphere with constant exitance Good approximation when light is small relative to distance to viewer (e.g., light bulb, the sun) Solid angle: Recall that d! = (dA cos®)/r 2 –For sphere, patch area is of circle and normal is always aligned with viewing direction, so d! = ¼² 2 /r 2 Radiosity scales as 1/r 2

Illumination by a Point Source at Infinity Consider a distant Lambertian object (so orthographic projection is reasonable) in camera coordinates Image brightness at a pixel (based on reflectance equation): I(x, y) = k ½(x, y) s ¢ n(x, y) where k includes the BRDF (with albedo factored out), the light’s exitance, and a photometric factor, and s is the direction of the light Let n(x, y) be normal at I(x, y) (these are all column vectors)

Normal Information from a Point Source at Infinity Suppose k and s are known, and let g(x, y) = ½(x, y) n(x, y) and v = k s, so we can write: I(x, y) = v ¢ g(x, y) Not enough information! –Image brightness constrains the polar angle of the normal at each point on the object surface, but not the azimuth—i.e., we only know that the solution is on a circle –We do know that where I(x, y) is maximal over the entire object, n(x, y) = s. This is where the highlight is on a specular object Additional sources of information –More lights (one per image—in the same image their effects sum like a single “virtual” light) –Assume normal vector varies smoothly over object

Solving for the Normals with Multiple Point Sources Need 3 circles for unique intersection point ! need 3 light sources to solve for g(x, y) Formally, we must solve a linear system at each point, which we can write as: In Matlab, solve using B = V\g Albedo is just the length of g(x, y), and n(x, y) is the result of normalizing it V B

Photometric Stereo: Example From Forsyth & Ponce Input images Recovered albedo Recovered normals

Normals from Multiple Point Sources at Infinity: Considerations Shadows –When surface patch at (x, y) is occluded, I(x, y) = 0 and the image brightness equation will be invalid there ! Zero out that row of V Intuition about error –More lights help... (least-squares solution) So that no point is illuminated by < 3 lights To reduce effects of noise –Geometry of lights matters (close together is bad)

Shape from Normals: Getting the Gradient Shape typically means depth—the z values. With these we can make a height map like Matlab’s mesh Suppose z = f(x, y) and n = (n 1, n 2, n 3 ) T. By definition, the gradient is: In these terms, n = (p, q, 1) T, so we can compute p = n 1 /n 3 and q = n 2 /n 3.

Shape from Gradient We can integrate partial derivatives along a path to get the function value at the end of the path Simple path: Starting at image origin (0, 0), follow row to x coordinate, then column to y coordinate for each point

Photometric Stereo Example: Recovered Height Map From Forsyth & Ponce

Shape Computation: Complications Usefulness of photometric stereo for specular objects inversely proportional to magnitude of diffuse component of BRDF –For mirror objects, mitigating cue is distorted reflection of environment (analogous to camera calibration) Interreflections –Light from other objects = light sources we don’t know about –Ambient illumination approximation can help—add constant to radiosity everywhere (results in extra term in photometric stereo) courtesy of P. Debevec

More Light Source Types Spotlight –Point source constrained to a small solid angle Line –For long lines, radiosity scales as 1/r Area (e.g., overcast sky) –For big areas, radiosity is uniform for nearby viewers. –Shape from shading more difficult—in the worst case, the cosine term disappears and there is no shape information at all