Burst Photography ! EE367/CS448I: Computational Imaging and Display ! - - PowerPoint PPT Presentation

burst photography
SMART_READER_LITE
LIVE PREVIEW

Burst Photography ! EE367/CS448I: Computational Imaging and Display ! - - PowerPoint PPT Presentation

Burst Photography ! EE367/CS448I: Computational Imaging and Display ! stanford.edu/class/ee367 ! Lecture 7 ! Gordon Wetzstein ! Stanford University ! Motivation ! wikipedia ! exposure sequence ! -4 stops ! Motivation ! wikipedia ! exposure sequence


slide-1
SLIDE 1

Burst Photography!

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

slide-2
SLIDE 2

Motivation!

exposure sequence!

wikipedia!

  • 4 stops!
slide-3
SLIDE 3

Motivation!

exposure sequence!

wikipedia!

  • 2 stops!
slide-4
SLIDE 4

Motivation!

exposure sequence!

wikipedia! 2 stops!

slide-5
SLIDE 5

wikipedia! 4 stops!

slide-6
SLIDE 6

Motivation!

wikipedia! HDR! contrast reduction (scaling)!

slide-7
SLIDE 7

wikipedia! HDR! local tone mapping!

slide-8
SLIDE 8

Computational Photography - Overview

Debevec & Malik, 1997

  • high dynamic range
  • super-resolution
  • burst photography
  • focal stack
  • aperture stack
  • confocal stereo
  • blurry/noisy
  • flash/no flash
  • multi-flash
slide-9
SLIDE 9

High Dynamic Range Imaging!

  • !

dynamic range: ratio between brightest and darkest value!

  • !

quantization within that range is equally important ! ! from 8 bits (256 values) to 32 bits floating point!

  • riginal photo!

motion blurred photo! simulation from HDR! simulation from LDR!

Debevec & Malik, 1997!

slide-10
SLIDE 10

HDRI – Overview

  • estimate camera response curve
  • capture multiple low dynamic range (LDR) exposures
  • fuse LDR images into 32 bit HDR image
  • possibly convert to absolute radiance (global scaling)
  • application specific use:
  • image-based rendering lighting
  • tone mapping
slide-11
SLIDE 11

HDRI – Estimating the Response Curve

  • not required when working with linear RAW images
  • easiest option: use calibration chart
slide-12
SLIDE 12

HDRI – Estimating the Response Curve!

  • !

not required when working with linear RAW images !

  • !

easiest option: use calibration chart!

pixel value! 128! 255! 64! 196! known reflectance! 1

linear RAW!

slide-13
SLIDE 13

HDRI – Estimating the Response Curve!

  • !

not required when working with linear RAW images !

  • !

easiest option: use calibration chart!

pixel value! 128! 255! 64! 196! known reflectance! 1

e.g. JPEG!

slide-14
SLIDE 14

HDRI – Linearizing LDR Exposures!

  • !

capture exposure, apply lookup table!

pixel value! 128! 255! 64! 196! relative radiance! 1

e.g. JPEG!

I Ilin = f !1 I

( )

f !1 "

( )

slide-15
SLIDE 15

HDRI – Merging LDR Exposures

  • Image from Debevec & Malik, 1997
  • start with LDR image sequence Ii (only exposure time ti changes)
  • individual exposure is: , f is camera response function

Ii = f tiX

( )

slide-16
SLIDE 16

HDRI – Merging LDR Exposures

  • Image from Debevec & Malik, 1997
  • undo the camera response:

e.g. gamma function

Ilini = f −1 Ii

( )

f I

( ) = I1/γ

→ f −1 I

( ) = I γ

slide-17
SLIDE 17

HDRI – Merging LDR Exposures!

  • !

compute a weight (confidence) that a pixel is well-exposed ! ! (close to) saturated pixel = not confident, pixel in center of dynamic range = confident!! !

wij = exp !4 Ilinij ! 0.5

( )

2

0.52 " # $ $ % & ' '

  • r mean pixel value,!

e.g. 127.5 if I in [0, 255]!

slide-18
SLIDE 18

HDRI – Merging LDR Exposures

wij = exp −4 Ilinij − 0.5

( )

2

0.52 ⎛ ⎝ ⎜ ⎜ ⎞ ⎠ ⎟ ⎟

  • compute per-color-channel-per-LDR-pixel weights
slide-19
SLIDE 19

HDRI – Merging LDR Exposures

  • define least-squares objective function in log-space à perceptually

linear:

  • equate gradient to zero:
  • gives:

minimize O=

X

wi log Ilini

