1 of 68

What food are you craving?

Start presenting to display the poll results on this slide.

2 of 68

Reflectance & Photometric stereo

CS5670 : Computer Vision

3 of 68

Reading

  • Szeliski 2nd Edition: Chapter 2.2 & 13.1

4 of 68

Announcements

  • Project 4 (Stereo) released today due Friday, March 31, at 8pm
    • To be done in groups of 2

5 of 68

Roadmap for the rest of the course

  • The next three lectures will finish up geometry and image formation
    • Next up (after Spring Break): deep learning, image recognition, neural radiance fields, image generation models
  • Coming up
    • Reflectance and Photometric Stereo (today)
    • Two-view geometry
    • Multi-view geometry

6 of 68

Can we determine shape from lighting?

  • Are these spheres?
    • Or just flat discs painted with varying albedo?

7 of 68

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:
      • Constant albedo
      • A few known normals (e.g. silhouettes)
      • Smoothness of normals

In practice, SFS doesnt work very well:

assumptions are too restrictive,

too much ambiguity in nontrivial scenes.

8 of 68

Reflectance

9 of 68

Light sources

  • Basic types
    • point source
    • directional source
      • a point source that is infinitely far away
    • area source
      • a union of point sources

  • What happens when light hits an object?

10 of 68

Modeling Image Formation

We need to reason about:

    • How light interacts with the scene
    • How a pixel value is related to light energy in the world

Track a “ray” of light all the way from light source to the sensor

11 of 68

Directional Lighting

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

12 of 68

Lambertian Reflectance

Image intensity

Surface normal

Light direction

Image intensity

cos(angle between N and L)

13 of 68

Materials - Three Forms

© Kavita Bala, Computer Science, Cornell University

Ideal diffuse (Lambertian)

Ideal

specular

Directional

diffuse

14 of 68

Reflectance—Three Forms

© Kavita Bala, Computer Science, Cornell University

Ideal diffuse (Lambertian)

Directional

diffuse

Ideal

specular

15 of 68

Ideal Diffuse Reflection

  • Characteristic of multiple scattering materials
  • An idealization but reasonable for matte surfaces

© Kavita Bala, Computer Science, Cornell University

16 of 68

Lambertian Reflectance

  1. Reflected energy is proportional to cosine of angle between L and N (incoming)

  • Measured intensity is viewpoint-independent (outgoing)

17 of 68

Lambertian Reflectance: Incoming

  • Reflected energy is proportional to cosine of angle between L and N

18 of 68

Lambertian Reflectance: Incoming

  • Reflected energy is proportional to cosine of angle between L and N

19 of 68

Lambertian Reflectance: Incoming

  • Reflected energy is proportional to cosine of angle between L and N

Light hitting surface is proportional to the cosine

20 of 68

Lambertian Reflectance: Outgoing

  • Radiance (what the eye sees) is viewpoint-independent

Lambertian distribution

21 of 68

Lambertian Reflectance: Outgoing

  • Radiance (what the eye sees) is viewpoint-independent

Lambertian distribution

22 of 68

Lambertian Reflectance: Outgoing

  • Radiance (what the eye sees) is viewpoint-independent

Lambertian distribution

23 of 68

Lambertian Reflectance: Outgoing

  • Radiance (what the eye sees) is viewpoint-independent

Radiance

(what eye sees)

A cos (θ)

Lambertian distribution

24 of 68

Lambertian appearance is view-independent

Lambert's cosine law:

  • Number of photons reflected to a given angle θ is proportional to cos(θ)

25 of 68

Lambertian appearance is view-independent

  • But appearance is the same from every angle due to larger pixel footprint at larger angles

Lambert's cosine law:

  • Number of photons reflected to a given angle θ is proportional to cos(θ)

26 of 68

Lambertian appearance is view-independent

  • But appearance is the same from every angle due to larger pixel footprint at larger angles

Lambert's cosine law:

  • Number of photons reflected to a given angle θ is proportional to cos(θ)

27 of 68

Lambertian Surfaces: Appearance vs Reflected Photons

  • Appearance is the same from every angle
  • Radiant Intensity? (how many photons reflected per angle)

28 of 68

Lambertian Surfaces: Appearance vs Reflected Photons

  • Appearance is the same from every angle
  • Radiant Intensity? (how many photons reflected per angle)

29 of 68

Lambertian Surfaces: Appearance vs Reflected Photons

  • Appearance is the same from every angle
  • Radiant Intensity? (how many photons reflected per angle)

30 of 68

Lambertian appearance is view-independent

  • But appearance is the same from every angle due to larger pixel footprint at larger angles

