62
Computer Graphics and Imaging UC Berkeley CS184/284A, Spring 2016 Lecture 16: Cameras & Lenses I

Computer Graphics and Imaging UC Berkeley CS184/284A, Spring

  • Upload
    donhi

  • View
    236

  • Download
    2

Embed Size (px)

Citation preview

Page 1: Computer Graphics and Imaging UC Berkeley CS184/284A, Spring

Computer Graphics and Imaging UC Berkeley CS184/284A, Spring 2016

Lecture 16:

Cameras & Lenses I

Page 2: Computer Graphics and Imaging UC Berkeley CS184/284A, Spring

Image Capture Overview

Page 3: Computer Graphics and Imaging UC Berkeley CS184/284A, Spring

Ren Ng, Spring 2016CS184/284A, Lecture 16

What’s Happening Inside the Camera?

Cross-section of Nikon D3, 14-24mm F2.8 lens

Page 4: Computer Graphics and Imaging UC Berkeley CS184/284A, Spring

Ren Ng, Spring 2016CS184/284A, Lecture 16

Pinholes & Lenses Form Image on SensorLondon and Upton

Page 5: Computer Graphics and Imaging UC Berkeley CS184/284A, Spring

Ren Ng, Spring 2016CS184/284A, Lecture 16

Shutter Exposes Sensor For Precise Duration

The Slow Mo Guys, https://youtu.be/CmjeCchGRQo

Page 6: Computer Graphics and Imaging UC Berkeley CS184/284A, Spring

Ren Ng, Spring 2016CS184/284A, Lecture 16

Sensor Accumulates Irradiance During Exposure

Page 7: Computer Graphics and Imaging UC Berkeley CS184/284A, Spring

Ren Ng, Spring 2016CS184/284A, Lecture 16

Why Not Sensors Without Lenses?

Each sensor point would integrate light from all points on the object, so all pixel values would be similar

Lond

on an

d Up

ton

Page 8: Computer Graphics and Imaging UC Berkeley CS184/284A, Spring

Ren Ng, Spring 2016CS184/284A, Lecture 16

Image Processing: From Sensor Values to Image

Page 9: Computer Graphics and Imaging UC Berkeley CS184/284A, Spring

Pinhole Image Formation

Page 10: Computer Graphics and Imaging UC Berkeley CS184/284A, Spring

Ren Ng, Spring 2016CS184/284A, Lecture 3

A. H. Zewail, Phil. Trans. R. Soc. A 2010;368:1191-1204

Mo Tzu (c. 470–c. 390 BC)

Aristotle (384–322 BC)

Ibn al-Haytham (965–1040)

Shen Kuo (1031–1095)

Roger Bacon (c. 1214–1294)

Johannes Kepler (1571–1630)

Recall: Pinhole Camera (Camera Obscura)

Page 11: Computer Graphics and Imaging UC Berkeley CS184/284A, Spring

Ren Ng, Spring 2016CS184/284A, Lecture 3

Largest Pinhole Photographlegacyphotoproject.com“The Great Picture”

Page 12: Computer Graphics and Imaging UC Berkeley CS184/284A, Spring

Ren Ng, Spring 2016CS184/284A, Lecture 16

Largest Pinhole Photographlegacyphotoproject.com

Page 13: Computer Graphics and Imaging UC Berkeley CS184/284A, Spring

Ren Ng, Spring 2016CS184/284A, Lecture 16

Largest Pinhole Photographlegacyphotoproject.com

Page 14: Computer Graphics and Imaging UC Berkeley CS184/284A, Spring

Ren Ng, Spring 2016CS184/284A, Lecture 16

Largest Pinhole Photographlegacyphotoproject.com

Page 15: Computer Graphics and Imaging UC Berkeley CS184/284A, Spring

Ren Ng, Spring 2016CS184/284A, Lecture 16

Largest Pinhole Photographlegacyphotoproject.com

Page 16: Computer Graphics and Imaging UC Berkeley CS184/284A, Spring

Ren Ng, Spring 2016CS184/284A, Lecture 16

Largest Pinhole Photograph

Page 17: Computer Graphics and Imaging UC Berkeley CS184/284A, Spring

Field of View

Page 18: Computer Graphics and Imaging UC Berkeley CS184/284A, Spring

Ren Ng, Spring 2016CS184/284A, Lecture 16

Effect of Focal Length on FOV

For a fixed sensor size, decreasing the focal length increases the field of view.

FOV = 2 arctan

✓h

2f

Lens

Sensor

