Coded Computational Photography ! EE367/CS448I: Computational Imaging - - PowerPoint PPT Presentation

coded computational photography
SMART_READER_LITE
LIVE PREVIEW

Coded Computational Photography ! EE367/CS448I: Computational Imaging - - PowerPoint PPT Presentation

Coded Computational Photography ! EE367/CS448I: Computational Imaging and Display ! stanford.edu/class/ee367 ! Lecture 9 ! Gordon Wetzstein ! Stanford University ! Coded Computational Photography - Overview ! [Cossairt et al., 2010] ! ! coded


slide-1
SLIDE 1

Coded Computational Photography!

Gordon Wetzstein! Stanford University! EE367/CS448I: Computational Imaging and Display! stanford.edu/class/ee367! Lecture 9!

slide-2
SLIDE 2

Coded Computational Photography - Overview!

  • !

coded apertures!

  • !

extended depth of field!

  • !

wavefront coding!

  • !

lattice lens!

  • !

diffusion coding!

  • !

focal sweep!

  • !

motion deblurring !

  • !

flutter shutter!

  • !

motion invariance!

[Raskar et al. 2006]! [Cossairt et al., 2010]!

slide-3
SLIDE 3

Remember Apertures?!

  • !
  • ut of focus blur!

focal plane! circle of confusion!

slide-4
SLIDE 4

What makes Defocus Deblurring Hard?!

1.! depth-dependent PSF scale (depth unknown)! 2.! circular / Airy PSF is not (well) invertible! focal plane! circle of confusion!

slide-5
SLIDE 5

Coded Computational Imaging - Motivation

  • 1. depth-dependent PSF scale (depth unknown)
  • engineer PSF to be depth invariant
  • resulting shift-invariant deconvolution is much easier!
  • 2. circular / Airy PSF is not (well) invertible: ill-posed problem
  • engineer PSF to be broadband (flat Fourier magnitudes)
  • resulting inverse problem becomes well-posed
slide-6
SLIDE 6

Computational Imaging!

? ? ?

  • !

new optics!

  • !

new sensors!

  • !

new illumination!

  • !

new algorithms!

?

1.! optically encode scene information! 2.! computationally recover information!

slide-7
SLIDE 7

Coded Computational Imaging (for this Class)!

?

  • !

new optics!

  • !

easier algorithms!

?

1.! optically encode scene information using invertible (and possibly invariant) PSF ! 2.! computationally recover information (easy because of engineered PSF)!

slide-8
SLIDE 8

Coded Computational Imaging (for this Class)!

?

  • !

new optics!

  • !

easier algorithms!

?

idea applies to !

  • !

coded apertures!

  • !

extended depth of field / DOF deblurring!

  • !

extended motion / motion deblurring!

slide-9
SLIDE 9

Before going to Advanced Techniques for DOF Deblurring, let’s take a look at

Coded Apertures

slide-10
SLIDE 10

Apertures Revisited!

  • !

two important parts:! 1.! aperture stop – attenuating pattern! 2.! refractive element (lens or compound lens system)!

  • 1. attenuating coded aperture: e.g., MURA pattern!
  • 2. refractive coded!

aperture: e.g., cubic phase plate!

slide-11
SLIDE 11

Coded Aperture Changes PSF!

in-focus photo!

  • ut-of-focus, circular aperture!
  • ut-of-focus, coded aperture!

[Veeraragharavan et al. 2007]!

slide-12
SLIDE 12

Coded Aperture Changes PSF!

in-focus photo!

  • ut-of-focus, circular aperture!
  • ut-of-focus, coded aperture!

[Veeraragharavan et al. 2007]!

slide-13
SLIDE 13

Coded Aperture Changes PSF!

  • !

preserves high frequencies!

  • !

deconvolution well-posed!! FFT!

[Veeraragharavan et al. 2007]!

coded! conventional!

slide-14
SLIDE 14

Coded Aperture Allows for Depth Estimation!

  • !

introduce zeros in Fourier domain!

  • !

better depth discimination!

  • !

worse invertibility!

conventional aperture! coded aperture! PSF!

[Levin et al. 2007]!

slide-15
SLIDE 15

