80
Light transport matrices 15-463, 15-663, 15-862 Computational Photography Fall 2018, Lecture 18 http://graphics.cs.cmu.edu/courses/15-463

Light transport matrices - Carnegie Mellon Universitygraphics.cs.cmu.edu/courses/15-463/2018_fall/lectures/... · 2019. 4. 22. · • Woodham et al., “Photometric stereo: A reflectance

  • Upload
    others

  • View
    1

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Light transport matrices - Carnegie Mellon Universitygraphics.cs.cmu.edu/courses/15-463/2018_fall/lectures/... · 2019. 4. 22. · • Woodham et al., “Photometric stereo: A reflectance

Light transport matrices

15-463, 15-663, 15-862Computational Photography

Fall 2018, Lecture 18http://graphics.cs.cmu.edu/courses/15-463

Page 2: Light transport matrices - Carnegie Mellon Universitygraphics.cs.cmu.edu/courses/15-463/2018_fall/lectures/... · 2019. 4. 22. · • Woodham et al., “Photometric stereo: A reflectance

Course announcements

• Homework 5 has been posted.- Due on Friday November 9th.

• Any problems with homework 4?

• No elevator pitch presentations for final projects.

• Extra office hours this week:- Monday 1:30-3:30 pm.- Tuesday noon-2:00 pm.- Friday’s office hours will be held by Alankar.

• Great talk this Thursday: Eric Fossum, inventor of the CMOS sensor, will talk about quantum (i.e., photon-counting) CMOS sensors.

Page 3: Light transport matrices - Carnegie Mellon Universitygraphics.cs.cmu.edu/courses/15-463/2018_fall/lectures/... · 2019. 4. 22. · • Woodham et al., “Photometric stereo: A reflectance

Overview of today’s lecture

• Leftover from last time: Generalized bas-relief ambiguity.

• The light transport matrix.

• Image-based relighting.

• Photometric stereo revisited.

• Optical computing using the light transport matrix.

• Dual photography.

Page 4: Light transport matrices - Carnegie Mellon Universitygraphics.cs.cmu.edu/courses/15-463/2018_fall/lectures/... · 2019. 4. 22. · • Woodham et al., “Photometric stereo: A reflectance

Slide credits

These slides were directly adapted from:

• Matt O’Toole (CMU).

Page 5: Light transport matrices - Carnegie Mellon Universitygraphics.cs.cmu.edu/courses/15-463/2018_fall/lectures/... · 2019. 4. 22. · • Woodham et al., “Photometric stereo: A reflectance

The light transport matrix

Page 6: Light transport matrices - Carnegie Mellon Universitygraphics.cs.cmu.edu/courses/15-463/2018_fall/lectures/... · 2019. 4. 22. · • Woodham et al., “Photometric stereo: A reflectance

How do these three images relate to each other?

Page 7: Light transport matrices - Carnegie Mellon Universitygraphics.cs.cmu.edu/courses/15-463/2018_fall/lectures/... · 2019. 4. 22. · • Woodham et al., “Photometric stereo: A reflectance

How do these three images relate to each other?

Page 8: Light transport matrices - Carnegie Mellon Universitygraphics.cs.cmu.edu/courses/15-463/2018_fall/lectures/... · 2019. 4. 22. · • Woodham et al., “Photometric stereo: A reflectance
Page 9: Light transport matrices - Carnegie Mellon Universitygraphics.cs.cmu.edu/courses/15-463/2018_fall/lectures/... · 2019. 4. 22. · • Woodham et al., “Photometric stereo: A reflectance
Page 10: Light transport matrices - Carnegie Mellon Universitygraphics.cs.cmu.edu/courses/15-463/2018_fall/lectures/... · 2019. 4. 22. · • Woodham et al., “Photometric stereo: A reflectance

why is the error not exactly zero?

