Camera Simulation

Post on 30-Dec-2015

25 views 0 download

Tags:

description

Camera Simulation. References Photography, B. London and J. Upton Optics in Photography, R. Kingslake The Camera, The Negative, The Print, A. Adams. Topics. Ray tracing lenses Focus Field of view Depth of focus / depth of field Exposure. Lenses. Snell’s Law. Refraction. - PowerPoint PPT Presentation

transcript

University of Texas at Austin CS395T - Advanced Image Synthesis Spring 2007 Don Fussell

Camera Simulation

ReferencesPhotography, B. London and J. Upton

Optics in Photography, R. Kingslake

The Camera, The Negative, The Print, A. Adams

Effect Cause

Field of view Film size, stops and pupils

Depth of field Aperture, focal length

Motion blur Shutter

Exposure Film speed, aperture, shutter

University of Texas at Austin CS395T - Advanced Image Synthesis Spring 2007 Don Fussell

Topics

Ray tracing lenses

Focus

Field of view

Depth of focus / depth of field

Exposure

Lenses

University of Texas at Austin CS395T - Advanced Image Synthesis Spring 2007 Don Fussell

Refraction

I

′I

sin sinn I n I′ ′=

Snell’s Law

N

n n′

University of Texas at Austin CS395T - Advanced Image Synthesis Spring 2007 Don Fussell

Paraxial Approximation

0e ≈

Rays deviate only slightly from the axis

U

z

sin(U) ≈ U = u

tan(U) ≈ U = u

cos(U) ≈1

University of Texas at Austin CS395T - Advanced Image Synthesis Spring 2007 Don Fussell

Incident Ray

I

U φ−

φ= −I U

Angles: ccw is positive; cw is negative

The sum of the interior angles is equal to the exterior angle.

University of Texas at Austin CS395T - Advanced Image Synthesis Spring 2007 Don Fussell

Refracted Ray

− ′U′I

φ= −′ ′I U

φ− = + −′ ′( ) ( )I U

φ−

University of Texas at Austin CS395T - Advanced Image Synthesis Spring 2007 Don Fussell

Derivation

Paraxial approximationφ φ= − ⇒ = −I U i uφ φ= − ⇒ = −′ ′ ′ ′I U i u

University of Texas at Austin CS395T - Advanced Image Synthesis Spring 2007 Don Fussell

Derivation

Paraxial approximation

Snell’s Law= ⇒ =′ ′ ′ ′sin sinn I n I n i ni

φ φ= − ⇒ = −I U i uφ φ= − ⇒ = −′ ′ ′ ′I U i u

φ φ− = −′ ′( ) ( )n u n u

University of Texas at Austin CS395T - Advanced Image Synthesis Spring 2007 Don Fussell

Ray Coordinates

−z z′

Ru

φ− =h

R

φ− − ′u

=−h

uz

− =′′

hu

z

h

University of Texas at Austin CS395T - Advanced Image Synthesis Spring 2007 Don Fussell

Gauss’ Formula

Paraxial approximation to Snell’s Law

Ray coordinates

Thin lens equation

φ φ− = −′ ′( ) ( )n u n u

( ) ( )

( )

h h h hn n

z R z Rn n n n

z z R

′ − = −′

′ ′−= +

φ=−h

R=−′

′h

uz

=−h

uz

Holds for any height, any ray!

University of Texas at Austin CS395T - Advanced Image Synthesis Spring 2007 Don Fussell

Vergence

Vergence

Thin lens equation

Surface Power equation

⎡ ⎤≡ ≈ =⎢ ⎥⎣ ⎦

1n nV diopters

r z m

V V P′= +

< 0V =0V > 0V

≡ −′1

( )P n nR

Diverging Converging

University of Texas at Austin CS395T - Advanced Image Synthesis Spring 2007 Don Fussell

Lens-makers Formula

⎛ ⎞= − − =′ ⎜ ⎟⎝ ⎠1 2

1 1 1( )P n n

R R f

Converging Diverging

Refractive Power

University of Texas at Austin CS395T - Advanced Image Synthesis Spring 2007 Don Fussell

Conjugate Points

To focus: move lens relative to backplaneHorizontal rays converge on focal point in the focal plane

1 1 1

z z f= +

University of Texas at Austin CS395T - Advanced Image Synthesis Spring 2007 Don Fussell

Gauss’ Ray Tracing Construction

Parallel Ray

Focal RayChief Ray

Object Image

University of Texas at Austin CS395T - Advanced Image Synthesis Spring 2007 Don Fussell

Ray Tracing: Finite Aperture

Focal Plane Back PlaneAperture Plane

University of Texas at Austin CS395T - Advanced Image Synthesis Spring 2007 Don Fussell

Real Lens

Cutaway section of a Vivitar Series 1 90mm f/2.5 lensCover photo, Kingslake, Optics in Photography

