52
Fast Separation of Direct and Global Components of a Scene using High Frequency Illumination S.K.Nayar, G.Krishnan, M.D.Grossberg, R.Raskar SIGGRAPH 2006 Presented by Vasily Volkov UC Berkeley CS294-69

Fast Separation of Direct and Global Components of a Scene …vis.berkeley.edu/courses/cs294-69-fa11/wiki/images/c/ca/... · 2011. 11. 21. · Fast Separation of Direct and Global

  • Upload
    others

  • View
    0

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Fast Separation of Direct and Global Components of a Scene …vis.berkeley.edu/courses/cs294-69-fa11/wiki/images/c/ca/... · 2011. 11. 21. · Fast Separation of Direct and Global

Fast Separation of Direct and Global Components of a Scene using High Frequency Illumination

S.K.Nayar, G.Krishnan, M.D.Grossberg, R.Raskar

SIGGRAPH 2006

Presented by Vasily Volkov UC Berkeley CS294-69

Page 2: Fast Separation of Direct and Global Components of a Scene …vis.berkeley.edu/courses/cs294-69-fa11/wiki/images/c/ca/... · 2011. 11. 21. · Fast Separation of Direct and Global

The problem: separate direct illumination

2

Page 3: Fast Separation of Direct and Global Components of a Scene …vis.berkeley.edu/courses/cs294-69-fa11/wiki/images/c/ca/... · 2011. 11. 21. · Fast Separation of Direct and Global

Idea: cancel it using a small occluder

3

Page 4: Fast Separation of Direct and Global Components of a Scene …vis.berkeley.edu/courses/cs294-69-fa11/wiki/images/c/ca/... · 2011. 11. 21. · Fast Separation of Direct and Global

Canceling direct illumination

No direct illumination inside shadow

About same global illumination (but dimmer)

Locally extracted global illumination

Stick

4

Page 5: Fast Separation of Direct and Global Components of a Scene …vis.berkeley.edu/courses/cs294-69-fa11/wiki/images/c/ca/... · 2011. 11. 21. · Fast Separation of Direct and Global

Move shadow around, collect images

Global illumination for entire image

Composite of many shadow images 5

Page 6: Fast Separation of Direct and Global Components of a Scene …vis.berkeley.edu/courses/cs294-69-fa11/wiki/images/c/ca/... · 2011. 11. 21. · Fast Separation of Direct and Global

Get direct illumination by subtraction

Direct illumination = total – global illumination

6

Page 7: Fast Separation of Direct and Global Components of a Scene …vis.berkeley.edu/courses/cs294-69-fa11/wiki/images/c/ca/... · 2011. 11. 21. · Fast Separation of Direct and Global

The shadow must be small enough

C: subsurface scattering in marble

D: subsurface scattering in wax

F: diffuse scattering in diluted milk

size of the shadow

(global illumination)

7

Page 8: Fast Separation of Direct and Global Components of a Scene …vis.berkeley.edu/courses/cs294-69-fa11/wiki/images/c/ca/... · 2011. 11. 21. · Fast Separation of Direct and Global

Big but high frequency shadow is also OK

mesh projector pattern

Key insight: global illumination is usually diffusive

Thus, any high-frequency shadow doesn’t change it

Except it loses intensity by some factor 8

Page 9: Fast Separation of Direct and Global Components of a Scene …vis.berkeley.edu/courses/cs294-69-fa11/wiki/images/c/ca/... · 2011. 11. 21. · Fast Separation of Direct and Global

Only 25 images required for entire capture

Take min, max per

pixel. Min=global

illumination,

max = total

illumination

9

Page 10: Fast Separation of Direct and Global Components of a Scene …vis.berkeley.edu/courses/cs294-69-fa11/wiki/images/c/ca/... · 2011. 11. 21. · Fast Separation of Direct and Global

Example

direct illumination global illumination 10

Page 11: Fast Separation of Direct and Global Components of a Scene …vis.berkeley.edu/courses/cs294-69-fa11/wiki/images/c/ca/... · 2011. 11. 21. · Fast Separation of Direct and Global

Separation using a single image

capturing: 2-pixel wide lines on 1024x768 projector

direct, 4x4 window global illumination

Instead of collecting images, use pixel windows

Take min or max in a window around pixel