( )− log tiX

( )

( )

i

2

∂O ∂log X

( ) = 2

wi log Ilini

( )− log ti

( )− log X

( )

( )

i

= 0 X

! = exp

wi log Ilini

( )− log ti

( )

( )

i

wi

i

⎛ ⎝ ⎜ ⎜ ⎞ ⎠ ⎟ ⎟

slide-20
SLIDE 20

HDRI – Merging LDR Exposures!

  • !

define least-squares objective function in log-space ! perceptually linear:!

  • !

equate gradient to zero:!

  • !

gives:!

minimize O=

X

wi log Ilini

( )! log tiX

( )

( )

i

"

2

!O !log X

( ) = 2

wi log Ilini

( )" log ti

( )" log X

( )

( )

i

#

= 0 X

! = exp

wi log Ilini

( )! log ti

( )

( )

i

"

wi

i

"

# $ % % & ' ( (

slide-21
SLIDE 21

HDRI – Relative v Absolute Radiance!

  • !

LDR to HDR only gives relative radiance (HW4!)!

  • !

scale by reference radiance to get absolute!

! Image from Debevec & Malik, 1997!

slide-22
SLIDE 22
  • !

text!

Image-based Lighting with Light Probes!

Paul Debevec!

slide-23
SLIDE 23
  • !

single light probe covers light incident from (almost) entire hemisphere!!

Image-based Lighting with Light Probes!

slide-24
SLIDE 24

Paul Debevec, Renderign with Natural Light! SIGGRAPH Electronic Theater 1998!

Image Based Lighting!

slide-25
SLIDE 25

HDRI – Tone Mapping

  • how to display a high dynamic range image on an LDR display?
  • tone mapping: fit into luminance range of display (or 0-255), while

preserving image details

  • HW4
slide-26
SLIDE 26

HDRI – Tone Mapping

[Durand and Dorsey, 2002]

  • sun overexposed
  • foreground too dark
slide-27
SLIDE 27

HDRI – Global Tone Mapping

[Durand and Dorsey, 2002]

  • gamma correction:
  • colors are washed out

I = I γ

slide-28
SLIDE 28

HDRI – Global Tone Mapping

[Durand and Dorsey, 2002]

  • gamma in intensity
  • nly!
  • intensity details lost
slide-29
SLIDE 29

HDRI – Gradient-domain Tone Mapping!

  • !

compute gradients, scale them, integrate (Poisson eq.) !

[Fattal et al., 2002]!

HDR image (scaled)!

slide-30
SLIDE 30

HDRI – Gradient-domain Tone Mapping!

  • !

compute gradients, scale them, integrate (Poisson eq.) !

[Fattal et al., 2002]!

HDR image (scaled)! gradients!

slide-31
SLIDE 31

HDRI – Gradient-domain Tone Mapping!

tone mapped result! gradient attenuation map!

[Fattal et al., 2002]!

slide-32
SLIDE 32

Fast! Bilateral ! Filter!

HDRI – Tone Mapping with Bilateral Filter!

Detail! Color! Intensity! Large scale (base layer)! Reduce! contrast! Detail! Large scale! Color! Preserve!! Input HDR image! Output! [Durand and Dorsey, 2002]!

slide-33
SLIDE 33

HDRI – Tone Mapping with Bilateral Filter!

[Durand and Dorsey, 2002]!

Gradient-space [Fattal et al.]! Bilateral [Durand et al.]!

  • !

difference is not too big!

slide-34
SLIDE 34

HDRI – Tone Mapping with Bilateral Filter!

[Durand and Dorsey, 2002]!

Gradient-space [Fattal et al.]! Bilateral [Durand et al.]!

  • !

bilateral “looks” a bit better!

  • !

no ground truth ! it’s up to the user!

slide-35
SLIDE 35

HW4, Q1 & Q2

  • Q1: HDR image fusion (from series of different LDR exposures)
  • Q2: tone-map HDR image with
  • global gamma correction on all color channels
  • global gamma correction on intensity channel
  • local tone mapping with bilateral filter
slide-36
SLIDE 36

Burst Photography - Overview!

  • !

basic idea: capture and merge bursts of photos (2 or more):!

  • !

multiple exposures: HDR but also deblurring …!

  • !

multiple shifted low-res images: super-resolution!

  • !

focal stack!

  • !

aperture stack!

  • !

noisy + blurry: denoising + deblurring!

  • !

flash / no flash!

  • !

multi-flash!

  • multiple exposures: HDR but also deblurring …
slide-37
SLIDE 37