Page 11: Light transport matrices - Carnegie Mellon Universitygraphics.cs.cmu.edu/courses/15-463/2018_fall/lectures/... · 2019. 4. 22. · • Woodham et al., “Photometric stereo: A reflectance
Page 12: Light transport matrices - Carnegie Mellon Universitygraphics.cs.cmu.edu/courses/15-463/2018_fall/lectures/... · 2019. 4. 22. · • Woodham et al., “Photometric stereo: A reflectance
Page 13: Light transport matrices - Carnegie Mellon Universitygraphics.cs.cmu.edu/courses/15-463/2018_fall/lectures/... · 2019. 4. 22. · • Woodham et al., “Photometric stereo: A reflectance
Page 14: Light transport matrices - Carnegie Mellon Universitygraphics.cs.cmu.edu/courses/15-463/2018_fall/lectures/... · 2019. 4. 22. · • Woodham et al., “Photometric stereo: A reflectance
Page 15: Light transport matrices - Carnegie Mellon Universitygraphics.cs.cmu.edu/courses/15-463/2018_fall/lectures/... · 2019. 4. 22. · • Woodham et al., “Photometric stereo: A reflectance
Page 16: Light transport matrices - Carnegie Mellon Universitygraphics.cs.cmu.edu/courses/15-463/2018_fall/lectures/... · 2019. 4. 22. · • Woodham et al., “Photometric stereo: A reflectance
Page 17: Light transport matrices - Carnegie Mellon Universitygraphics.cs.cmu.edu/courses/15-463/2018_fall/lectures/... · 2019. 4. 22. · • Woodham et al., “Photometric stereo: A reflectance
Page 18: Light transport matrices - Carnegie Mellon Universitygraphics.cs.cmu.edu/courses/15-463/2018_fall/lectures/... · 2019. 4. 22. · • Woodham et al., “Photometric stereo: A reflectance
Page 19: Light transport matrices - Carnegie Mellon Universitygraphics.cs.cmu.edu/courses/15-463/2018_fall/lectures/... · 2019. 4. 22. · • Woodham et al., “Photometric stereo: A reflectance
Page 20: Light transport matrices - Carnegie Mellon Universitygraphics.cs.cmu.edu/courses/15-463/2018_fall/lectures/... · 2019. 4. 22. · • Woodham et al., “Photometric stereo: A reflectance
Page 21: Light transport matrices - Carnegie Mellon Universitygraphics.cs.cmu.edu/courses/15-463/2018_fall/lectures/... · 2019. 4. 22. · • Woodham et al., “Photometric stereo: A reflectance
Page 22: Light transport matrices - Carnegie Mellon Universitygraphics.cs.cmu.edu/courses/15-463/2018_fall/lectures/... · 2019. 4. 22. · • Woodham et al., “Photometric stereo: A reflectance
Page 23: Light transport matrices - Carnegie Mellon Universitygraphics.cs.cmu.edu/courses/15-463/2018_fall/lectures/... · 2019. 4. 22. · • Woodham et al., “Photometric stereo: A reflectance
Page 24: Light transport matrices - Carnegie Mellon Universitygraphics.cs.cmu.edu/courses/15-463/2018_fall/lectures/... · 2019. 4. 22. · • Woodham et al., “Photometric stereo: A reflectance

Can you think of a case where we have a very large m?

light transport matrix

Page 25: Light transport matrices - Carnegie Mellon Universitygraphics.cs.cmu.edu/courses/15-463/2018_fall/lectures/... · 2019. 4. 22. · • Woodham et al., “Photometric stereo: A reflectance

What does each row and column of T correspond to here?

Use a projector

Page 26: Light transport matrices - Carnegie Mellon Universitygraphics.cs.cmu.edu/courses/15-463/2018_fall/lectures/... · 2019. 4. 22. · • Woodham et al., “Photometric stereo: A reflectance

How would you go about measuring the light transport matrix?

Use a projector

Page 27: Light transport matrices - Carnegie Mellon Universitygraphics.cs.cmu.edu/courses/15-463/2018_fall/lectures/... · 2019. 4. 22. · • Woodham et al., “Photometric stereo: A reflectance

Image-based relighting

Page 28: Light transport matrices - Carnegie Mellon Universitygraphics.cs.cmu.edu/courses/15-463/2018_fall/lectures/... · 2019. 4. 22. · • Woodham et al., “Photometric stereo: A reflectance

