C OMPUTATIONAL A SPECTS OF D IGITAL P HOTOGRAPHY P HOTOGRAPHY Image - - PowerPoint PPT Presentation

c omputational a spects of
SMART_READER_LITE
LIVE PREVIEW

C OMPUTATIONAL A SPECTS OF D IGITAL P HOTOGRAPHY P HOTOGRAPHY Image - - PowerPoint PPT Presentation

CS 89.15/189.5, Fall 2015 C OMPUTATIONAL C OMPUTATIONAL A SPECTS OF D IGITAL P HOTOGRAPHY P HOTOGRAPHY Image Formation & Camera Basics (continued) Wojciech Jarosz wojciech.k.jarosz@dartmouth.edu Agenda Pinhole optics (Simplified) Lenses


slide-1
SLIDE 1

Image Formation & Camera Basics (continued)

COMPUTATIONAL ASPECTS OF DIGITAL PHOTOGRAPHY

Wojciech Jarosz wojciech.k.jarosz@dartmouth.edu

COMPUTATIONAL PHOTOGRAPHY

CS 89.15/189.5, Fall 2015

slide-2
SLIDE 2

Agenda

Pinhole optics (Simplified) Lenses Exposure

  • shutter speed
  • aperture
  • ISO

Image processing basics

CS 89/189: Computational Photography, Fall 2015 2

slide-3
SLIDE 3

Pinhole camera / camera obscura

CS 89/189: Computational Photography, Fall 2015 3

slide-4
SLIDE 4

Abelardo Morell

slide-5
SLIDE 5

Pinhole cameras everywhere

CS 89/189: Computational Photography, Fall 2015 5

[Nils van der Burg]

After a slide by Steve Seitz

slide-6
SLIDE 6

CS 89/189: Computational Photography, Fall 2015

Another way to make a pinhole camera

6

http://www.debevec.org/Pinhole/

After a slide by Alyosha Efros

slide-7
SLIDE 7

2mm 1mm 0.6mm 0.35mm 0.15mm 0.07mm

slide-8
SLIDE 8
slide-9
SLIDE 9

CS 89/189: Computational Photography, Fall 2015

Replacing pinholes with lenses

9 From Photography, London et al.

slide-10
SLIDE 10

CS 89/189: Computational Photography, Fall 2015

Modern camera: 3 variables

10

turn to focus turn to adjust aperture turn to adjust
 shutter speed

After a slide by Steve Marschner

slide-11
SLIDE 11

All rays passing through a single point yo on a plane at distance Do in front of the lens will pass through a single point yi at distance Di behind the lens.

1 Di

+ 1

Do

= 1

f

Thin lens formula

CS 89/189: Computational Photography, Fall 2015 11 After a slide by Frédo Durand

Do yo yi f Di

slide-12
SLIDE 12

Lenses gather more light, but…

Only one plane in focus Focus by moving sensor/film Cannot focus infinitely close

CS 89/189: Computational Photography, Fall 2015 12 After a slide by Frédo Durand

slide-13
SLIDE 13

Focus distance & FOV (lens breathing)

https://youtu.be/tS87bYD5kiM

slide-14
SLIDE 14

CS 89/189: Computational Photography, Fall 2015

Focal length & sensor size impact FOV

14

Film/sensor scene s focal length f FOV

FOV = 2 arctan ✓ s 2f ◆

tree image: NRC Canada

focal plane

slide-15
SLIDE 15

CS 89/189: Computational Photography, Fall 2015

Changing focal length = cropping

15 Andrew McWilliams

slide-16
SLIDE 16

Focal length & sensor size

What happens when the film is half the size? Application:

  • Real film is 36x24mm
  • On the 10D, the sensor is 22.5 x 15.0 mm
  • Crop/conversion factor on the 10D?

CS 89/189: Computational Photography, Fall 2015 16

pinhole Film/ sensor scene f Do ½ s

After a slide by Frédo Durand

slide-17
SLIDE 17

https://lensvid.com/technique/why-depth-of-field-is-not-effected-by-sensor-size-a-demonstration/

slide-18
SLIDE 18

Chromatic Aberrations

Refraction angle depends on wavelength! All colors won’t converge to the same point

CS 89/189: Computational Photography, Fall 2015 18 (wikipedia)

slide-19
SLIDE 19

(wikipedia) (wikipedia) (wikipedia)

slide-20
SLIDE 20

Spherical lenses

two roughly fitting curved surfaces ground together will eventually become spherical spheres don’t bring parallel rays to a point!

  • this is called spherical aberation
  • nearly axial rays behave best

CS 89/189: Computational Photography, Fall 2015 20 hyperbolic lens spherical lens (wikipedia)

(Hecht)