Coded Aperture Allows for Depth Estimation!

  • !

deconvolution with strong prior necessary!

input! local depth estimate! regularized depth!

[Levin et al. 2007]!

slide-16
SLIDE 16

In Astronomy!

  • !

some wavelengths are difficult to focus! ! no “lenses” available!

  • !

coded apertures for x-rays and gamma rays!

NASA Swift! ESA SPI / INTEGRAL!

slide-17
SLIDE 17

In Microscopy!

  • !

for low-light, coding of refraction is better (less light loss)!

e.g., cubic phase plate for depth-invariant imaging! e.g., rotating double helix PSF Stanford Moerner lab!

slide-18
SLIDE 18

Extended Depth of Field

slide-19
SLIDE 19

Depth Invariant PSFs - Overview!

  • !

two general approaches:! 1.! move sensor / object! (known as focal sweep)!

  • 2. change optics!

(e.g., wavefront coding)!

slide-20
SLIDE 20

Focal Sweep!

[Nagahara et al. 2008]!

time! distance! sensor-lens! time! distance! sensor-lens! time! distance! sensor-lens!

linear motion:! nonlinear motion:! nonlinear motion:! exposure!

slide-21
SLIDE 21

Focal Sweep!

[Nagahara et al. 2008]!

time! distance! sensor-lens! time!

two points at different distance !

slide-22
SLIDE 22

Focal Sweep!

[Nagahara et al. 2008]!

time! distance! sensor-lens! time!

! !

PSF 1! PSF 2!

t1 t2

instantaneous PSF! integrated PSF! two points at different distance !

slide-23
SLIDE 23

Focal Sweep!

[Nagahara et al. 2008]!

time! distance! sensor-lens! time!

! !

PSF 1! PSF 2!

t1 t2

instantaneous PSF! two points at different distance !

slide-24
SLIDE 24

Focal Sweep!

[Nagahara et al. 2008]!

time! distance! sensor-lens! time!

! !

PSF 1! PSF 2!

t1 t3 t2

instantaneous PSF! integrated PSF! two points at different distance !

slide-25
SLIDE 25

Focal Sweep!

[Nagahara et al. 2008]!

time! distance! sensor-lens! time!

! !

PSF 1! PSF 2!

t1 t3 t2 t4

instantaneous PSF! two points at different distance !

slide-26
SLIDE 26

Focal Sweep!

[Nagahara et al. 2008]!

time! distance! sensor-lens! time!

!

dt =

!

dt = !

PSF 1! PSF 2!

t1 t3 t2 t4 t5

instantaneous PSF! integrated PSF! two points at different distance !

slide-27
SLIDE 27

Focal Sweep!

[Nagahara et al. 2008]!

time! distance! sensor-lens! time!

!

dt =

!

dt = !

PSF 1! PSF 2!

t1 t3 t2 t4 t5

instantaneous PSF! integrated PSF! two points at different distance !

slide-28
SLIDE 28

Focal Sweep!

[Nagahara et al. 2008]!

time! distance! sensor-lens! time!

!

integrated PSF! two points at different distance !

  • !

spend equal amount of time at each depth to make depth invariant! !

slide-29
SLIDE 29

Focal Sweep!

[Nagahara et al. 2008]!

conventional photo (small DOF)! captured focal sweep! always blurry!! conventional photo (large DOF, noisy)! EDOF image!

slide-30
SLIDE 30

Focal Sweep!

[Nagahara et al. 2008]!

conventional photo (large DOF, noisy)! EDOF image!

  • !

noise characteristics are main benefit of EDOF!

  • !

may change for different sensor noise characteristics! !

SNR should be! evaluation metric!

slide-31
SLIDE 31

Focal Sweep for Moving Objects!

motion! conventional camera PSF! focal sweep camera PSF! motion! defocus!

[Bando et al. 2013]!

slide-32
SLIDE 32

Focal Sweep for Moving Objects!

motion! conventional camera PSF! focal sweep camera PSF! motion! defocus!

[Bando et al. 2013]!

slide-33
SLIDE 33

Focal Sweep for Moving Objects!

motion! conventional camera PSF! focal sweep camera PSF! motion! defocus!