Let’s say I have measured T. • What does it mean to right-multiply it with some vector l?

Page 29: Light transport matrices - Carnegie Mellon Universitygraphics.cs.cmu.edu/courses/15-463/2018_fall/lectures/... · 2019. 4. 22. · • Woodham et al., “Photometric stereo: A reflectance

Image-based relighting: Use the measurements I already have of the scene (the pictures I took when measuring T) to simulate new illuminations of the scene.

Page 30: Light transport matrices - Carnegie Mellon Universitygraphics.cs.cmu.edu/courses/15-463/2018_fall/lectures/... · 2019. 4. 22. · • Woodham et al., “Photometric stereo: A reflectance
Page 31: Light transport matrices - Carnegie Mellon Universitygraphics.cs.cmu.edu/courses/15-463/2018_fall/lectures/... · 2019. 4. 22. · • Woodham et al., “Photometric stereo: A reflectance

https://www.youtube.com/watch? v=mkzLLz1tXdsGreat demonstration: https://www.youtube.com/watch?v=mkzLLz1tXds

Page 32: Light transport matrices - Carnegie Mellon Universitygraphics.cs.cmu.edu/courses/15-463/2018_fall/lectures/... · 2019. 4. 22. · • Woodham et al., “Photometric stereo: A reflectance
Page 33: Light transport matrices - Carnegie Mellon Universitygraphics.cs.cmu.edu/courses/15-463/2018_fall/lectures/... · 2019. 4. 22. · • Woodham et al., “Photometric stereo: A reflectance

Photometric stereo revisited

Page 34: Light transport matrices - Carnegie Mellon Universitygraphics.cs.cmu.edu/courses/15-463/2018_fall/lectures/... · 2019. 4. 22. · • Woodham et al., “Photometric stereo: A reflectance
Page 35: Light transport matrices - Carnegie Mellon Universitygraphics.cs.cmu.edu/courses/15-463/2018_fall/lectures/... · 2019. 4. 22. · • Woodham et al., “Photometric stereo: A reflectance

What is this?

Page 36: Light transport matrices - Carnegie Mellon Universitygraphics.cs.cmu.edu/courses/15-463/2018_fall/lectures/... · 2019. 4. 22. · • Woodham et al., “Photometric stereo: A reflectance
Page 37: Light transport matrices - Carnegie Mellon Universitygraphics.cs.cmu.edu/courses/15-463/2018_fall/lectures/... · 2019. 4. 22. · • Woodham et al., “Photometric stereo: A reflectance
Page 38: Light transport matrices - Carnegie Mellon Universitygraphics.cs.cmu.edu/courses/15-463/2018_fall/lectures/... · 2019. 4. 22. · • Woodham et al., “Photometric stereo: A reflectance

https://www.youtube.com/watch? v=4GiLAOtjHNo

Page 39: Light transport matrices - Carnegie Mellon Universitygraphics.cs.cmu.edu/courses/15-463/2018_fall/lectures/... · 2019. 4. 22. · • Woodham et al., “Photometric stereo: A reflectance

Optical computing using the light transport matrix