Lambert's cosine law:

  • Number of photons reflected to a given angle θ is proportional to cos(θ)

Radiance

(what eye sees)

31 of 68

Final Lambertian image formation model

  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)

32 of 68

Albedo

Objects can have varying albedo and albedo varies with wavelength

33 of 68

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:
      • Constant albedo
      • A few known normals (e.g., silhouettes)
      • Smoothness of normals

In practice, SFS doesn’t work well (yet):

assumptions are too restrictive,

too much ambiguity in nontrivial scenes.

34 of 68

A Single Image: Shape from shading

Suppose (for now)

You can directly measure angle between normal and light source

    • Not quite enough information to compute surface shape
    • But can be if you add some additional info, for example
      • assume a few of the normals are known (e.g., along silhouette)
      • constraints on neighboring normals—“integrability”
      • smoothness
    • Hard to get it to work well in practice
      • plus, how many real objects have constant albedo?
      • But, deep learning can help

35 of 68

36 of 68

Application: Detecting composite photos

Fake photo

Real photo

37 of 68

A Single Image: Shape from shading

Suppose (for now)

You can directly measure angle between normal and light source

    • Not quite enough information to compute surface shape
    • But can be if you add some additional info, for example
      • assume a few of the normals are known (e.g., along silhouette)
      • constraints on neighboring normals—“integrability”
      • smoothness
    • Hard to get it to work well in practice
      • plus, how many real objects have constant albedo?
      • But, deep learning can help

38 of 68

Diffuse reflection

Demo

39 of 68

Let’s take more than one photo!

40 of 68

Photometric stereo

N

L1

L2

V

L3

Can write this as a matrix equation:

41 of 68

Solving the equations

Solve one such linear system per pixel to solve for that pixel’s surface normal

42 of 68

More than three lights

Can get better results by using more than 3 lights

What’s the size of LTL?

Least squares solution:

Solve for N, kd as before

43 of 68

Computing light source directions

Trick: place a chrome sphere in the scene

    • the location of the highlight tells you where the light source is

44 of 68

Recall the rule for specular reflection

For a perfect mirror, light is reflected about N

We see a highlight when V = R

    • then L is given as follows:

45 of 68

Example

Recovered albedo

Recovered normal field

Forsyth & Ponce, Sec. 5.4

Input views

46 of 68

Depth from normals

  • Solving the linear system per-pixel gives us an estimated surface normal for each pixel

  • How can we compute depth from normals?
    • Normals are like the “derivative” of the true depth

Input photo

Estimated normals

Estimated normals (needle diagram)

47 of 68

Normal Integration

  • Integrating a set of derivatives is easy in 1D
    • (similar to Euler’s method from diff. eq. class)

  • Could integrate normals in each column / row separately
    • Wouldn’t give a good surface
  • Instead, we formulate as a linear system and solve for depths that best agree with the surface normals

48 of 68

Depth from normals

Get a similar equation for V2

    • Each normal gives us two linear constraints on z
    • compute z values by solving a matrix equation

V1

V2

N

49 of 68

Results

from Athos Georghiades

50 of 68

Results

51 of 68

Extension

  • Photometric Stereo from Colored Lighting

Video Normals from Colored Lights

Gabriel J. Brostow, Carlos Hernández, George Vogiatzis, Björn Stenger, Roberto Cipolla

IEEE TPAMI, Vol. 33, No. 10, pages 2104-2114, October 2011.

52 of 68

Questions?

53 of 68

For now, ignore specular reflection

Slides from Photometric Methods for 3D Modeling, Matsushita, Wilburn, Ben-Ezra

54 of 68

And Refraction…

Slides from Photometric Methods for 3D Modeling, Matsushita, Wilburn, Ben-Ezra

55 of 68

And Interreflections…

Slides from Photometric Methods for 3D Modeling, Matsushita, Wilburn, Ben-Ezra

56 of 68

And Subsurface Scattering…

Slides from Photometric Methods for 3D Modeling, Matsushita, Wilburn, Ben-Ezra

57 of 68

Limitations

Bigger problems

    • doesn’t work for shiny things, semi-translucent things
    • shadows, inter-reflections

Smaller problems

    • camera and lights have to be distant
    • calibration requirements
      • measure light source directions, intensities
      • camera response function

Newer work addresses some of these issues

Some pointers for further reading:

58 of 68

Johnson and Adelson, 2009

59 of 68

Johnson and Adelson, 2009

60 of 68

61 of 68

62 of 68

63 of 68

64 of 68

65 of 68

66 of 68

67 of 68

68 of 68

Questions?