Beruflich Dokumente
Kultur Dokumente
Christiaan Huygens
(Hecht)
(Hecht)
xi sin θ i nt
✦ as waves change = =
xt sin θ t ni
speed at an interface,
they also change direction
speed of light in a vacuum
✦ index of refraction nr is defined as
speed of light in medium r
10 © Marc Levoy
Typical refractive indices (n)
✦ air = ~1.0
✦ water = 1.33
✦ glass = 1.5 - 1.8
(Hecht)
(Hecht)
A. a hyperbola
✦ so lenses should be hyperboloids!
13 © Marc Levoy
Spherical lenses
hyperbolic lens
Canon 135mm
soft focus lens
(gtmerideth) (Canon)
15 © Marc Levoy
Paraxial approximation
object image
P e P'
✦ assume e ≈ 0
object l image
h
u
P e P'
z
✦ assume e ≈ 0
✦ assume sin u = h / l ≈ u (for u in radians)
✦ assume cos u ≈ z / l ≈ 1
✦ assume tan u ≈ sin u ≈ u
17 © Marc Levoy
The paraxial approximation is
a.k.a. first-order optics
φ3 φ5 φ7
✦ assume first term of sin φ = φ − + − + ...
3! 5! 7!
• i.e. sin ϕ ≈ ϕ
φ2 φ4 φ6
✦ assume first term of cos φ = 1 − + − + ...
2! 4! 6!
• i.e. cos ϕ ≈ 1
• so tan ϕ ≈ sin ϕ ≈ ϕ
(phi in degrees)
18 © Marc Levoy
Paraxial focusing
i i'
object image
19 © Marc Levoy
Paraxial focusing
i = u+a Given object distance z,
u ≈ h/z i i' what is image distance z’ ?
u' ≈ h / z'
h r
u a u'
P (n) (n ') P'
z z'
n i ≈ n' i'
20 © Marc Levoy
Paraxial focusing
i = u+a a = u' + i'
u ≈ h/z i i' a ≈ h/r
u' ≈ h / z'
h r
u a u'
P (n) (n ') P'
z z'
n (u + a) ≈ n ' (a − u ')
n (h / z + h / r) ≈ n ' (h / r − h / z ')
21
✦ h has canceled out, so any ray from P will focus to P’ © Marc Levoy
Focal length
22
✦ f ≜ focal length = z’ © Marc Levoy
Lensmaker’s formula
✦ using similar derivations, one can extend these results to
two spherical interfaces forming a lens in air
so
si
(Hecht, edited)
24 © Marc Levoy
From Gauss’s ray construction
to the Gaussian lens formula
object image
yo
yi
so si
✦ positive si is rightward, positive so is leftward
✦ positive y is upward
25 © Marc Levoy
From Gauss’s ray construction
to the Gaussian lens formula
object image
yo
yi
so si
yi si
=
yo so
26 © Marc Levoy
y
From Gauss’s ray construction
to the Gaussian lens formula
f (positive is to right of lens)
object image
yo
yi
so si
yi si yi si − f 1 1 1
= and = ..... + =
yo so yo f so si f
27 © Marc Levoy
y
Changing the focus distance
f f
✦ to focus on objects
at different distances, sensor
move sensor relative to lens
(Flash demo) 1 1 1
+ =
http://graphics.stanford.edu/courses/
cs178/applets/gaussian.html so si f
28 © Marc Levoy
Changing the focus distance
f f
✦ to focus on objects
at different distances, sensor
move sensor relative to lens
✦ at so = si = 2 f
we have 1:1 imaging, because
1 1 1
+ =
2f 2f f
✦ at so = si = 2 f
we have 1:1 imaging, because
1 1 1
+ =
2f 2f f
31
Que s t ions? © Marc Levoy
Convex versus concave lenses
(Hecht)
rays from a convex lens converge rays from a concave lens diverge
rays from a convex lens converge rays from a concave lens diverge
35 © Marc Levoy
Combining two lenses
✦ using focal lengths
1 1 1
= +
ftot f1 f2
✦ using diopters
Ptot = P1 + P2
✦ example
1 1 1
+ = -or- 5.0 + 2.0 = 7.0 diopters
200mm 500mm 143mm
36 © Marc Levoy
Close-up filters
1/500mm = +2 diopters
(wikipedia)
Panasonic 45-200
• with the closeup filter and the same settings of focal length
and image distance, the in-focus object distance becomes
1 1
so = = = 334mm
1 1 1 1
− −
f si 143mm 250mm
39 © Marc Levoy
What I may have failed to make clear enough during lecture is, while the modified
Close-up filters
focal length of 143mm with the close-up filter does lie within the range already
offered by the 45-200mm zoom lens, with the filter you are achieving that focal
length while the lens is configured for 200mm. In that configuration, the barrel is
fully extended, producing an image distance si of 250mm, and (applying the Gaussian
lens formula) an object distance so of 334mm. If the lens without the closeup filter
were configured for this same focal length of 143mm the barrel would not be fully
extended, so the image distance would be less than 250mm (I don’t know how much
less - it depends on the lens mechanics), and the object distance would be longer than
334mm. Or if the lens without the closeup filter were configured for a focal length of
200mm, even though the barrel is fully extended and the image distance is 250mm,
the object distance would be 1000mm. Thus, the filter allows you to combine the
maximum barrel extension (hence the longest possible image distance) with an
other wise impossibly short object distance, producing higher magnification.
poor man’s
macro lens
40 © Marc Levoy
Magnification
object image
yo
yi
so si
yi si
MT ! = −
yo so
41 © Marc Levoy
Close-up filters
si 250 si 250
MT = − = = −1:4 MT = − = = − 3:4
so 1000 so 334
42 © Marc Levoy
Thick lenses
✦ an optical system may contain many lenses,
but can be characterized by a few numbers
(Smith)
43 © Marc Levoy
Center of perspective
Someone asked what the second nodal
point (N2) might be useful for. Florian
Kainz explains that it would be the
point around which you should rotate
a swing-lens panoramic camera,
where the film is bent into a cylinder. I
will talk about this exotic camera in
the last lecture of the course.
(Hecht)
• in a thin lens, the chief ray from a point traverses the lens
(through its optical center) without changing direction
• in a thick lens, the intersections of this ray
with the optical axis are called the nodal points
• for a lens in air, these coincide with the principal points
44
• the first nodal point is the center of perspective © Marc Levoy
Lenses perform a 3D perspective transform
(Flash demo)
http://graphics.stanford.edu/courses/
cs178/applets/thinlens.html
(Hecht)
47
Que s t ions? © Marc Levoy
Depth of field
(London)
f
N=
A
✦ lower N means a wider aperture and less depth of field
48 © Marc Levoy
How low can N be?
(Kingslake)
Stanley Kubrick,
Barry Lyndon,
1975
Stanley Kubrick,
Barry Lyndon,
1975
depth of
focus
object image
✦ DoF is asymmetrical around the in-focus object plane
✦ conjugate in object space is typically bigger than C © Marc Levoy
53
Depth of field formula
f
C CU
≈
MT f
depth of
field
C
depth of
focus
U
object image
✦ DoF is asymmetrical around the in-focus object plane
✦ conjugate in object space is typically bigger than C © Marc Levoy
54
Depth of field formula
f
C CU
≈
MT f
depth of
field
C
f
N depth of
focus
D2 D1
U
object image
D1 U − D1 NCU 2 NCU 2
= ..... D1 = 2 D2 = 2
CU / f f /N f + NCU f − NCU
55 © Marc Levoy
Depth of field formula
2NCU 2 f 2
DTOT = D1 + D2 = 4
f − N 2C 2U 2
2NCU 2
DTOT ≈
f2
✦ where
• N is F-number of lens
• C is circle of confusion (on image)
• U is distance to in-focus plane (in object space)
56
• f is focal length of lens © Marc Levoy
2NCU 2
DTOT ≈
f2
✦ N = f/4.1
C = 2.5µ
U = 5.9m (19’) ✦ 1 pixel on this video projector
f = 73mm (equiv to 362mm) C = 2.5µ × 2816 / 800 pixels
DTOT = 132mm DEFF = 464mm
✦ N = f/6.3
C = 2.5µ
U = 17m (56’) ✦ 1 pixel on this video projector
f = 27mm (equiv to 135mm) C = 2.5µ × 2816 / 800 pixels
DTOT = 12.5m (41’) DEFF = 44m (145’)
✦ N = f/5.6
C = 6.4µ
U = 0.7m ✦ 1 pixel on this video projector
f = 105mm C = 6.4µ × 5616 / 800 pixels
DTOT = 3.2mm DEFF = 11.2mm
Canon MP-E
65mm 5:1 macro
✦ N = f/2.8
C = 6.4µ
U = 78mm
f = 65mm
(use N’ = (1+MT)N at short conjugates (MT=5 here)) = f/16 (Mikhail Shlemov)
DTOT = 0.29mm!
Sidelight: macro lenses
1 1 1
+ =
so si f
Q. How can the Casio EX-F1 at 73mm and the Canon MP-E 65mm
macro, which have similar f ’s, have such different focusing distances?
so si
normal macro
✦ A. Because macro lenses are built to allow long si
• this changes so , which changes magnification M T ! − si / so
• macro lenses are also well corrected for aberrations at short so
61 © Marc Levoy
Extension tube: fits between camera and lens,
converts a normal lens to a macro lens
62
✦ camera hack by Katie Dektar (CS 178, 2009, dektar@)
© Marc Levoy
Extension tubes versus close-up filters
2NCU 2
DTOT ≈
f2
(Flash demo)
http://graphics.stanford.edu/courses/
cs178/applets/dof.html
f/2.8 f/32
65 © Marc Levoy
DoF is quadratic with subject distance
(London)
66 © Marc Levoy
Hyperfocal distance
✦ the back depth of field
NCU 2
D2 = 2
f − NCU ✦ N = f/6.3
C = 2.5µ × 2816 / 1920 pixels
✦ becomes infinite if U = 17m (56’)
f2 f = 27mm (equiv to 135mm)
U ≥ ! H DTOT = 18.3m on HD projector
NC H = 31.6m (104’)
✦ In that case, the front depth of field becomes
NCU 2 H (Flash demo)
D1 = 2 =
f + NCU 2 https://sites.google.com/a/google.com/
digital-photography/applets/depth-of-field
(London)
68 © Marc Levoy
Q. Does sensor size affect DoF?
2NCU 2
DTOT ≈
f2
(juzaphoto.com)
50mm f/4.8 200mm f/4.8,
71 moved back 4× from subject © Marc Levoy
Macro photography using a telephoto lens
(contents of whiteboard)
Canon 85mm
prime f/1.8 lens
(Fredo Durand)
✦ for a pixel focused on the subject, some of its rays will strike the occluder,
but some will pass to the side of it, if the occluder is small enough
✦ the pixel will then be a mixture of the colors of the subject and occluder
✦ thus, the occluder reduces the contrast of your image of the subject,
but it doesn’t actually block your view of it
83 © Marc Levoy
CONFIDENTIAL - DO NOT SHARE OUTSIDE GOOGLE
See http://graphics.stanford.edu/
courses/cs178/applets/dof.html
✦ useful sidelights
• bokeh refers to the appearance of small out-of-focus features
• you can take macro photographs using a telephoto lens
• depth of field blur is not the same as blurring an image
87
Que s t ions? © Marc Levoy