After a slide by Marc Levoy

slide-21
SLIDE 21

CS 89/189: Computational Photography, Fall 2015

Examples of spherical aberration

21

(gtmerideth) (Canon)

After a slide by Marc Levoy Canon 135mm soft focus lens

slide-22
SLIDE 22

CS 89/189: Computational Photography, Fall 2015

Questions?

22

slide-23
SLIDE 23

Exposure

Get the right amount of light to sensor/film Two main parameters:

  • Shutter speed
  • Aperture (area of lens)

+ sensor/film sensitivity (ISO)

CS 89/189: Computational Photography, Fall 2015 23

slide-24
SLIDE 24

Exposure

Exposure = Irradiance x Time Exposure time

  • in seconds
  • controlled by shutter

Irradiance

  • amount of light falling on a unit area of sensor per second
  • controlled by aperture

CS 89/189: Computational Photography, Fall 2015 24 After a slide by Marc Levoy

slide-25
SLIDE 25

Shutter speed

Controls how long the film/sensor is exposed Pretty much linear effect on exposure (until sensor saturates) Denoted in fractions of a second:

  • 1/30 s, 1/60 s, 1/125 s, 1/250 s, 1/500 s
  • See a pattern?

On a normal lens, normal humans can hand-hold down to 1/60

  • In general, the rule of thumb says that the limit is the inverse of

focal length, e.g. 1/500s for 500mm

CS 89/189: Computational Photography, Fall 2015 25

slide-26
SLIDE 26

Main effect of shutter speed

Motion blur Doubling exposure time doubles motion blur (const. velocity)

CS 89/189: Computational Photography, Fall 2015 26 From Photography, London et al.

slide-27
SLIDE 27

CS 89/189: Computational Photography, Fall 2015

Rolling shutter

27

Jonen, Wikimedia Commons Rich Pollet

slide-28
SLIDE 28

Exposure

Exposure = Irradiance x Time Exposure time

  • in seconds
  • controlled by shutter

Irradiance

  • amount of light falling on a unit area of sensor per second
  • controlled by aperture

CS 89/189: Computational Photography, Fall 2015 28

slide-29
SLIDE 29

CS 89/189: Computational Photography, Fall 2015

Aperture

29

Lens Sensor Focal plane

slide-30
SLIDE 30

CS 89/189: Computational Photography, Fall 2015

Aperture

30

Lens Sensor Focal plane

slide-31
SLIDE 31

Aperture

Diameter of the lens opening (controlled by diaphragm) Irradiance on sensor is proportional to

  • square of aperture diameter A
  • inverse square of distance to sensor (~ focal length f)

As diameter A of the aperture doubles, its area (hence the light that can get through it) increases by 4x. (circle area: πA2) If the distance to sensor is doubled, light projects onto an area 4x larger, so light falling per unit area decreases by 4x

CS 89/189: Computational Photography, Fall 2015 31 After a slide by Marc Levoy

slide-32
SLIDE 32

F-number

So that aperture values give irradiance regardless of focal length, aperture number N is defined relative to focal length A relative aperture size (also F-number or just N) of N=2 is denoted “f/2” to reflect the above formula.

  • f/2.0 on a 50mm means that the aperture is 25 mm
  • f/2.0 on a 100mm means that the aperture is 50 mm

CS 89/189: Computational Photography, Fall 2015 32

N = f A

After a slide by Marc Levoy

A = f N

slide-33
SLIDE 33

CS 89/189: Computational Photography, Fall 2015

low F-number with long focal length

33 After a slide by Alyosha Efros

slide-34
SLIDE 34

F-number

Disconcerting: small f-number = big aperture What happens to the area of the aperture when going 
 from f/2.0 to f/4.0? Typical f numbers are

  • f/2.0, f/2.8, f/4, f/5.6, f/8, f/11, f/16, f/22, f/32
  • See a pattern?
  • aperture area gets halved in each step (1 f-stop)
  • f-number doubles every other step

CS 89/189: Computational Photography, Fall 2015 34

divided by 4 (square of f-number ratio)

slide-35
SLIDE 35

Youtube tutorial

https://youtu.be/KmNIouLByJQ

CS 89/189: Computational Photography, Fall 2015 35

slide-36
SLIDE 36

Depth of field

Main effect of aperture

CS 89/189: Computational Photography, Fall 2015 36 From Photography, London et al.

slide-37
SLIDE 37

source: flickr

Depth-of-Field

slide-38
SLIDE 38

CS 89/189: Computational Photography, Fall 2015

In focus

38

Lens Focal plane

slide-39
SLIDE 39

CS 89/189: Computational Photography, Fall 2015

Out-of-focus blur

39

Lens Focal plane circle of confusion: c

