Image Formation Reerence http://en.wikipedia.org/wiki/lens_(optics) Reading: Chapter 1, Forsyth & Ponce Optional: Section 2.1, 2.3, Horn. The slides use illustrations rom these books Some o the ollowing slides are editted version o the slides borrowed rom Marc Polleys, Sebastian Thrun, Marc Polleys, Fredo Durand Lecture Overview 7-year old s question Pinhole optics Lenses Projections Camera Why is there no image on a white piece o paper? It receives light rom all directions Pinhole From Photography, London et al. From Photography, London et al.
Camera Obscura Pinhole Sie Wandell, Foundations o Vision, Sinauer, 1995 Pinhole sie? Diraction limit Optimal sie or visible light: sqrt()/28 (in millimiters) where is ocal length From Photography, London et al. From Wandell Problem with pinhole? Not enough light! requires long exposure, may lead to motion blur Diraction limits sharpness Lecture Overview Pinhole optics Lenses Projections Camera SOLUTION Reraction Reraction is responsible or image ormation by lenses and the eye.
Lenses gather more light! But need to be ocused Reraction From Photography, London et al. Reraction is the bending o a wave when it enters a medium where it's speed is dierent. The reraction o light when it passes rom a ast medium to a slow medium bends the light ray toward the normal to the boundary between the two media. The amount o bending depends on the indices o reraction o the two media and is described quantitatively by Snell's Law. Snell s Law Thin Lens optical axis ocus n i -- is the index o reraction which is deined as the speed o light in vacuum divided by the speed o light in the medium. Spherical lense surace: Parallel rays are reracted to single point Thin Lens: Projection Thin Lens: Projection optical axis Image plane optical axis Image plane Spherical lense surace: Parallel rays are reracted to single point Spherical lense surace: Parallel rays are reracted to single point
Thin Lens: Properties Thin Lens Model Any ray entering a thin lens parallel to the optical axis must go through the ocus on other side Any ray entering through the ocus on one side will be parallel to the optical axis on the other side All rays going through the center are not deviated Hence same perspective as pinhole P X F l O F r x X = x x X = p x = X = X = 2 = Thin Lens Model Thin Lens Law Derivation X P F l Ẑ ẑ O F r = ( ˆ )( ˆ ) = x p 2 = X P F l Ẑ O 2 = ˆ 2 ( )( ˆ ) = ˆ ˆ 2 2 ˆ ( + ˆ) + = ˆ ˆ = ( ˆ + ˆ) ẑ 1 ˆ + ˆ 1 1 = = + ˆ ˆ ˆ ˆ F r x p The Thin Lens Law Minimum ocusing distance P Ẑ Q ẑ Focusing distance Rays rom ininity are in ocus when the ilm is at the ocal length 2 = O F r Rays rom ininity F l R 1 1 + = ˆ ˆ 1 p ilm An object at the ocal length requires the ilm to be at ininity. Rays rom object at
Focal length What happens when the ocal length is doubled? Projected object sie Amount o light gathered Field o view & ocal length What happens to the ield o view when one ocuses closer? It's reduced ield o view ilm ocused at ininity d 2 s Film/ pinhole scene ilm ocused close ield o view Focal length in practice Focal length changes subject sie 24mm 50mm Focal length: pinhole optics What happens when the ocal length is doubled? What happens when the scene is twice as ar? How do we get the same relative object sie when the ocal length is doubled? What is the dierence then? Is it equivalent to get closer and to oom in? d 2 2d 135mm s Film/ pinhole scene Change in ocal length & ocus distance Same sie oreground object by moving the ocus distance Dierent perspective (e.g. background) Change in ocal length & ocus distance Portrait: distortion with wide angle Why? ocus distance Wide angle Standard Telephoto
Depth o Field Depth o Field Source: wikipedia.org To Ways to Change the Depth o Field Change (distance o image plane to lens) - camera Deorm lens eye Apperture eye and camera Thin Lens: Depth o Field P P optical axis Image plane p p' Depends on ocusing distance Human Eye (Theodore D. Ruche and Harry C. Patton, Physiology and Biophysics, 19th ed. Saunders, Philadelphia,1965)
Focusing Through Lens Deormation Depends on ocal length Thin Lens: Aperture Aperture P optical axis Image plane p Large Aperture Reduces necessary exposure time Decreases depth o ield sometimes desired most pronounced with telephoto lenses Depth o ield What happens when we close the aperture by two stop? Aperture diameter is divided by two Depth o ield is doubled Diaphragm Point in ocus lens Object with texture
DoF Depends on aperture Our Aperture: Iris Source: www.cl.cam.ac.uk Convex and concave lenses Limits o the Thin Lens Model: Aberrations 3 assumptions : 1. all rays rom a point are ocused onto 1 image point Remember thin lens small angle assumption 2. all image points in a single plane ' 3. magniication m = is constant 0 Deviations rom this ideal are aberrations http://www.physics.uiowa.edu/~umallik/adventure/light/lenses.gi Aberrations 2 types : geometrical : geometry o the lense, small or paraxial rays chromatic : reractive index unction o wavelength Geometrical Aberrations spherical aberration astigmatism distortion coma aberrations are reduced by combining lenses Marc Polleeys
Astigmatism Astigmatism Dierent ocal length or inclined rays Dierent ocal length or inclined rays Marc Polleeys Spherical Aberration Marc Polleeys Distortion magniication/ocal length dierent or dierent angles o inclination rays parallel to the axis do not converge outer portions o the lens yield smaller ocal lenghts pincushion (tele-photo) barrel (wide-angle) Can be corrected! (i parameters are know) Marc Polleeys Coma Chromatic Aberration point o the axis depicted as comet shaped blob rays o dierent wavelengths ocused in dierent planes cannot be removed completely Marc Polleeys Marc Polleeys 9
Vignetting Vignetting Eect: Darkens pixels near the image boundary Eect: Darkens pixels near the image boundary Recap Pinhole camera models the geometry o perspective projection Lenses make it work in practice Reraction: Snell s law Thin lens law Models or lenses Thin lens, spherical suraces, irst order optics Thick lens, higher-order optics, vignetting. Lecture Overview Pinhole optics Lenses Projections Camera Pinhole camera model Perspective projection Abstract camera model - box with a small hole in it In an ideal pinhole camera everything is in ocus Pinhole model: Captures pencil o rays all rays through a single point The point is called Center o Projection (COP) The image is ormed on the Image Plane Eective ocal length is distance rom COP to Image Plane Slide by Steve Seit Forsyth&Ponce
Dimensionality Reduction Machine (3D to 2D) but humans adopt! 3D world 2D image Müller-Lyer Illusion Point o observation What have we lost? Angles Distances (lengths) Figures Stephen E. Palmer, 2002 We don t make measurements in the image plane http://www.michaelbach.de/ot/se_muelue/index.html Distant objects are smaller Consequences: Parallel lines meet length o B = 2*length o C length o B = length o C There exist vanishing points Marc Polleeys Forsyth&Ponce The equation o projection Perspective Projection X x O -x x = X
The equation o projection Cartesian coordinates: We have, by similar triangles, that Ignore the third coordinate, and get X X Y Y X X Y Y Homogenous coordinates Add an extra coordinate and use an equivalence relation or 2D equivalence relation k*(x,y,) is the same as (x,y,) or 3D equivalence relation k*(x,y,,t) is the same as (x,y,,t) Basic notion Possible to represent points at ininity Where parallel lines intersect Where parallel planes intersect Possible to write the action o a perspective camera as a matrix Homogeneous coordinates Is this a linear transormation? no division by is nonlinear Trick: add one more coordinate: homogeneous image coordinates Converting rom homogeneous coordinates homogeneous scene coordinates Slide by Steve Seit The camera matrix Turn previous expression into homogeneous coordinates HC s or 3D point are (X,Y,,t) HC s or point in image are (u,v,w) X u 1 0 0 0 Y v = 0 1 0 0 w 0 0 1 0 t Position o the point in the image rom HC u X u X X normalie by w v = Y 1 v = Y = Y w w w 1 Eect o projection Points go to points Lines go to lines Planes go to a hal plane Parallel lines go to converging lines Polygons go to polygons Weak perspective Issue perspective eects, but not over the scale o individual objects collect points into a group at about the same depth, then divide each point by the depth o its group Adv: easy Disadv: wrong Degenerate cases: Line through the pinhole go to points Planes through the pinhole go to a line Parallels parallel to the image plane stay parallel Planes parallel to the image plane goes to ull planes
Weak Perspective Projection Pictorial Comparison Weak perspective Perspective O -x x X = const X Marc Polleeys Orthographic Projection Telescope projection can be modeled by orthographic projection Orthographic Projection Special case o perspective projection Distance rom the COP to the PP is ininite Image World X = x Y = y When the camera is at a (roughly constant) distance rom the scene, take m=1. Also called parallel projection What s the projection matrix? Marc Polleeys Slide by Steve Seit Projection Summary: 1. Perspective 2. Weak perspective x = X y = Y x = const X y = const Y Lecture Overview Pinhole optics Lenses Projections Camera 3. Orthographic x = X y = Y x, y = image coordinates X, Y, = world coordinates = depth = ocal length o the camera
Camera Overview SLR view inder Prism Your eye Mirror (lipped or exposure) Film/ Light rom scene Mirror (when viewing) lens Recap: Camera Terminology sie ocal length lens ocus distance aperture depth o ield ield o view Terminology Focal length (in mm) Determines the ield o view. wide angle (<30mm) to telephoto (>100mm) Focusing distance Which distance in the scene is sharp Depth o ield Given tolerance, one around the ocus distance that is sharp Aperture (in number) Ratio o used diameter and ocal lens. Number under the divider small number = large aperture (e.g. /2.8 is a large aperture, /16 is a small aperture) Shutter speed (in raction o a second) Reciprocity relates shutter speed and aperture Sensitivity (in ISO) Linear eect on exposure 100 ISO is or bright scenes, ISO 1600 is or dark scenes Focal length <30mm: wide angle 50mm: standard >100mm telephoto Aected by sie (crop actor) 24mm 50mm Change in ocal length & ocus distance Telephoto makes it easier to select background (a small change in viewpoint is a big change in background. ocal length 135mm ield o view
Change in ocal length and ocus distance Focal length & What happens when the ilm is hal the sie? Application: Real ilm is 36x24mm On the 20D, the is 22.5 x 15.0 mm Conversion actor on the 20D? On the SD500, it is 1/1.8 " (7.18 x 5.32 mm) What is the 7.7-23.1mm oom on the SD500? d ½s Wide angle Standard Telephoto Film/ pinhole scene Sensor sie Similar to cropping Exposure Get the right amount o light to /ilm Two main parameters: Shutter speed Aperture (area o lens) source: canon red book Aperture Diameter o the lens opening (controlled by diaphragm) Expressed as a raction o ocal length, in -number /2.0 on a 50mm means that the aperture is 25mm /2.0 on a 100mm means that the aperture is 50mm Disconcerting: small number = big aperture What happens to the area o the aperture when going rom /2.0 to /4.0? Typical numbers are /2.0, /2.8, /4, /5.6, /8, /11, /16, /22, /32 See the pattern? Main eect o aperture Depth o ield From Photography, London et al.
Depth o ield The bigger the aperture (small number), the shallower the DoF Just think Gaussian blur: bigger kernel more blurry This is the advantage o lenses with large maximal aperture: they can blur the background more The closer the ocus, the smaller the DoF Focal length has a more complex eect on DoF Distant background more blurry with telephoto Near the ocus plane, depth o ield only depends on image sie Hyperocal distance: Closest ocusing distance or which the depth o ield includes ininity The largest depth o ield one can achieve. Depends on aperture. Depth o ield and Depth o ocus We allow or some tolerance Max acceptable circle o conusion Depth o ocus lens lens Depth o ield Point in ocus Object with texture Point in ocus Object with texture Depth o ield What happens when we close the aperture by two stop? Aperture diameter is divided by two Depth o ield is doubled Diaphragm lens Point in ocus Object with texture Depth o ield & ocusing distance What happens when we divide ocusing distance by two? Similar triangles => divided by two as well Depth o ield & ocusing distance What happens when we divide ocusing distance by two? Similar triangles => divided by two as well Hal depth o ield Hal depth o ield lens Point in ocus From Photography, London et al.
Exposure Aperture ( number) Expressed as ratio between ocal length and aperture diameter: diameter = / < number> /2.0, /2.8, /4.0, /5.6, /8.0, /11, /16 (actor o sqrt (2)) Small number means large aperture Main eect: depth o ield A good standard lens has max aperture /1.8. A cheap oom has max aperture /3.5 Shutter speed In raction o a second 1/30, 1/60, 1/125, 1/250, 1/500 (actor o 2) Main eect: motion blur A human can usually hand-hold up to 1/ seconds, where is ocal length Sensitivity Gain applied to In ISO, bigger number, more sensitive (100, 200, 400, 800, 1600) Main eect: noise Reciprocity between these three numbers: or a given exposure, one has two degrees o reedom. Recap Pinhole is the simplest model o image ormation Lenses gather more light - reraction but get only one plane ocus cannot ocus ininitely close ocal length determines ield o view real lenses have aberrations Thin Lens Law can be used to compute where an object will be located in an image given its location in 3D and the ocal length Projections: Perspective Projection Non-linear projection Pinhole, Camera Weak Perspective Projection linear Orthographic models telephoto lens