Pixel Super-Resolution

  • increase “pixel count”, not related to diffraction limit
  • idea: capture multiple low-res (LR) images and fuse them into a single

super-resolved (SR) image

Super-Resolution

[Ben-Ezra et al., 2004]

slide-38
SLIDE 38

Pixel Super-Resolution!

light l16!

slide-39
SLIDE 39

light l16!

slide-40
SLIDE 40

Pixel Super-Resolution!

  • !

LR must be sub-pixel shifted!

I1 I2 ISR I1 I2 ! " # # $ % & & = A1 A2 ! " # # $ % & & ISR

stacked, measured! LR images!

b A

!

downsampling &! phase shift!

!

slide-41
SLIDE 41

Pixel Super-Resolution!

I1 I2 ISR = ISR b A !

  • !

example for 1D scanline!

slide-42
SLIDE 42

Pixel Super-Resolution

  • in general: system is well-conditioned for non-integer pixel shifts and

super-resolution factors of 2-3x (don’t necessarily need priors)

  • HW 4, Q3: solve (large-scale) pixel super-resolution with gradient

descent to

minimize

ISR

1 2 AISR − b 2

2

slide-43
SLIDE 43

HW4 – Q3!

  • !

gradient descent:!

  • !

use matrix-free functions to implement matrix-vector multiplications!! !

x = x !"AT Ax ! b

( ) = x !"ATr

Ax() is already implemented, generate your

  • wn 4 low-res images, then

implement Atx() and solve!

ISR I1 ISR I2

SR

ISR I4

SR

ISR I3

SR

slide-44
SLIDE 44

Overview of Other Techniques

slide-45
SLIDE 45

Focal Stack!

focal stack! contributions! find highest gradient! all-in-focus image!

  • !

implemented in a range of products… !

wikipedia!

slide-46
SLIDE 46

Aperture Stack

  • what changes? exposure and depth of field – extract HDR & depth!

[Hasinoff and Kutulakos 2007] f/2 f/4 f/8 refocus front refocus rear layered depth map

slide-47
SLIDE 47

Confocal Stereo!

  • !

idea: intensity of in-focus point remains constant for varying aperture!

[Hasinoff and Kutulakos, 2006]!

slide-48
SLIDE 48

Confocal Stereo!

  • !

capture aperture and focal stack!

  • !

for each pixel: find focus setting where aperture stack is most invariant!

aperture !" focus f " ( aperture !i , focus fj )!

[Hasinoff and Kutulakos, 2006]!

slide-49
SLIDE 49

Confocal Stereo!

aperture !" focus f "

[Hasinoff and Kutulakos, 2006]!

photograph! estimated depth map!

slide-50
SLIDE 50

Low-res High-res Image Pair – Motion Deblurring!

Deblurred image! Blurred image! Tripod image (Ground Truth) ! slow, high-res camera! fast, low-res camera!

  • !

secondary, fast, noisy, low-res camera for motion PSF! estimation!

estimated motion blur!

[Ben-Ezra and Nayar, 2003]!

slide-51
SLIDE 51

Blurry / Noisy Image Pair – Motion Deblurring

  • same idea, but take two images with same camera
  • super short, high ISO noisy exposure for motion PSF estimation
  • longer exposure with camera shake à deblur

[Yuan et al., 2007]

slide-52
SLIDE 52

Blurry / Noisy Image Pair – Motion Deblurring!

[Yuan et al., 2007]!

iteratively motion PSFs!

slide-53
SLIDE 53

Flash / No-flash Image Pair!

with flash: not noisy! without flash: noisy, but nice colors! combined!

[Pettschnigg et al., 2004]!

slide-54
SLIDE 54

Flash / No-flash Image Pair!

no flash! extract details ! (e.g. bilateral filter)!

[Pettschnigg et al., 2004]!

flash! denoised w/! bilateral filter!

slide-55
SLIDE 55

Multi-flash Photography!

[Raskar et al., 2004]!

slide-56
SLIDE 56

Multi-flash Photography!

[Raskar et al., 2004]!

slide-57
SLIDE 57

Multi-flash Photography!

[Raskar et al., 2004]!

slide-58
SLIDE 58

Multi-flash Photography!

?!

[Raskar et al., 2004]!

slide-59
SLIDE 59

Multi-flash Photography!

Canny Intensity ! Edge Detection! Multi-Flash! Photo! Multi-Flash ! Overlay!

[Raskar et al., 2004]!

slide-60
SLIDE 60

Multi-flash Photography!

[Raskar et al., 2004]!

slide-61
SLIDE 61