Focal lengthf

h

FOV = 2 arctan

✓h

2f

h

f

FOV = 2 arctan

✓h

2f

Page 19: Computer Graphics and Imaging UC Berkeley CS184/284A, Spring

Ren Ng, Spring 2016CS184/284A, Lecture 16

Focal Length v. Field of View

• For historical reasons, it is common to refer to angular field of view by focal length of a lens used on a 35mm-format film (36 x 24mm)

• Examples of focal lengths on 35mm format:

• 17mm is wide angle 104°

• 50mm is a “normal” lens 47°

• 200mm is telephoto lens 12°

• Careful! When we say current cell phones have approximately 28mm “equivalent” focal length, this uses the above convention. The physical focal length is often 5-6 times shorter, because the sensor is correspondingly smaller

Page 20: Computer Graphics and Imaging UC Berkeley CS184/284A, Spring

Ren Ng, Spring 2016CS184/284A, Lecture 16

Focal Length v. Field of View

From London and Upton, and Canon EF Lens Work III

Page 21: Computer Graphics and Imaging UC Berkeley CS184/284A, Spring

Ren Ng, Spring 2016CS184/284A, Lecture 16

Focal Length v. Field of View

From London and Upton, and Canon EF Lens Work III

Page 22: Computer Graphics and Imaging UC Berkeley CS184/284A, Spring

Ren Ng, Spring 2016CS184/284A, Lecture 16

Focal Length v. Field of View

From London and Upton, and Canon EF Lens Work III

Page 23: Computer Graphics and Imaging UC Berkeley CS184/284A, Spring

Ren Ng, Spring 2016CS184/284A, Lecture 16

Focal Length v. Field of View

From London and Upton, and Canon EF Lens Work III

Page 24: Computer Graphics and Imaging UC Berkeley CS184/284A, Spring

Wide angle: 18mm, 1/750, f/8

Page 25: Computer Graphics and Imaging UC Berkeley CS184/284A, Spring

Ren Ng, Spring 2016CS184/284A, Lecture 16Normal: 50mm, 1/80, f/1.4

Page 26: Computer Graphics and Imaging UC Berkeley CS184/284A, Spring

Ren Ng, Spring 2016CS184/284A, Lecture 16Normal: 64mm, 1/3200, f/2.8

Page 27: Computer Graphics and Imaging UC Berkeley CS184/284A, Spring

Ren Ng, Spring 2016CS184/284A, Lecture 16Telephoto: 150mm, 1/640, f/1.8

Page 28: Computer Graphics and Imaging UC Berkeley CS184/284A, Spring

Telephoto: 200mm, 1/200, f/2.8

Page 29: Computer Graphics and Imaging UC Berkeley CS184/284A, Spring

Telephoto: 420mm, 1/1600, f/4

Page 30: Computer Graphics and Imaging UC Berkeley CS184/284A, Spring

Ren Ng, Spring 2016CS184/284A, Lecture 16Telephoto: 420mm, 1.0s, f/4

Page 31: Computer Graphics and Imaging UC Berkeley CS184/284A, Spring

Ren Ng, Spring 2016CS184/284A, Lecture 16Telephoto: 420mm, 4.0s, f/4

Page 32: Computer Graphics and Imaging UC Berkeley CS184/284A, Spring

Ren Ng, Spring 2016CS184/284A, Lecture 16

Effect of Sensor Size on FOVObject

Lens

Sensor(s)

35mm Full Frame

APS-C

Page 33: Computer Graphics and Imaging UC Berkeley CS184/284A, Spring

Ren Ng, Spring 2016CS184/284A, Lecture 16

Sensor Sizes

Credit: lensvid.com

Page 34: Computer Graphics and Imaging UC Berkeley CS184/284A, Spring

Ren Ng, Spring 2016CS184/284A, Lecture 16

Maintain FOV on Smaller Sensor?

LensSmall Sensor

Lens

Large Sensor

To maintain FOV, decrease focal length of lens in proportion to width/height of sensor

Focal length

Shorterfocal

length

Page 35: Computer Graphics and Imaging UC Berkeley CS184/284A, Spring

Perspective Composition (Photographer’s Mindset)

Page 36: Computer Graphics and Imaging UC Berkeley CS184/284A, Spring

Ren Ng, Spring 2016CS184/284A, Lecture 16

Perspective Composition – Camera Position / Focal Length

In this sequence, distance from subject increases with focal length to maintain image size of human subject.

Notice the dramatic change in background perspective.

From Canon EF Lens Work III