Lose resolution, but OK in input is very high-res

11

Page 12: Fast Separation of Direct and Global Components of a Scene …vis.berkeley.edu/courses/cs294-69-fa11/wiki/images/c/ca/... · 2011. 11. 21. · Fast Separation of Direct and Global

More examples

original

direct illumination global illumination

12

Page 13: Fast Separation of Direct and Global Components of a Scene …vis.berkeley.edu/courses/cs294-69-fa11/wiki/images/c/ca/... · 2011. 11. 21. · Fast Separation of Direct and Global

More examples

original

direct illumination global illumination 13

Page 14: Fast Separation of Direct and Global Components of a Scene …vis.berkeley.edu/courses/cs294-69-fa11/wiki/images/c/ca/... · 2011. 11. 21. · Fast Separation of Direct and Global

Application: new images

amplified global component altered global component hue

original original

14

Page 15: Fast Separation of Direct and Global Components of a Scene …vis.berkeley.edu/courses/cs294-69-fa11/wiki/images/c/ca/... · 2011. 11. 21. · Fast Separation of Direct and Global

Application: shape from image

original image

direct illumination

Improved accuracy

15

Page 16: Fast Separation of Direct and Global Components of a Scene …vis.berkeley.edu/courses/cs294-69-fa11/wiki/images/c/ca/... · 2011. 11. 21. · Fast Separation of Direct and Global

Limitation: non-diffusive surfaces

scene global illumination

If surfaces are non-diffusive, even high-frequency shadows compromise global illumination

16

Page 17: Fast Separation of Direct and Global Components of a Scene …vis.berkeley.edu/courses/cs294-69-fa11/wiki/images/c/ca/... · 2011. 11. 21. · Fast Separation of Direct and Global

Do finer splitting?

• Direct illumination = 1-bounce

• Global illumination = n-bounce, n >= 2. (Split?)

17

Page 18: Fast Separation of Direct and Global Components of a Scene …vis.berkeley.edu/courses/cs294-69-fa11/wiki/images/c/ca/... · 2011. 11. 21. · Fast Separation of Direct and Global

A Theory of Inverse Light Transport

S.M. Seitz, Y. Matsushita, and K. Kutulakos

CVPR 2005

Presented by Vasily Volkov UC Berkeley CS294-69

Page 19: Fast Separation of Direct and Global Components of a Scene …vis.berkeley.edu/courses/cs294-69-fa11/wiki/images/c/ca/... · 2011. 11. 21. · Fast Separation of Direct and Global

Rendering equation

𝐿 𝒙, 𝒚 = 𝜖 𝒙, 𝒚 + 𝜌(𝒙, 𝒚, 𝒕)𝐿 𝒕, 𝒙 𝑑𝒕

emission reflection 19

radiance from x to y

x

t

y

Page 20: Fast Separation of Direct and Global Components of a Scene …vis.berkeley.edu/courses/cs294-69-fa11/wiki/images/c/ca/... · 2011. 11. 21. · Fast Separation of Direct and Global

Use direct illumination, not emission

𝐿 𝒙, 𝒚 = 𝐿1 𝒙, 𝒚 + 𝜌(𝒙, 𝒚, 𝒕)𝐿 𝒕, 𝒙 𝑑𝒕

direct light from x to y 20

x

t

y

Page 21: Fast Separation of Direct and Global Components of a Scene …vis.berkeley.edu/courses/cs294-69-fa11/wiki/images/c/ca/... · 2011. 11. 21. · Fast Separation of Direct and Global

Discrete rendering equation

l – given discrete 4D light field (vector)

A – given discrete interreflection operator (matrix)

21

𝒍 = 𝒍1 + 𝐴𝒍

𝒍1 = 𝒍 − 𝐴𝒍 = 𝐼 − 𝐴 𝒍

interreflection cancellation operator 𝐶1

Solve for direct light l1:

Page 22: Fast Separation of Direct and Global Components of a Scene …vis.berkeley.edu/courses/cs294-69-fa11/wiki/images/c/ca/... · 2011. 11. 21. · Fast Separation of Direct and Global

N-bounce light fields

22

𝒍 = (𝐼 − 𝐴)−1𝒍1

= 𝒍1 + 𝐴𝒍1 + 𝐴2𝒍1 + 𝐴