Multi-flash Photography!

[Raskar et al., 2004]!

slide-62
SLIDE 62

Multi-flash Photography!

[Raskar et al., 2004]!

slide-63
SLIDE 63

Multi-flash Photography!

[Raskar et al., 2004]!

slide-64
SLIDE 64

Multi-flash Photography!

[Raskar et al., 2004]!

slide-65
SLIDE 65

Multi-flash Photography!

[Raskar et al., 2004]!

slide-66
SLIDE 66

Multi-flash Photography!

Multi-Flash! Canny!

[Raskar et al., 2004]!

slide-67
SLIDE 67

Computational Photography - Overview

Debevec & Malik, 1997

  • high dynamic range
  • super-resolution
  • focal stack
  • aperture stack
  • confocal stereo
  • blurry/noisy
  • flash/no flash
  • multi-flash

à capture and fuse multiple images

slide-68
SLIDE 68

Next: Light Field Photography!

  • !

integral imaging!

  • !

plenoptic 1.0 v 2.0!

  • !

acquisition!

  • !

sequential!

  • !

multiplexing!

  • !

camera array!

  • !

refocus!

  • !

Fourier slice theorem!

slide-69
SLIDE 69

References and Further Reading

HDR

  • Mann, Picard “On Being ‘Undigital’ with Digital Cameras: Extending Dynamic Range by Combining Differently Exposed Pictures”, IS&T 1995
  • Debevec, Malik, “Recovering High Dynamic Range Radiance Maps from Photographs”, SIGGRAPH 1997

Debevec, Malik, “Recovering High Dynamic Range Radiance Maps from Photographs”, SIGGRAPH 1997

  • Robertson, Borman, Stevenson, “Estimation-Theoretic approach to Dynamic Range Improvement Using Multiple Exposures”, Journal of Electronic Imaging 2003
  • Mitsunaga, Nayar, “Radiometric self Calibration”, CVPR 1999
  • Reinhard, Ward, Pattanaik, Debevec (2005). High dynamic range imaging: acquisition, display, and image-based lighting. Elsevier/Morgan Kaufmann
  • Fattal, Lischinski, Werman, “Gradient Domain High Dynamic Range Compression”, ACM SIGGRAPH 2002
  • Durand, Dorsey, “Fast Bilateral Filtering for the Display of High Dynamic Range Images”, ACM SIGGRAPH 2002

Durand, Dorsey, “Fast Bilateral Filtering for the Display of High Dynamic Range Images”, ACM SIGGRAPH 2002 Super-resolution

  • Baker, Kanade, Limits on super-resolution and how to break them“ IEEE Transactions on Pattern Analysis and Machine Intelligence 24(9), 1167–1183 (2002)
  • Ben-Ezra, Lin, Wilburn, Zhang,, “Penrose pixels for super-resolution” EEE Transactions on Pattern Analysis and Machine Intelligence 33(7), 1370–1383 (2011)
  • Ben-Ezra, Zomet, Nayar, “Jitter Camera: High Resolution Video from a Low Resolution Detector”, CVPR 2004

Ben-Ezra, Zomet, Nayar, “Jitter Camera: High Resolution Video from a Low Resolution Detector”, CVPR 2004

  • Ben-Ezra, Zomet, Nayar, “Video super-resolution using controlled subpixel detector shifts” IEEE Trans. PAMI27(6), 977–987 (2005)
  • Elad, Feuer, “Restoration of single super-resolution image from several blurred, noisy and down-sampled measured images” IEEE Trans. Im. Proc. 6(12), (1997)

Other

  • Ben-Ezra and Nayar, "Motion Deblurring using Hybrid Imaging”, CVPR 2003
  • Yuan, Sun, Quan, Shum, “Image Deblurring with Blurred/Noisy Image Pairs”, ACM SIGGRAPH 2007
  • Hasinoff, Kutulakos, “Confocal Stereo”, ECCV 2006
  • Hasinoff, Kutulakos, “A Layer-Based Restoration Framework for Variable-Aperture Photography”, ICCV 2007
  • Raskar, Tan, Feris, Yu, Turk, “Non-photorealistic Camera: Depth Edge Detection and Stylized Rendering using Multi-Flash Imaging”, ACM SIGGRAPH 2004
  • Pettschnigg, Agrawala, Hoppe, Szeliski, Cohen, Toyama, “Digital Photography with Flash and No-Flash Image Pairs”, ACM SIGGRAPH 2004
  • Eisemann, Durand, “Flash Photography Enhancement via Intrinsic Relighting”, ACM SIGGRAPH 2004