Page 37: Computer Graphics and Imaging UC Berkeley CS184/284A, Spring

Ren Ng, Spring 2016CS184/284A, Lecture 16

Perspective Composition

16 mm (110°)

Up close and zoomed widewith short focal length

Page 38: Computer Graphics and Imaging UC Berkeley CS184/284A, Spring

Ren Ng, Spring 2016CS184/284A, Lecture 16

Perspective Composition

200 mm (12°)

Walk back and zoom inwith long focal length

Page 39: Computer Graphics and Imaging UC Berkeley CS184/284A, Spring

Dolly-Zoom Cinema Technique – “Vertigo Effect”

First used by Alfred Hitchcock in “Vertigo” 1958

Page 40: Computer Graphics and Imaging UC Berkeley CS184/284A, Spring

Dolly-Zoom Cinema Technique – a.k.a. “Vertigo Effect”

By Steven Spielberg in “Jaws” 1975

Page 41: Computer Graphics and Imaging UC Berkeley CS184/284A, Spring

Ren Ng, Spring 2016CS184/284A, Lecture 16

A Photographer’s Mindset

“Choose your perspective before you choose your lens.”

— Ming Thein, mingthein.com

Page 42: Computer Graphics and Imaging UC Berkeley CS184/284A, Spring

Exposure

Page 43: Computer Graphics and Imaging UC Berkeley CS184/284A, Spring

Ren Ng, Spring 2016CS184/284A, Lecture 16

Exposure

• H = T x E

• Exposure = time x irradiance

• Exposure time (T)

• Controlled by shutter

• Irradiance (E)

• Power of light falling on a unit area of sensor

• Controlled by lens aperture and focal length

Page 44: Computer Graphics and Imaging UC Berkeley CS184/284A, Spring

Ren Ng, Spring 2016CS184/284A, Lecture 16

Focal Plane Shutter (1/25 Sec Exposure)

The Slow Mo Guys, https://youtu.be/CmjeCchGRQo

Page 45: Computer Graphics and Imaging UC Berkeley CS184/284A, Spring

Ren Ng, Spring 2016CS184/284A, Lecture 16

Focal Plane Shutter (Fast Exposures)

The Slow Mo Guys, https://youtu.be/CmjeCchGRQo

Page 46: Computer Graphics and Imaging UC Berkeley CS184/284A, Spring

Ren Ng, Spring 2016CS184/284A, Lecture 16

Electronic Rolling Shutter

The Slow Mo Guys, https://youtu.be/CmjeCchGRQo

Page 47: Computer Graphics and Imaging UC Berkeley CS184/284A, Spring

Ren Ng, Spring 2016CS184/284A, Lecture 16

Other Shutter Systems

Also have leaf shutters

• Circular iris that closes

Global electronic shutter

• Different circuit design that exposes all pixels with the same time duration

Mixtures of physical and electronic shutter

• E.g. Electronic reset starts exposure, physical shutter closing ends exposure

London

Page 48: Computer Graphics and Imaging UC Berkeley CS184/284A, Spring

Ren Ng, Spring 2016CS184/284A, Lecture 16

Shutter Speed

Controls how long the sensor is exposed to light

• Linear effect on exposure until sensor saturates Denoted in fractions of a second:

• 1/4000, 1/2000, 1/1000, 1/500, 1/125, 1/60, 1/30, 1/15, 1/8, 1/4, 1/2, 1, 2, 4, 8, 15, 30s

Blur due to hand-shake is a concern for hand-held shots:

• Rule of thumb: longest hand-held exposure = 1 / f

• e.g. 1/180 second for a 180mm lens (35 mm equiv.)

Page 49: Computer Graphics and Imaging UC Berkeley CS184/284A, Spring

Ren Ng, Spring 2016CS184/284A, Lecture 16

Main Side Effect of Shutter Speed

Motion blur Doubling shutter time doubles motion blur

London

Page 50: Computer Graphics and Imaging UC Berkeley CS184/284A, Spring

Ren Ng, Spring 2016CS184/284A, Lecture 16

Sensor Irradiance

• As the diameter D of the aperture doubles, its area (hence the light that can get through it) increases by 4x.

• Each point on the lens emanates light angularly (cone in 2nd drawing), and its contribution to sensor irradiance falls off as the square of the distance (radiometry review)

• If the distance to the sensor is doubled, the irradiance on the sensor decreases by 4×.

N =f

D

Area = ⇡(D/2)2

Sensor

Lens + Aperture