3𝒍1 +⋯

Solving l = l1 + Al for l we have

Where 𝒍𝑛 ≡ 𝐴𝑛−1𝒍1 is n-bounce light field, i.e.

light that bounced n times off surfaces.

Since 𝒍1 = 𝐼 − 𝐴 𝒍, we have:

𝒍𝑛 = 𝐴𝑛−1 𝐼 − 𝐴 𝒍 ≡ 𝐶𝑛𝒍

l2 l3 l4

Page 23: Fast Separation of Direct and Global Components of a Scene …vis.berkeley.edu/courses/cs294-69-fa11/wiki/images/c/ca/... · 2011. 11. 21. · Fast Separation of Direct and Global

From 4D light field to 2D illumination field

23

Using 4D light field l (lumigraph) is costly Assume Lambertian reflection! • Same radiance in all directions – reduces problem

to 2D • Much less expensive, but approximate

2D radiance – can capture using a single image • Must ensure all scene points are visible • Otherwise, bounces off occluded points are not

counted

Page 24: Fast Separation of Direct and Global Components of a Scene …vis.berkeley.edu/courses/cs294-69-fa11/wiki/images/c/ca/... · 2011. 11. 21. · Fast Separation of Direct and Global

scene and sample points

24

Capturing 2D illumination field

captured image l

Page 25: Fast Separation of Direct and Global Components of a Scene …vis.berkeley.edu/courses/cs294-69-fa11/wiki/images/c/ca/... · 2011. 11. 21. · Fast Separation of Direct and Global

Capturing matrix A

25

Where to get A? Get it from 𝒍1 = 𝐼 − 𝐴 𝒍

Capture many independent light fields t1, t2, …

Build square matrix T = [t1, t2, … , tm]

Now, 𝑇1 = 𝐼 − 𝐴 𝑇 and 𝐼 − 𝐴 = 𝑇1𝑇−1

How to get 𝑇1? (Capture?) Here is a workaround:

• Note that 𝐼 − 𝐴 has 1s on the diagonal

• Use impulse illumination to get diagonal T1

Page 26: Fast Separation of Direct and Global Components of a Scene …vis.berkeley.edu/courses/cs294-69-fa11/wiki/images/c/ca/... · 2011. 11. 21. · Fast Separation of Direct and Global

26

Impulse illumination using laser

matrix T

t34

t172

Highlight single pixel – direct light is zero elsewhere

Page 27: Fast Separation of Direct and Global Components of a Scene …vis.berkeley.edu/courses/cs294-69-fa11/wiki/images/c/ca/... · 2011. 11. 21. · Fast Separation of Direct and Global

Dealing with T1

27

Why 𝐼 − 𝐴 has 1s on the diagonal?

• A is interreflection matrix

• Point x doesn’t reflect light from x

• So, A has 0 on diagonal and 𝐼 − 𝐴 = 𝑇1𝑇−1 has 1s

Since T1 is diagonal, 𝑇1𝑇−1 is row-scaling of 𝑇−1

• Since 𝑇1𝑇−1 has 1s on diagonal, this defines 𝐼 − 𝐴

Page 28: Fast Separation of Direct and Global Components of a Scene …vis.berkeley.edu/courses/cs294-69-fa11/wiki/images/c/ca/... · 2011. 11. 21. · Fast Separation of Direct and Global

28

Results

Input image l

Direct light l1

2-bounce l2

(amplified 3x)

Page 29: Fast Separation of Direct and Global Components of a Scene …vis.berkeley.edu/courses/cs294-69-fa11/wiki/images/c/ca/... · 2011. 11. 21. · Fast Separation of Direct and Global

29

Results

3-bounce l3

(amplified 3x)

4-bounce l4

(6x)

5-bounce l5

(15x)

indirect illumination 𝒍 − 𝒍1

Page 30: Fast Separation of Direct and Global Components of a Scene …vis.berkeley.edu/courses/cs294-69-fa11/wiki/images/c/ca/... · 2011. 11. 21. · Fast Separation of Direct and Global

Summary

1. If we know both the lightfield and the interreflection operator, we can compute all N-bounce light fields

2. If scene is Lambertian, the lightfield can be described with a single image – it is sufficient to compute all N-bounce light fields