[Bando et al. 2013]!

slide-34
SLIDE 34

Focal Sweep for Moving Objects!

[Bando et al. 2013]!

conventional camera! focal sweep! focal sweep deblurred!

slide-35
SLIDE 35

Wavefront Coding!

  • !

how to obtain a depth invariant PSF without mechanically moving parts! ! change the lens!!

  • !

for many, this is the dawn of computational imaging!! !

[Dowski and Cathey 1995]!

cubic phase plate!

  • !

tricky to understand intuitively, so let’s try to understand what it does by looking at something else…! !

slide-36
SLIDE 36

Lattice Focal Lens!

[Levin et al. 2009]!

superimpose array of lenses with different focal lengths!!

time!

slide-37
SLIDE 37

Lattice Focal Lens!

[Levin et al. 2009]!

conventional camera! lattice focal lens! all-in-focus image from lattice focal lens!

slide-38
SLIDE 38

Extended Depth of Field (EDOF)

  • remember focal sweep: move sensor s.t. same time for each depth
  • lattice focal lens: same idea, but no sweeping (optical overlay) –
  • ptimal in 4D
  • cubic phase plate: same idea (optimal in 2D, not optimal in 4D)

(can look at this in more detail if we have time)

slide-39
SLIDE 39

Diffusion Coded Photography!

  • !

can also do EDOF with diffuser as coded aperture, has better inversion ! characteristics than lattice focal lens!

[Cossairt et al. 2010]!

slide-40
SLIDE 40

Back to Coding Motion

slide-41
SLIDE 41

Flutter Shutter

  • engineer motion PSF (coding exposure time) so it becomes invertible!

[Raskar et al. 2006]

slide-42
SLIDE 42

[Raskar et al. 2006]!

photo with coded motion!

slide-43
SLIDE 43

deblurred!

slide-44
SLIDE 44

Deblurred Result! Input Photo!

[Raskar et al. 2006]!

slide-45
SLIDE 45

Traditional Camera! ! Shutter is OPEN!

[Raskar et al. 2006]!

slide-46
SLIDE 46

! Flutter Shutter!

[Raskar et al. 2006]!

slide-47
SLIDE 47

Shutter is OPEN and CLOSED! ! !

[Raskar et al. 2006]!

slide-48
SLIDE 48

H

Harold “Doc” Edgerton

slide-49
SLIDE 49

[Raskar et al. 2006]!

slide-50
SLIDE 50

Lab Setup

[Raskar et al. 2006]

slide-51
SLIDE 51

Blurring = Convolution Traditional Camera: Box Filter sinc Function

[Raskar et al. 2006]

Fourier magnitudes spatial convolution

slide-52
SLIDE 52

Flutter Shutter: Coded Filter

Preserves High Frequencies!!!

[Raskar et al. 2006]

spatial convolution Fourier magnitudes

slide-53
SLIDE 53

Comparison

[Raskar et al. 2006]

slide-54
SLIDE 54

Inverse Filter Unstable! Inverse Filter stable!

[Raskar et al. 2006]!

slide-55
SLIDE 55

Short Exposure Long Exposure Coded Exposure

Ground Truth Matlab Richardson-Lucy Our result

slide-56
SLIDE 56

Are all codes good?! Alternate! All ones! Random! Our Code!

[Raskar et al. 2006]!

slide-57
SLIDE 57

License Plate Retrieval!

[Raskar et al. 2006]!

slide-58
SLIDE 58

License Plate Retrieval!

[Raskar et al. 2006]!

slide-59
SLIDE 59

Motion Invariant Photography

  • making motion PSFs invariant is great, BUT need to know motion

direction and velocity!

  • we have already seen that focal sweep makes the PSF almost depth

invariant

  • how about making motion PSFs motion invariant?
slide-60
SLIDE 60

title!

  • !

text!

Jacques Henri Lartigue, 1912!

slide-61
SLIDE 61
  • text

animation by largeformatphotography.info user Lindolfi

slide-62
SLIDE 62

Controlling Motion Blur

[Levin et al. 2008]

slide-63
SLIDE 63

Can we control motion blur?