Page 40: Light transport matrices - Carnegie Mellon Universitygraphics.cs.cmu.edu/courses/15-463/2018_fall/lectures/... · 2019. 4. 22. · • Woodham et al., “Photometric stereo: A reflectance
Page 41: Light transport matrices - Carnegie Mellon Universitygraphics.cs.cmu.edu/courses/15-463/2018_fall/lectures/... · 2019. 4. 22. · • Woodham et al., “Photometric stereo: A reflectance
Page 42: Light transport matrices - Carnegie Mellon Universitygraphics.cs.cmu.edu/courses/15-463/2018_fall/lectures/... · 2019. 4. 22. · • Woodham et al., “Photometric stereo: A reflectance
Page 43: Light transport matrices - Carnegie Mellon Universitygraphics.cs.cmu.edu/courses/15-463/2018_fall/lectures/... · 2019. 4. 22. · • Woodham et al., “Photometric stereo: A reflectance
Page 44: Light transport matrices - Carnegie Mellon Universitygraphics.cs.cmu.edu/courses/15-463/2018_fall/lectures/... · 2019. 4. 22. · • Woodham et al., “Photometric stereo: A reflectance
Page 45: Light transport matrices - Carnegie Mellon Universitygraphics.cs.cmu.edu/courses/15-463/2018_fall/lectures/... · 2019. 4. 22. · • Woodham et al., “Photometric stereo: A reflectance
Page 46: Light transport matrices - Carnegie Mellon Universitygraphics.cs.cmu.edu/courses/15-463/2018_fall/lectures/... · 2019. 4. 22. · • Woodham et al., “Photometric stereo: A reflectance
Page 47: Light transport matrices - Carnegie Mellon Universitygraphics.cs.cmu.edu/courses/15-463/2018_fall/lectures/... · 2019. 4. 22. · • Woodham et al., “Photometric stereo: A reflectance
Page 48: Light transport matrices - Carnegie Mellon Universitygraphics.cs.cmu.edu/courses/15-463/2018_fall/lectures/... · 2019. 4. 22. · • Woodham et al., “Photometric stereo: A reflectance

What do we call these patterns?

Page 49: Light transport matrices - Carnegie Mellon Universitygraphics.cs.cmu.edu/courses/15-463/2018_fall/lectures/... · 2019. 4. 22. · • Woodham et al., “Photometric stereo: A reflectance
Page 50: Light transport matrices - Carnegie Mellon Universitygraphics.cs.cmu.edu/courses/15-463/2018_fall/lectures/... · 2019. 4. 22. · • Woodham et al., “Photometric stereo: A reflectance
Page 51: Light transport matrices - Carnegie Mellon Universitygraphics.cs.cmu.edu/courses/15-463/2018_fall/lectures/... · 2019. 4. 22. · • Woodham et al., “Photometric stereo: A reflectance
Page 52: Light transport matrices - Carnegie Mellon Universitygraphics.cs.cmu.edu/courses/15-463/2018_fall/lectures/... · 2019. 4. 22. · • Woodham et al., “Photometric stereo: A reflectance
Page 53: Light transport matrices - Carnegie Mellon Universitygraphics.cs.cmu.edu/courses/15-463/2018_fall/lectures/... · 2019. 4. 22. · • Woodham et al., “Photometric stereo: A reflectance
Page 54: Light transport matrices - Carnegie Mellon Universitygraphics.cs.cmu.edu/courses/15-463/2018_fall/lectures/... · 2019. 4. 22. · • Woodham et al., “Photometric stereo: A reflectance
Page 55: Light transport matrices - Carnegie Mellon Universitygraphics.cs.cmu.edu/courses/15-463/2018_fall/lectures/... · 2019. 4. 22. · • Woodham et al., “Photometric stereo: A reflectance
Page 56: Light transport matrices - Carnegie Mellon Universitygraphics.cs.cmu.edu/courses/15-463/2018_fall/lectures/... · 2019. 4. 22. · • Woodham et al., “Photometric stereo: A reflectance
Page 57: Light transport matrices - Carnegie Mellon Universitygraphics.cs.cmu.edu/courses/15-463/2018_fall/lectures/... · 2019. 4. 22. · • Woodham et al., “Photometric stereo: A reflectance
Page 58: Light transport matrices - Carnegie Mellon Universitygraphics.cs.cmu.edu/courses/15-463/2018_fall/lectures/... · 2019. 4. 22. · • Woodham et al., “Photometric stereo: A reflectance
Page 59: Light transport matrices - Carnegie Mellon Universitygraphics.cs.cmu.edu/courses/15-463/2018_fall/lectures/... · 2019. 4. 22. · • Woodham et al., “Photometric stereo: A reflectance
Page 60: Light transport matrices - Carnegie Mellon Universitygraphics.cs.cmu.edu/courses/15-463/2018_fall/lectures/... · 2019. 4. 22. · • Woodham et al., “Photometric stereo: A reflectance

How would you measure the light transport matrix T?

Page 61: Light transport matrices - Carnegie Mellon Universitygraphics.cs.cmu.edu/courses/15-463/2018_fall/lectures/... · 2019. 4. 22. · • Woodham et al., “Photometric stereo: A reflectance