3. They use explicit interreflection operator – prohibitive cost unless using low resolution

30

Page 31: Fast Separation of Direct and Global Components of a Scene …vis.berkeley.edu/courses/cs294-69-fa11/wiki/images/c/ca/... · 2011. 11. 21. · Fast Separation of Direct and Global

Optical Computing for Fast Light Transport Analysis

M. O'Tool and K. Kutulakos

SIGGRAPH Asia 2010

Presented by Vasily Volkov UC Berkeley CS294-69

Page 32: Fast Separation of Direct and Global Components of a Scene …vis.berkeley.edu/courses/cs294-69-fa11/wiki/images/c/ca/... · 2011. 11. 21. · Fast Separation of Direct and Global

Problem statement

Scene is lit using light l

Scene’s photo is read as p

Linear connection: p = Tl

Relighting:

• Given projector light l, estimate resulting image p

Inverse light transport:

• Given image p, find what light l produces it

32

Page 33: Fast Separation of Direct and Global Components of a Scene …vis.berkeley.edu/courses/cs294-69-fa11/wiki/images/c/ca/... · 2011. 11. 21. · Fast Separation of Direct and Global

The approach

The transport matrix T can be very large

• Capturing it explicitly has prohibiting cost

Solution: capture a low-rank approximation

• E.g. rank-10: 𝑇 ≈ 𝒑1𝒍1𝑇 + 𝒑2𝒍2

𝑇 +⋯+ 𝒑10𝒍10𝑇

• Inexpensive and might be accurate enough

Products 𝒑1𝒍1𝑇 , … are never computed explicitly

• Instead, use 𝑇𝒍 ≈ 𝒑1(𝒍1𝑇𝒍) + ⋯+ 𝒑10(𝒍10

𝑇 𝒍)

33

Page 34: Fast Separation of Direct and Global Components of a Scene …vis.berkeley.edu/courses/cs294-69-fa11/wiki/images/c/ca/... · 2011. 11. 21. · Fast Separation of Direct and Global

Closer look into low-rank approximations

34

Matrix entries aij are shown as color intensities (These are 3 independent matrices for R,G,B)

Take an arbitrary matrix A, e.g. this one:

matrix columns

mat

rix

row

s

Page 35: Fast Separation of Direct and Global Components of a Scene …vis.berkeley.edu/courses/cs294-69-fa11/wiki/images/c/ca/... · 2011. 11. 21. · Fast Separation of Direct and Global

Rank-1 approximation

35

matrix A rank-1 approximation A l1r1

T

p1

vector 𝒍1𝑇

Page 36: Fast Separation of Direct and Global Components of a Scene …vis.berkeley.edu/courses/cs294-69-fa11/wiki/images/c/ca/... · 2011. 11. 21. · Fast Separation of Direct and Global

Higher rank = better approximation

36

Rank-5 approximation: A l1r1T + l2r2

T … +l5r5T

rank-10 rank-5

Page 37: Fast Separation of Direct and Global Components of a Scene …vis.berkeley.edu/courses/cs294-69-fa11/wiki/images/c/ca/... · 2011. 11. 21. · Fast Separation of Direct and Global

Stop when accuracy is sufficient

37

rank-50 rank-25

How to compute it? These were done using SVD: • Most accurate, but requires explicit matrix

Page 38: Fast Separation of Direct and Global Components of a Scene …vis.berkeley.edu/courses/cs294-69-fa11/wiki/images/c/ca/... · 2011. 11. 21. · Fast Separation of Direct and Global

• Take random vector r1

• Compute [r1, Ar1, A2r1, …, Ak‒1r1]

• Orthonormalize them – these are [r1, r2, …, rk]

– Interleave these two steps if in finite precision

• Take [Ar1, Ar2, …, Ark] for [l1, l2, …, lk]

• Now A 𝒍1𝒓1𝑇 + 𝒍2𝒓2

𝑇 +⋯+ 𝒍𝑘𝒓𝑘𝑇

• No explicit A needed, only function A x

38

Efficient solution: Krylov methods

Page 39: Fast Separation of Direct and Global Components of a Scene …vis.berkeley.edu/courses/cs294-69-fa11/wiki/images/c/ca/... · 2011. 11. 21. · Fast Separation of Direct and Global