Controlling Motion Blur

[Levin et al. 2008]

slide-64
SLIDE 64

Controlling Motion Blur

[Levin et al. 2008]

slide-65
SLIDE 65

Controlling Motion Blur

[Levin et al. 2008]

slide-66
SLIDE 66

Motion invariant blur

Controlling Motion Blur

[Levin et al. 2008]

?

slide-67
SLIDE 67

Sensor position x(t)=a t2

  • start by moving very fast to the right
  • continuously slow down until stop
  • continuously accelerate to the left
  • Intuition:
  • for any velocity, there is one

instant where we track perfectly

  • all velocities captured same

amount of time

  • Sensor position x

Time t

Parabolic Sweep

[Levin et al. 2008]

slide-68
SLIDE 68

Motion Invariant Blur!

[Levin et al. 2008]!

slide-69
SLIDE 69

Static camera

  • Unknown and variable

blur kernels Our parabolic input

  • Blur kernel is invariant

to velocity

Our output after deblurring NON-BLIND deconvolution

  • [Levin et al. 2008]
slide-70
SLIDE 70

Equal high response in all range! Primal Domain! t! x! Frequency Domain!

t

!

x

!

t! x! Objects! Camera integration curve! Parabolic sweep!

t

!

x

!

Velocity 2! Velocity 1! Static!

Frequency Domain!

sensor integration!

[Levin et al. 2008]!

slide-71
SLIDE 71

Next: Noise!

  • !

Gaussian noise!

  • !

Poissonian noise!

  • !

Denoising!

slide-72
SLIDE 72

References and Further Reading

Extended Depth of Field (EDOF)

  • DOWSKI, E. R., AND CATHEY, W. T. 1995. Extended depth of field through wave-front coding. Appl. Opt. 34, 11, 1859–1866
  • Levin, Hasinoff, Green, Durand, Freeman, “4D Frequency Analysis of Computational Cameras for Depth of Field Extension”, ACM SIGGRAPH 2009
  • Cossairt, Zhou, Nayar, “Diffusion-Coded Photography”, ACM SIGGRAPH 2012
  • verview and analysis in light field space: Zhang, Levoy, “Wigner Distributions and How They Relate to the Light Field”, ICCP 2009
  • A. Isaksen, L. McMillan, and S. J. Gortler. “Dynamically reparameterized light fields”. In Proc. ACM SIGGRAPH, 2000

EDOF through Focal Sweep

  • HAUSLER , G. 1972. A method to increase the depth of focus by two step image processing. Optics Communications 6 (Sep), 38–42.
  • NAGAHARA, H., KUTHIRUMMAL, S., ZHOU, C., AND NAYAR, S. 2008. Flexible Depth of Field Photography. In ECCV ’08, 73
  • Cossairt, Nayar “Spectral Focal Sweep for Extending Depth of Field”, Proc. ICCP 2010

Coded Apertures

  • LEVIN, A., FERGUS, R., DURAND, F., AND FREEMAN, W. T. 2007. Image and depth from a conventional camera with a coded aperture. In SIGGRAPH ’07, 70.
  • VEERARAGHAVAN, A., RASKAR, R., AGRAWAL, A., MOHAN, A., AND TUMBLIN, J. 2007. Dappled photography: mask enhanced cameras for heterodyned light

fields and coded aperture refocusing. In SIGGRAPH ’07, 69

  • ZHOU, C., AND NAYAR, S. 2009. What are Good Apertures for Defocus Deblurring? In ICCP ’09

Coding Motion

  • Raskar, Agrawal, Tumblin, “Coded Exposure Photography: Motion Deblurring using Fluttered Shutter”, ACM SIGGRAPH 2006
  • Levin, Sand, Cho, Durand, Freeman, “Motion-Invariant Photography”, ACM SIGGRAPH 2008

Motion and Depth Invariance

  • Bando, Holtzman, Raskar, “Near-Invariant Blur for Depth and 2D Motion via Time-Varying Light Field Analysis”, ACM Trans. Graph. 2013
  • Bando, “An Analysis of Focus Sweep for Improved 2D Motion Invariance”, IEEE CVPR CCD Workshop 2013