Lecture 21: Cameras & Lenses II Computer Graphics and Imaging UC Berkeley
Real Lens Designs Are Highly Complex [Apple] Topic o next lecture
Real Lens Elements Are Not Ideal Aberrations Real plano-convex lens (spherical surace shape). Lens does not converge rays to a point anywhere. More discussion next lecture
Today: Thin Lens Approximation
Ideal Thin Lens Focal Point Focal Point Credit: Karen Watson Focal Length Assume all parallel rays entering a lens pass through its ocal point.
Lens Focusing Conjugate Points Rays rom a point in object space intersect at a point in image space These are called conjugate points We create images ocused at a desired depth by placing a sensor at the conjugate distance Focusing involves changing the depth between the lens and sensor Object space Image space Question: what is the relationship between the position o a lens conjugate points?
Gauss Ray Diagrams
Gauss Ray Tracing Construction Parallel Ray Chie Ray Focal Ray Object Image
Gauss Ray Tracing Construction z o z i What is the relationship between conjugate depths z o,z i?
Gauss Ray Tracing Construction h o h o z i z o h i h i z o h o = h i h o = z i h i
Gauss Ray Tracing Construction z o h o = h i h o = z i h i h o h i = z o h o h i = z i z o = z i Object / image heights actor out - applies to all rays (z o )(z i )= 2 Newtonian Thin Lens Equation z o z i (z o + z i ) + 2 = 2 z o z i =(z o + z i ) 1 Gaussian Thin Lens Equation = 1 z i + 1 z o
The Thin Lens Equation z o z i 1 = 1 z i + 1 z o
Changing the Focus Distance 1 = 1 z i + 1 z o To ocus on objects at dierent distances, move the sensor Sensor relative to the lens For z i < z o the object is larger than the image At z i = z o we have 1:1 macro imaging For z i > z o the image is larger than the object (magniied) Can t ocus on objects closer than the lens ocal length
Magniication h o h i z o z i m = h i h o = z i z o
Magniication Example Focus at Ininity 1 = 1 z i + 1 z o m = z i z o I ocused on a distant mountain z o, so z i = sensor at ocal point magniication 0
Magniication Example Focus at 1:1 Macro 1 = 1 z i + 1 z o m = z i z o What coniguration do we need to achieve a magniication o 1 (i.e. image and object the same size, a.k.a. 1:1 macro)? Need z i = z o, so z i = z o = 2 - sensor at twice ocal length In 1:1 imaging, i the sensor is 36 mm wide, an object 36 mm wide will ill the rame
Thin Lens Demonstration http://graphics.stanord.edu/courses/cs178-10/applets/gaussian.html
Thin Lens Demonstration Observations 3D image o object is: Compressed in depth or low magniication 1:1 in 3D or unit magniication Stretched in depth or high magniication
Lens Perorms a 3D Perspective Transorm Lenses transorm a 3D object to a 3D image; the sensor extracts a 2D slice rom that image As an object moves linearly (in Z), its image moves non-proportionally (in Z). And vice versa. As you change ocus o a camera, the image changes size!
Deocus Blur
Circle o Conusion
Circle o Conusion Further deocused point light Closer deocused point light
Circle o Conusion Deocus blur kernel or objects at this depth Deocus blur kernel or objects at this depth Size o blur kernel depends on depth rom ocal plane. Only see the blur kernel itsel i you have a point light. Why?
Circle o Conusion
Computing Circle o Conusion Diameter (C) z 0 s z s z o z i d! A C Object Focal Plane Image Sensor Plane Circle o conusion is proportional to the size o the aperture C A = d0 = z s z i z i z i
Deinition: F-Number (a.k.a. F-Stop) The F-Number o a lens is deined as the ocal length divided by the diameter o the aperture Common F-stops on real lenses: 1.4, 2, 2.8, 4.0, 5.6, 8, 11, 16, 22, 32 1 stop doubles exposure An -stop o 2 is sometimes written /2, relecting the act that the absolute aperture diameter (A) can be computed by dividing ocal length () by the relative aperture (N).
Example F-Stop Calculations D = 50 mm = 100 mm N = /D =2 D = 100 mm = 200 mm N = /D =2 D = 100 mm = 400 mm N = /D =4
Circle o Conusion is Inversely Proportional to F-Stop R. Berdan, canadiannaturephotographer.com C = A z s z i z i = N z s z i z i
Circle o Conusion Example 50mm /2 lens Full rame sensor (36x24mm) Focus: 1 meter Background: 10 meter Foreground: 0.3 meter A = 50mm/2 = 25mm 1 z s = 1/50 1/1000 52.63mm 1 Background: z i = 1/50 1/10,000 50.25mm C = A z s z i /z i =1.18mm 1 Foreground: z i = 1/50 1/300 55.56mm C = A z s z i /z i =3.07mm C = A z s z i z i ~65 pixels on HD TV ~169 pixels on HD TV
Circle o Conusion in Perspective Composition To maintain ield o view on subject, increase distance 16 mm (110 ) rom subject by same actor as ocal length 200 mm (12 ) (approx). What is the increase in background blur?
Circle o Conusion in Perspective Composition For subject at distance Z, 1 1 To maintain image size o subject when z s = 1 Z Distant background means z i =, changing zoom, increase distance C = N z s z i = N 1 1/ 1/Z =... rom subject z i by same actor as = N ocal length Z (approx). What is the increase in background blur? I we increase Z and by actor K, circle o conusion C also increases by K. (F-stop held constant)
Circle o Conusion in Perspective Composition 100mm, /4 138px 28mm, /4 40px From Paul van Walree, toothwalker.org/do.html As predicted, 100mm 28mm 138px 40px, but notice blur is constant relative to background object itsel!
Ray Tracing Ideal Thin Lenses
Examples o Renderings with Lens Focus Pharr and Humphreys
Ray Tracing or Deocus Blur (Thin Lens) x x x Sensor Subject plane z o z i Setup: Choose sensor size, lens ocal length and aperture size Choose depth o subject o interest z o Calculate corresponding depth o sensor z i rom thin lens equation (ocusing)
Ray Tracing or Deocus Blur (Thin Lens) x x x Sensor Subject plane z o z i To compute value o pixel at position x by Monte Carlo integration: Select random points x on lens plane Rays pass rom point x on image plane z i through points x on lens Each ray passes through conjugate point x on the plane o ocus z o Can determine x rom Gauss ray diagram So just trace ray rom x to x Estimate radiance on rays using path-tracing, and sum over all points x
Examples o Renderings with Lens Focus Pharr and Humphreys
Example o Rendering with Lens Focus Credit: Bertrand Benoit. Sweet Feast, 2009. [Blender /VRay]
Example o Rendering with Lens Focus Credit: Giuseppe Albergo. Colibri [Blender]
Acknowledgments Many thanks to Marc Levoy, who created many o 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