rank-25 rank-10 rank-5

Kry

lov

SVD

Page 40: Fast Separation of Direct and Global Components of a Scene …vis.berkeley.edu/courses/cs294-69-fa11/wiki/images/c/ca/... · 2011. 11. 21. · Fast Separation of Direct and Global

• Use ATA when building Krylov subspace

– I.e. compute r1, ATAr1, (A

TA)2r1, …

– ATA is s.p.d. – much better numerical properties

• This requires additional function AT x

40

Faster convergence: use ATA

Page 41: Fast Separation of Direct and Global Components of a Scene …vis.berkeley.edu/courses/cs294-69-fa11/wiki/images/c/ca/... · 2011. 11. 21. · Fast Separation of Direct and Global

rank-25 rank-10 rank-5

S.P.

D. K

rylo

v SV

D

Page 42: Fast Separation of Direct and Global Components of a Scene …vis.berkeley.edu/courses/cs294-69-fa11/wiki/images/c/ca/... · 2011. 11. 21. · Fast Separation of Direct and Global

Use same idea for transport matrix

rank-50 approximation rank-10 approximation

Page 43: Fast Separation of Direct and Global Components of a Scene …vis.berkeley.edu/courses/cs294-69-fa11/wiki/images/c/ca/... · 2011. 11. 21. · Fast Separation of Direct and Global

Capturing Tx

43

Optical matrix-vector multiply

Capturing TTx

TTx: same arrangement as Tx, but swap camera and projector

• Or use two of each with beam splitters

Page 44: Fast Separation of Direct and Global Components of a Scene …vis.berkeley.edu/courses/cs294-69-fa11/wiki/images/c/ca/... · 2011. 11. 21. · Fast Separation of Direct and Global

Project x using left projector, read Tx in right camera Project x using right projector, read TTx in left camera

44

Optical matrix-vector multiply

Page 45: Fast Separation of Direct and Global Components of a Scene …vis.berkeley.edu/courses/cs294-69-fa11/wiki/images/c/ca/... · 2011. 11. 21. · Fast Separation of Direct and Global

Might not work with high-rank T

• Use diffusive light: shoot it through a screen

Some vectors have negative pixel values

• Process positive and negative separately

• Doubles number of photos

45

Intricacies

Page 46: Fast Separation of Direct and Global Components of a Scene …vis.berkeley.edu/courses/cs294-69-fa11/wiki/images/c/ca/... · 2011. 11. 21. · Fast Separation of Direct and Global

as brute-force 46

brute-force is better better than brute-force

Convergence of matrix approximation Acquire low-resolution transport matrices explicitly

Compare Krylov with SVD and brute-force

Page 47: Fast Separation of Direct and Global Components of a Scene …vis.berkeley.edu/courses/cs294-69-fa11/wiki/images/c/ca/... · 2011. 11. 21. · Fast Separation of Direct and Global

Relighting results

47

Build rank-10 approximation of T

• Requires 40 photos, 3 seconds per photo

Use it to compute Tl for any given l, in 3 seconds

Page 48: Fast Separation of Direct and Global Components of a Scene …vis.berkeley.edu/courses/cs294-69-fa11/wiki/images/c/ca/... · 2011. 11. 21. · Fast Separation of Direct and Global

48

Inverse light transport results

• Use given image p to initiate the Krylov method

– The resulting approximation is tuned to p

– Might even work well with a high-rank matrix

• Use rank-k approximation to solve p = Tl for l

p

l

Page 49: Fast Separation of Direct and Global Components of a Scene …vis.berkeley.edu/courses/cs294-69-fa11/wiki/images/c/ca/... · 2011. 11. 21. · Fast Separation of Direct and Global

49

Inverse problem for high-rank matrix

No light diffusers this time

Page 50: Fast Separation of Direct and Global Components of a Scene …vis.berkeley.edu/courses/cs294-69-fa11/wiki/images/c/ca/... · 2011. 11. 21. · Fast Separation of Direct and Global

50

The input image

Page 51: Fast Separation of Direct and Global Components of a Scene …vis.berkeley.edu/courses/cs294-69-fa11/wiki/images/c/ca/... · 2011. 11. 21. · Fast Separation of Direct and Global

Ground truth

51

The solution found

(20 iterations)