University of Texas at Austin CS395T - Advanced Image Synthesis Spring 2007 Don Fussell

Double Gauss

Radius (mm) Thick (mm) nd V-no aperture

58.950 7.520 1.670 47.1 50.4

169.660 0.240 50.4

38.550 8.050 1.670 47.1 46.0

81.540 6.550 1.699 30.1 46.0

25.500 11.410 36.0

9.000 34.2

-28.990 2.360 1.603 38.0 34.0

81.540 12.130 1.658 57.3 40.0

-40.770 0.380 40.0

874.130 6.440 1.717 48.0 40.0

-79.460 72.228 40.0

Data from W. Smith, Modern Lens Design, p 312

University of Texas at Austin CS395T - Advanced Image Synthesis Spring 2007 Don Fussell

Ray Tracing Through Lenses

From Kolb, Mitchell and Hanrahan (1995)

200 mm telephoto

50 mm double-gauss

35 mm wide-angle

16 mm fisheye

University of Texas at Austin CS395T - Advanced Image Synthesis Spring 2007 Don Fussell

Thick Lenses

Refraction occurs at the principal planes

Equivalent Lens

Field of View

University of Texas at Austin CS395T - Advanced Image Synthesis Spring 2007 Don Fussell

Field of View

From London and Upton

University of Texas at Austin CS395T - Advanced Image Synthesis Spring 2007 Don Fussell

Field of View

From London and Upton

University of Texas at Austin CS395T - Advanced Image Synthesis Spring 2007 Don Fussell

Field of View

Field of view

Types of lensesNormal 26º

Film diagonal focal length

Wide-angle 75-90ºNarrow-angle 10º

Redrawn from Kingslake, Optics in Photography

tan2

fov filmsize

f=

University of Texas at Austin CS395T - Advanced Image Synthesis Spring 2007 Don Fussell

Perspective Transformation

Thin lens equation

Represent transformation as a 4x4 matrix

= + ⇒ =′+′

⇒ =′+

⇒ =′+

1 1 1 fzz

z z f z f

fxx

z f

fyy

z f

Depth of Field

University of Texas at Austin CS395T - Advanced Image Synthesis Spring 2007 Don Fussell

Depth of Field

From London and Upton

University of Texas at Austin CS395T - Advanced Image Synthesis Spring 2007 Don Fussell

Circle of Confusion

d′

a

c d s z

a z z

′ ′ ′−= =

′ ′

s′sz z′

c

Circle of confusion proportional to the size of the aperture

Focal Plane Back Plane

University of Texas at Austin CS395T - Advanced Image Synthesis Spring 2007 Don Fussell

Depth of Focus [Image Space]

Depth of focus Equal circles of confusion

Two planes: near and far

−′ ′ ′= =

′ ′f f

f f

d s zc

a z zc

a

fz

s

nz

c

′s

′fz

′nz′fd

−′ ′ ′= =

′ ′n n

n n

d z sc

a z z

′nd

University of Texas at Austin CS395T - Advanced Image Synthesis Spring 2007 Don Fussell

Depth of Focus [Image Space]

Depth of focus Equal circles of confusion

−′ ′ ′ ⎛ ⎞= = ⇒ = +⎜ ⎟⎝ ⎠′ ′ ′ ′1 1

1f f

f f f

d s zc c

a z z z s ac

a

fz

s

nz

c

′s

′fz

′nz′fd

−′ ′ ′ ⎛ ⎞= = ⇒ = −⎜ ⎟⎝ ⎠′ ′ ′ ′1 1

1n n

n n n

d z sc c

a z z z s a

′nd

University of Texas at Austin CS395T - Advanced Image Synthesis Spring 2007 Don Fussell

Depth of Focus [Image Space]

Depth of focus Equal circles of confusion

⎛ ⎞= +⎜ ⎟⎝ ⎠′ ′1 1

1f

c

z s a

c

′s′fz

′nz

⎛ ⎞= −⎜ ⎟⎝ ⎠′ ′1 1

1n

c

z s a

+ =′ ′ ′

1 1 12

f nz z s

− =′ ′ ′

1 1 2 1

f n

c

z z a s

University of Texas at Austin CS395T - Advanced Image Synthesis Spring 2007 Don Fussell

Depth of Field [Object Space]

Depth of field Equal circles of confusion

+ =1 1 1

2n fz z s

⎛ ⎞− = − ≈⎜ ⎟⎝ ⎠

1 1 2 1 1 2 1

n f

c c

z z a f s a f

= +′

1 1 1

f fz z f= +

′1 1 1

n nz z fc

fz

nz

c

= +′

1 1 1

s s f

University of Texas at Austin CS395T - Advanced Image Synthesis Spring 2007 Don Fussell

Hyperfocal Distance

c

fz

nz

cWhen

→ ⇒ = =∞,2n f