http://en.wikipedia.org/wiki/Circle_of_confusion

slide-40
SLIDE 40

CS 89/189: Computational Photography, Fall 2015

Out-of-focus blur

40

Lens Focal plane circle of confusion: c

http://en.wikipedia.org/wiki/Circle_of_confusion

slide-41
SLIDE 41

CS 89/189: Computational Photography, Fall 2015

Depth of field

41

Lens Focal plane depth


  • f field

circle of confusion: c

http://en.wikipedia.org/wiki/Circle_of_confusion

slide-42
SLIDE 42

CS 89/189: Computational Photography, Fall 2015

Circle of confusion

42

Lens Focal plane circle of confusion: c

D A c = A · |D − D1| D

·

f D1 − f f D1

http://en.wikipedia.org/wiki/Circle_of_confusion

slide-43
SLIDE 43

CoC is linear with aperture diameter DoF is linear with F-number f/2.8 f/32

slide-44
SLIDE 44

source: onebigphoto.com

Why does this look like a miniature?

slide-45
SLIDE 45

F-number of the Human Eye?

http://www.petapixel.com/2012/06/11/whats-the-f-number-of-the-human-eye/

CS 89/189: Computational Photography, Fall 2015 45

slide-46
SLIDE 46

What happens when we close the aperture by two stop?

Depth of field

CS 89/189: Computational Photography, Fall 2015 46

Lens Sensor Focal plane

slide-47
SLIDE 47

What happens when we close the aperture by two stop?

  • Aperture diameter is divided by two
  • Depth of field is doubled

Depth of field

CS 89/189: Computational Photography, Fall 2015 47

Lens Sensor Focal plane

slide-48
SLIDE 48

Depth of field

lower N means a wider aperture & less depth of field

CS 89/189: Computational Photography, Fall 2015 48 From Photography, London et al.

N = f A A = f N

slide-49
SLIDE 49

source: wikipedia

Depth-of-Field (Bokeh)

slide-50
SLIDE 50

Depth-of-Field (Bad Bokeh)

source: wikipedia

slide-51
SLIDE 51

Depth-of-Field (Bokeh)

source: pptbackgrounds.net

slide-52
SLIDE 52
slide-53
SLIDE 53

Bokeh (Cat’s Eyes)

source: flickr

slide-54
SLIDE 54

Bokeh (Cat’s Eyes)

source: flickr

slide-55
SLIDE 55

CS 89/189: Computational Photography, Fall 2015

Cat’s Eyes

55

source: toothwalker.org

slide-56
SLIDE 56

Questions?

CS 89/189: Computational Photography, Fall 2015 56

slide-57
SLIDE 57

Exposure

CS 89/189: Computational Photography, Fall 2015 57 From Photography, London et al.

Two main parameters:

  • Aperture (in f stop)
  • Shutter speed (in fraction of a second)

Reciprocity

  • Amount of light captured stays the same if exposure is

doubled and aperture area is halved (or vice versa)

Hence square-root of two progression of f stops vs. power of two progression of shutter speeds Reciprocity can fail for very long exposures

slide-58
SLIDE 58

Assume we know how much light we need We have an infinite choice of shutter speed/aperture pairs What will guide our choice of a shutter speed?

  • Freeze motion vs. motion blur, camera shake

What will guide our choice of an aperture?

  • Depth of field, diffraction limit

Reciprocity

CS 89/189: Computational Photography, Fall 2015 58

slide-59
SLIDE 59

From Photography, London et al.

slide-60
SLIDE 60

Analog

http://www.nzeldes.com/HOC/Posographe.htm

CS 89/189: Computational Photography, Fall 2015 60

slide-61
SLIDE 61
slide-62
SLIDE 62

Sensitivity (ISO)

Third variable for exposure Linear effect (200 ISO needs half the light as 100 ISO) Film: trade sensitivity for grain Digital: trade sensitivity for noise

CS 89/189: Computational Photography, Fall 2015 62

slide-63
SLIDE 63
slide-64
SLIDE 64

Conclusions

Simple camera model

  • Thin lens, aperture, shutter, sensor

Photographs often have undesired artifacts

  • Distortions, color artifacts, blur, noise, under/overexposure

Goal: develop algorithms to remove artifacts after image is captured

CS 89/189: Computational Photography, Fall 2015 64

72

slide-65
SLIDE 65

Slide credits

Steve Marschner Alyosha Efros Frédo Durand Marc Levoy Matthias Zwicker

  • London, Stone, and Upton, Photography (9th ed.), Prentice Hall,

2008.

  • Kingslake, R. Optics in Photography, SPIE Press, 1992.

CS 89/189: Computational Photography, Fall 2015 65