Page 51: Computer Graphics and Imaging UC Berkeley CS184/284A, Spring

Ren Ng, Spring 2016CS184/284A, Lecture 16

Aperture Value (a.k.a. F-Number, F-Stop)

• Irradiance on sensor is proportional to

• Square of lens aperture diameter D

• Inverse square of distance from lens to sensor (~focal length f)

• So that aperture values give irradiance regardless of focal length, aperture number N (a.k.a. f-number) is defined relative to focal length:

• An f-stop of 2 is sometimes written f/2, reflecting the fact that the absolute aperture (A) can be computed by dividing focal length (f) by the relative aperture (N).

• F-stops: 1.4, 2, 2.8, 4.0, 5.6, 8, 11, 16, 22, 32, 45, 64,

• 1 stop doubles exposure

N =f

D

Page 52: Computer Graphics and Imaging UC Berkeley CS184/284A, Spring

Ren Ng, Spring 2016CS184/284A, Lecture 16

Example F-Stop CalculationsD = 50mm

f = 100mm

N = f/D = 2

D = 100mm

f = 200mm

N = f/D = 2

D = 100mm

f = 400mm

N = f/D = 4

Page 53: Computer Graphics and Imaging UC Berkeley CS184/284A, Spring

Ren Ng, Spring 2016CS184/284A, Lecture 16

Camera Exposure Recap

• H = T x E

• Shutter

• Doubling the open time doubles H

• Increases motion blur

• Aperture

• Increasing one f-stop doubles H

• Decreases depth of field

Page 54: Computer Graphics and Imaging UC Berkeley CS184/284A, Spring

Ren Ng, Spring 2016CS184/284A, Lecture 16

Fastest Photography Lens F-Stop?

Hari Subramanyam, https://www.flickr.com/photos/dementedjesus/

Leica Noctilux-M 50mm f/0.95 ASPH Lens

Page 55: Computer Graphics and Imaging UC Berkeley CS184/284A, Spring

Ren Ng, Spring 2016CS184/284A, Lecture 16

Main Side-Effect of Aperture

Depth of field (range of object depths that are sharp) Increasing 2 f-stops doubles the depth of field More on this in a later lecture

Page 56: Computer Graphics and Imaging UC Berkeley CS184/284A, Spring

Ren Ng, Spring 2016CS184/284A, Lecture 16

f / 40.01 sec

f / 110.1 sec

f / 320.8 sec

Constant Exposure: Depth of Field vs Shutter Speed

• Photographers must trade off depth of field and motion blur for moving subjects

Page 57: Computer Graphics and Imaging UC Berkeley CS184/284A, Spring

Shallow Depth of Field Can Create a Stronger Image

From Peterson, Understanding Exposure 200mm, f/4, 1/1000 (left) and f/11, 1/125 (right)

Page 58: Computer Graphics and Imaging UC Berkeley CS184/284A, Spring

Motion Blur Can Help Tell The Story

From Peterson, Understanding Exposure 1/60, f/5.6, 180mm

Page 59: Computer Graphics and Imaging UC Berkeley CS184/284A, Spring

Ren Ng, Spring 2016CS184/284A, Lecture 16

ISO (Gain)

Third variable for exposure Film: trade sensitivity for grain Digital: trade sensitivity for noise

• Multiply signal before analog-to-digital conversion

• Linear effect (ISO 200 needs half the light as ISO 100)

More on this in a later lecture.

Page 60: Computer Graphics and Imaging UC Berkeley CS184/284A, Spring

Ren Ng, Spring 2016CS184/284A, Lecture 16

ISO Gain vs Noise in Canon T2iCredit: bobatkins.com

Page 61: Computer Graphics and Imaging UC Berkeley CS184/284A, Spring

Ren Ng, Spring 2016CS184/284A, Lecture 16

Things to Remember

Effect Cause Field of view Sensor size, focal length Depth of field Aperture, focal length, object dist. Exposure Aperture, shutter, ISOMotion blur ShutterGrain/noise ISO

Pinholes and lenses form perspective images Perspective composition, dolly zoom

Page 62: Computer Graphics and Imaging UC Berkeley CS184/284A, Spring

Ren Ng, Spring 2016CS184/284A, Lecture 16

Acknowledgments

Many thanks to Marc Levoy, who created many of these slides, and Pat Hanrahan.

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

• Peterson, Understanding Exposure, AMPHOTO 1990.

• The Slow Mo Guys

• bobatkins.com

• Hari Subramanyan

• Canon EF Lens Work III