Administrivia and survey results Topics: ‣ deep learning, CNNs, machine learning, AI ‣ Applications: self driving cars, face detection/recognition, etc Image formation ‣ robotics, calibration, structure from motion ‣ graphics, text/natural language processing, speech, Subhransu Maji Goals: ‣ Learn fundamentals of CV/ML/image processing CMPSCI 670: Computer Vision ‣ Do a supercool project ‣ Get an awesome industry job (e.g., space exploration @ NASA) September 13, 2016 Programming: 7.5 - 8.5 , Math: 6.5 - 7.5 Spire: waitlisted students? there are a few more open slots Resources for vector algebra and probability added to the webpage 2 CMPSCI 670 Subhransu Maji (UMass, Fall 16) Overview of the next two lectures Cameras The pinhole projection model ‣ qualitative properties Cameras with lenses ‣ Depth of focus ‣ Field of view ‣ Lens aberrations Digital cameras ‣ Sensors ‣ Colors ‣ Artifacts Albrecht Dürer early 1500s Brunelleschi, early 1400s Computational photography ‣ Novel sensors and cameras CMPSCI 670 Subhransu Maji (UMass, Fall 16) 3 CMPSCI 670 Subhransu Maji (UMass, Fall 16) 4
Lets design a camera Pinhole camera Object Film Object Barrier Film A B Idea 1: Lets put a film in front of an object Add a barrier to block of most rays Do we get a reasonable image? 5 6 CMPSCI 670 Subhransu Maji (UMass, Fall 16) CMPSCI 670 Subhransu Maji (UMass, Fall 16) Pinhole camera Camera obscura Basic principle known to Mozi (470-390 BCE), Aristotle Object Barrier Film (384-322 BCE) Drawing aids for artists: described by Leonardo Da Vinci (1452-1519 AD) Gemma Frisius, 1558 • Captures pencil of rays - all rays through a single point: aperture, “Camera obscure” Latin for “darkened room” center of projection, focal point, camera center • The image is formed on the image plane CMPSCI 670 Subhransu Maji (UMass, Fall 16) 7 CMPSCI 670 Subhransu Maji (UMass, Fall 16) 8
Pinhole cameras are everywhere Accidental pinhole cameras A. Torralba and W. Freeman, Accidental Pinhole and Pinspeck Cameras , CVPR 2012 Tree shadow during a solar eclipse photo credit: Nils van der Burg http://www.physicstogo.org/index.cfm Slide by Steve Seitz 9 10 CMPSCI 670 Subhransu Maji (UMass, Fall 16) CMPSCI 670 Subhransu Maji (UMass, Fall 16) Home-made pinhole camera Dimensionality reduction: 3D to 2D 3D world 2D image Point of observation • What is preserved? • Straight lines, incidence • What is not preserved? • Angles, lengths http://www.pauldebevec.com/Pinhole Slide by A. Efros CMPSCI 670 Subhransu Maji (UMass, Fall 16) 11 CMPSCI 670 Subhransu Maji (UMass, Fall 16) 12
Modeling projection Modeling projection y y f f z z x x The coordinate system To compute the projection P’ of a scene point P, form a visual ray ‣ The optical center ( O ) is at the origin connection P to the camera center O and find where it intersects the image plane ‣ The image plane is parallel to the xy-plane (perpendicular to the z axis) ‣ All scene points that lie on this visual ray have the same projection x y on the image Projection equations ( x , y , z ) ( f , f ) → ‣ Are there points for which this projection is not defined? ‣ Derive using similar triangles z z Slide by Steve Seitz Slide by Steve Seitz 13 14 CMPSCI 670 Subhransu Maji (UMass, Fall 16) CMPSCI 670 Subhransu Maji (UMass, Fall 16) Projection of a line Vanishing points image plane Each direction in space has its own vanishing point ‣ All lines going in the that direction converge at that point • Exception : directions that are parallel to the image plane camera vanishing point center line in the scene • What if we add another line parallel to the first one? Slide by Steve Seitz Slide by Steve Seitz CMPSCI 670 Subhransu Maji (UMass, Fall 16) 15 CMPSCI 670 Subhransu Maji (UMass, Fall 16) 16
Vanishing points The horizon Each direction in space has its own vanishing point ‣ All lines going in the that direction converge at that point camera • Exception : directions that are parallel to the image plane center • What about the vanishing point of a plane? ground plane Vanishing line of the ground plane ‣ All points at the same height of the camera project to the horizon ‣ Points above the camera project above the horizon ‣ Provides a way of comparing heights of objects 17 18 CMPSCI 670 Subhransu Maji (UMass, Fall 16) CMPSCI 670 Subhransu Maji (UMass, Fall 16) The horizon Perspective cues Is the person above or below the viewer? CMPSCI 670 Subhransu Maji (UMass, Fall 16) 19 CMPSCI 670 Subhransu Maji (UMass, Fall 16) 20
Perspective cues Perspective cues 21 22 CMPSCI 670 Subhransu Maji (UMass, Fall 16) CMPSCI 670 Subhransu Maji (UMass, Fall 16) Comparing heights Measuring heights 5.4 5 vanishing point camera height 4 3.7 3 2.5 2 1 What is the height of the camera? CMPSCI 670 Subhransu Maji (UMass, Fall 16) 23 CMPSCI 670 Subhransu Maji (UMass, Fall 16) 24
Perspective in art Perspective in art Masaccio, (At least partial) Perspective projections in art well Trinity , Santa before the Renaissance Maria Novella, Florence, 1425-28 One of the first consistent uses of perspective in Western art From ottobwiersma.nl Also some Greek examples, So apparently pre-renaissance … 25 26 CMPSCI 670 Subhransu Maji (UMass, Fall 16) CMPSCI 670 Subhransu Maji (UMass, Fall 16) Perspective distortion Perspective distortion What does a sphere project to? What does a sphere project to? M. H. Pirenne Slide by Steve Seitz CMPSCI 670 Subhransu Maji (UMass, Fall 16) 27 CMPSCI 670 Subhransu Maji (UMass, Fall 16) 28
Perspective distortion Orthographic projection The exterior looks bigger Special case of perspective projection ‣ Distance of the object from the image plane is infinite The distortion is not due to lens flaws ‣ Also called the “parallel projection” Problem pointed out by Da Vinci Image World Slide by F. Durand Slide by Steve Seitz 29 30 CMPSCI 670 Subhransu Maji (UMass, Fall 16) CMPSCI 670 Subhransu Maji (UMass, Fall 16) Orthographic projection Overview of the next two lectures Special case of perspective projection The pinhole projection model ‣ Distance of the object from the image plane is infinite ‣ Qualitative properties ‣ Also called the “parallel projection” Cameras with lenses ‣ Depth of focus ‣ Field of view ‣ Lens aberrations Digital cameras ‣ Sensors ‣ Colors ‣ Artifacts Novel cameras ‣ Computational photography CMPSCI 670 Subhransu Maji (UMass, Fall 16) 31 CMPSCI 670 Subhransu Maji (UMass, Fall 16) 32
Pinhole camera Shrinking the aperture Object Barrier Film image aperture Why not make the aperture as small as possible? • Captures pencil of rays - all rays through a single point: ‣ Less light gets through aperture, center of projection, focal point, camera center ‣ Diffraction effects • The image is formed on the image plane Slide by Steve Seitz 33 34 CMPSCI 670 Subhransu Maji (UMass, Fall 16) CMPSCI 670 Subhransu Maji (UMass, Fall 16) Shrinking the aperture Adding a lens Object Lens Film A lens focuses light on to the film ‣ Thin lens model: ➡ Rays passing through the center are not deviated (pinhole projection model still holds) Slide by Steve Seitz Slide by F. Durand CMPSCI 670 Subhransu Maji (UMass, Fall 16) 35 CMPSCI 670 Subhransu Maji (UMass, Fall 16) 36
Adding a lens Adding a lens Object Lens Film Object Lens Film circle of confusion f A lens focuses light on to the film A lens focuses light on to the film ‣ Thin lens model: ‣ There is a specific distance at which objects are “in focus” ➡ Rays passing through the center are not deviated (pinhole ➡ other points project on to a “circle of confusion” in the image projection model still holds) ➡ All parallel rays converge to one point on a plane located at the focal length f Slide by F. Durand Slide by F. Durand 37 38 CMPSCI 670 Subhransu Maji (UMass, Fall 16) CMPSCI 670 Subhransu Maji (UMass, Fall 16) Thin lens formula Thin lens formula y ′ / y = D ′ / D What is the relation between the focal length ( f ) , the distance of the Similar triangles everywhere! object from the optical center ( D ) and the distance at which the object will be in focus ( D’ )? D ′ D ′ D D f f y y ′ image lens object image lens object plane plane Slide by F. Durand Slide by F. Durand CMPSCI 670 Subhransu Maji (UMass, Fall 16) 39 CMPSCI 670 Subhransu Maji (UMass, Fall 16) 40
Thin lens formula Thin lens formula y ′ / y = D ′ / D Similar triangles everywhere! 1 1 1 Any point satisfying the thin lens + = y ′ / y = ( D ′− f )/ f D ′ D f equation is in focus D ′ D ′ D D f f y y y ′ y ′ image lens object image lens object plane plane Slide by F. Durand Slide by F. Durand 41 42 CMPSCI 670 Subhransu Maji (UMass, Fall 16) CMPSCI 670 Subhransu Maji (UMass, Fall 16) Depth of field Varying the aperture http://www.cambridgeincolour.com/tutorials/depth-of-field.htm DOF is the distance between the nearest and farthest objects Small aperture = large DOF Large aperture = small DOF in a scene that appear acceptably sharp in an image Slide by A.Efros Slide by A.Efros CMPSCI 670 Subhransu Maji (UMass, Fall 16) 43 CMPSCI 670 Subhransu Maji (UMass, Fall 16) 44
Recommend
More recommend