Hs H z z

H is the hyperfocal distance

+ =1 1 1

2n fz z s

N ≡f

a

1

zn

−1

z f

=2c

a

1

f= 2

cN

f 2≡ 2

1

H

University of Texas at Austin CS395T - Advanced Image Synthesis Spring 2007 Don Fussell

Depth of Field Scale

University of Texas at Austin CS395T - Advanced Image Synthesis Spring 2007 Don Fussell

Factors Affecting DOFFrom http://www.kodak.com/global/en/consumer/pictureTaking/cameraCare/cameCar6.shtml

= 2

1 cN

H f

University of Texas at Austin CS395T - Advanced Image Synthesis Spring 2007 Don Fussell

Resolving Power

Diffraction limit

35mm film (Leica standard)

CCD/CMOS pixel aperture

[ ]λ μ= = × ×1.22 1.22 64 .500 m=0.040mmf

ca

=0.025mmc

=0.0116mm (Nikon D1)c

Exposure

University of Texas at Austin CS395T - Advanced Image Synthesis Spring 2007 Don Fussell

Image Irradiance

f

2

2cos sin4

aE L d L L

f

πθ ω π θΩ

⎛ ⎞= = = ⎜ ⎟

⎝ ⎠∫

a

University of Texas at Austin CS395T - Advanced Image Synthesis Spring 2007 Don Fussell

Image Irradiancen̂

θ

φ

φ

ω

ω =π4

a2 cosφ

(z /cosφ)2=

π

4

a

z

⎝ ⎜

⎠ ⎟2

cos3 φSolid angle subtended by thelens, as seen by the patch A

ω

δP =LΩ δA cosθ = LδAπ

4

a

z

⎝ ⎜

⎠ ⎟2

cos3 φcosθPower from patch Athrough the lens

E =δP

δI=L

δA

δI

π

4

a

z

⎝ ⎜

⎠ ⎟2

cos3 φcosθIrradiance at thesensor element

δA

δI

a

f

z

University of Texas at Austin CS395T - Advanced Image Synthesis Spring 2007 Don Fussell

Image Irradiance

ˆ n

θ

φ

φ

δAcosθ

(z /cosφ)2=

δI cosφ

( f /cosφ)2

δA

δI=

cosφ

cosθ

z

f

⎝ ⎜

⎠ ⎟

2€

δI

δA

z

a

f

University of Texas at Austin CS395T - Advanced Image Synthesis Spring 2007 Don Fussell

Image Irradiance

E =δP

δI=L

δA

δI

π

4

a

z

⎝ ⎜

⎠ ⎟2

cos3 φcosθ

E = Lπ

4

a

f

⎝ ⎜

⎠ ⎟

2

cos4 φ

δA

δI=

cosφ

cosθ

z

f

⎝ ⎜

⎠ ⎟

2

E = Lπ

4

a

f

⎝ ⎜

⎠ ⎟

2

On axis

University of Texas at Austin CS395T - Advanced Image Synthesis Spring 2007 Don Fussell

Relative Aperture or F-Stop

F-Number and exposure:

Fstops: 1.4 2 2.8 4.0 5.6 8 11 16 22 32 45 641 stop doubles exposure

f

π= 2

1

4E L

N

=f

aN

a

University of Texas at Austin CS395T - Advanced Image Synthesis Spring 2007 Don Fussell

Camera Exposure

Exposure

Exposure overdeterminedAperture: f-stop - 1 stop doubles H

Decreases depth of field

Shutter: Doubling the open time doubles HIncreases motion blur

H E T= ×

University of Texas at Austin CS395T - Advanced Image Synthesis Spring 2007 Don Fussell

Aperture vs Shutter

From London and Upton

f/161/8s

f/41/125s

f/21/500s

University of Texas at Austin CS395T - Advanced Image Synthesis Spring 2007 Don Fussell

High Dynamic Range

Sixteen photographs of the Stanford Memorial Church taken at 1-stop increments from 30s to 1/1000s.From Debevec and Malik, High dynamic range photographs.

University of Texas at Austin CS395T - Advanced Image Synthesis Spring 2007 Don Fussell

Simulated Photograph

Adaptive histogram With glare, contrast, blur

University of Texas at Austin CS395T - Advanced Image Synthesis Spring 2007 Don Fussell

Camera Simulation

Sensor response

Lens

Shutter

Scene radiance

λ ω ω λ λ ω λΩ Λ

= •′ ′ ′ ′ ′ ′ ′∫∫∫∫r r

( , ) ( , , ) ( ( , , ), , ) ( )A T

R P x S x t L T x t dA x d dt d

ω ω λ= ′ ′( , ) ( , , )x T x

λ′( , )P x

( , , , )L x tω λω′ ′( , , )S x t

ω λ′ ′( , , , )L x tω λ( , , , )L x tA

Ω