How would you measure the light transport matrix T?

Exhaustive/naïve approach: turn on projector pixels one at a time and take a photo for each of them.• What does each photo correspond to in T?

Page 62: Light transport matrices - Carnegie Mellon Universitygraphics.cs.cmu.edu/courses/15-463/2018_fall/lectures/... · 2019. 4. 22. · • Woodham et al., “Photometric stereo: A reflectance

How would you measure the light transport matrix T?

Exhaustive/naïve approach: turn on projector pixels one at a time and take a photo for each of them.• How many photos do we need to capture?

Page 63: Light transport matrices - Carnegie Mellon Universitygraphics.cs.cmu.edu/courses/15-463/2018_fall/lectures/... · 2019. 4. 22. · • Woodham et al., “Photometric stereo: A reflectance
Page 64: Light transport matrices - Carnegie Mellon Universitygraphics.cs.cmu.edu/courses/15-463/2018_fall/lectures/... · 2019. 4. 22. · • Woodham et al., “Photometric stereo: A reflectance

Inverse transport

Page 65: Light transport matrices - Carnegie Mellon Universitygraphics.cs.cmu.edu/courses/15-463/2018_fall/lectures/... · 2019. 4. 22. · • Woodham et al., “Photometric stereo: A reflectance
Page 66: Light transport matrices - Carnegie Mellon Universitygraphics.cs.cmu.edu/courses/15-463/2018_fall/lectures/... · 2019. 4. 22. · • Woodham et al., “Photometric stereo: A reflectance
Page 67: Light transport matrices - Carnegie Mellon Universitygraphics.cs.cmu.edu/courses/15-463/2018_fall/lectures/... · 2019. 4. 22. · • Woodham et al., “Photometric stereo: A reflectance
Page 68: Light transport matrices - Carnegie Mellon Universitygraphics.cs.cmu.edu/courses/15-463/2018_fall/lectures/... · 2019. 4. 22. · • Woodham et al., “Photometric stereo: A reflectance
Page 69: Light transport matrices - Carnegie Mellon Universitygraphics.cs.cmu.edu/courses/15-463/2018_fall/lectures/... · 2019. 4. 22. · • Woodham et al., “Photometric stereo: A reflectance

How do you solve this problem if you know the light transport matrix T?

Page 70: Light transport matrices - Carnegie Mellon Universitygraphics.cs.cmu.edu/courses/15-463/2018_fall/lectures/... · 2019. 4. 22. · • Woodham et al., “Photometric stereo: A reflectance

What do we do here?

Page 71: Light transport matrices - Carnegie Mellon Universitygraphics.cs.cmu.edu/courses/15-463/2018_fall/lectures/... · 2019. 4. 22. · • Woodham et al., “Photometric stereo: A reflectance

What if T is not invertible?

Page 72: Light transport matrices - Carnegie Mellon Universitygraphics.cs.cmu.edu/courses/15-463/2018_fall/lectures/... · 2019. 4. 22. · • Woodham et al., “Photometric stereo: A reflectance

How do you usually solve for l when T is large?

Page 73: Light transport matrices - Carnegie Mellon Universitygraphics.cs.cmu.edu/courses/15-463/2018_fall/lectures/... · 2019. 4. 22. · • Woodham et al., “Photometric stereo: A reflectance

Reminder from lecture 10: Gradient descent

Minimize by iteratively computing:

𝑓𝑖+1 = 𝑓𝑖 − η𝑖𝑟𝑖 , for i = 0, 1, …, Nη𝑖 =𝑟𝑖 𝑇

𝑟𝑖

𝑟𝑖 𝑇𝐴𝑟𝑖𝑟𝑖 = 𝑣 − 𝐴𝑓𝑖 ,

Is this cheaper than the pseudo-inverse approach?

• We never need to compute A, only its products with vectors f, r.• Vectors f, r are images.• Because A is the Laplacian matrix, these matrix-vector products can

be efficiently computed using convolutions with the Laplacian kernel.

Given the loss function:

𝐸 𝑓 = 𝐺𝑓 − 𝑣 2

Page 74: Light transport matrices - Carnegie Mellon Universitygraphics.cs.cmu.edu/courses/15-463/2018_fall/lectures/... · 2019. 4. 22. · • Woodham et al., “Photometric stereo: A reflectance

Gradient descent in this case

Minimize by iteratively computing:

𝑓𝑖+1 = 𝑓𝑖 − η𝑖𝑟𝑖 , for i = 0, 1, …, Nη𝑖 =𝑟𝑖 𝑇

𝑟𝑖

𝑟𝑖 𝑇𝐴𝑟𝑖𝑟𝑖 = 𝑣 − 𝐴𝑓𝑖 ,

Is this cheaper than the pseudo-inverse approach?

• We never need to compute A, only its products with vectors f, r.• Vectors f, r are images. What are f, r in this case?• Because A is the Laplacian matrix, these matrix-vector products can

be efficiently computed using convolutions with the Laplacian kernel.How do we compute matrix-vector products efficiently in this case?

Given the loss function:

𝐸 𝑓 = 𝐺𝑓 − 𝑣 2

Page 75: Light transport matrices - Carnegie Mellon Universitygraphics.cs.cmu.edu/courses/15-463/2018_fall/lectures/... · 2019. 4. 22. · • Woodham et al., “Photometric stereo: A reflectance
Page 76: Light transport matrices - Carnegie Mellon Universitygraphics.cs.cmu.edu/courses/15-463/2018_fall/lectures/... · 2019. 4. 22. · • Woodham et al., “Photometric stereo: A reflectance
Page 77: Light transport matrices - Carnegie Mellon Universitygraphics.cs.cmu.edu/courses/15-463/2018_fall/lectures/... · 2019. 4. 22. · • Woodham et al., “Photometric stereo: A reflectance

Dual photography

Page 78: Light transport matrices - Carnegie Mellon Universitygraphics.cs.cmu.edu/courses/15-463/2018_fall/lectures/... · 2019. 4. 22. · • Woodham et al., “Photometric stereo: A reflectance

How do the light transport matrices for these two scenes relate to each other?

https://www.youtube.com/watch?v=p5_tpq5ejFQ

Page 79: Light transport matrices - Carnegie Mellon Universitygraphics.cs.cmu.edu/courses/15-463/2018_fall/lectures/... · 2019. 4. 22. · • Woodham et al., “Photometric stereo: A reflectance

Helmholtz reciprocity: The two matrices are the transpose of each other.

https://www.youtube.com/watch?v=p5_tpq5ejFQGreat demonstration: https://www.youtube.com/watch?v=eV58Ko3iFuI

Page 80: Light transport matrices - Carnegie Mellon Universitygraphics.cs.cmu.edu/courses/15-463/2018_fall/lectures/... · 2019. 4. 22. · • Woodham et al., “Photometric stereo: A reflectance

ReferencesBasic reading:• Sloan et al., “Precomputed radiance transfer for real-time rendering in dynamic, low-

frequency lighting environments,” SIGGRAPH 2002.• Ng et al., “All-frequency shadows using non-linear wavelet lighting approximation,”

SIGGRAPH 2003.• Seitz et al., “A theory of inverse light transport,” ICCV 2005.

These three papers all discuss the concept of light transport matrix in detail.• Debevec et al., “Acquiring the reflectance field of a human face,” SIGGRAPH 2000.

The paper on image-based relighting.• Woodham et al., “Photometric stereo: A reflectance map technique for determining

surface orientation from image intensity,” IUSIA 1979.The original photometric stereo paper.

• O’Toole and Kutulakos, “Optical computing for fast light transport analysis,” SIGGRAPH Asia 2010.

The paper on eigenanalysis and optical computing using light transport matrices.• Sen et al., “Dual photography,” SIGGRAPH 2005.

The dual photography paper.

Additional reading:• Peers et al., “Compressive light transport sensing,” TOG 2009.• Wang et al., “Kernel Nyström method for light transport,” SIGGRAPH 2009.

These two papers discuss alternative ways for efficient acquisition of the light transport matrix, using assumptions on its algebraic structure.