EEM 561 Machine Vision Week 10 :Image Formation and Cameras

Slides:



Advertisements
Similar presentations
C280, Computer Vision Prof. Trevor Darrell Lecture 2: Image Formation.
Advertisements

Single-view Metrology and Camera Calibration
The Camera : Computational Photography Alexei Efros, CMU, Fall 2006.
CS 691 Computational Photography Instructor: Gianfranco Doretto 3D to 2D Projections.
Computer Vision CS 776 Spring 2014 Cameras & Photogrammetry 1 Prof. Alex Berg (Slide credits to many folks on individual slides)
Paris town hall.
Study the mathematical relations between corresponding image points.
Geometry 1: Projection and Epipolar Lines Introduction to Computer Vision Ronen Basri Weizmann Institute of Science.
Projection Readings Szeliski 2.1. Projection Readings Szeliski 2.1.
Image formation and cameras CSE P 576 Larry Zitnick Many slides courtesy of Steve Seitz.
Camera Models A camera is a mapping between the 3D world and a 2D image The principal camera of interest is central projection.
Modeling Light : Rendering and Image Processing Alexei Efros.
Geometry of Images Pinhole camera, projection A taste of projective geometry Two view geometry:  Homography  Epipolar geometry, the essential matrix.
Announcements. Projection Today’s Readings Nalwa 2.1.
Lecture 5: Projection CS6670: Computer Vision Noah Snavely.
Announcements Mailing list (you should have received messages) Project 1 additional test sequences online Talk today on “Lightfield photography” by Ren.
CS485/685 Computer Vision Prof. George Bebis
Computer Vision - A Modern Approach
Announcements Mailing list Project 1 test the turnin procedure *this week* (make sure it works) vote on best artifacts in next week’s class Project 2 groups.
Computer Vision : CISC4/689
Lecture 13: Projection, Part 2
Lecture 12: Projection CS4670: Computer Vision Noah Snavely “The School of Athens,” Raphael.
Lecture 6: Image Warping and Projection CS6670: Computer Vision Noah Snavely.
The Pinhole Camera Model
CS223b, Jana Kosecka Rigid Body Motion and Image Formation.
Single-view Metrology and Camera Calibration Computer Vision Derek Hoiem, University of Illinois 02/26/15 1.
The Camera : Computational Photography Alexei Efros, CMU, Fall 2008.
Cameras, lenses, and calibration
Image formation and cameras
Perspective projection
Single-view Metrology and Cameras Computational Photography Derek Hoiem, University of Illinois 10/8/13.
Image formation How are objects in the world captured in an image?
Lecture 14: Projection CS4670 / 5670: Computer Vision Noah Snavely “The School of Athens,” Raphael.
776 Computer Vision Jan-Michael Frahm Fall Camera.
Image Formation Fundamentals Basic Concepts (Continued…)
Geometric Models & Camera Calibration
Recap from Wednesday Two strategies for realistic rendering capture real world data synthesize from bottom up Both have existed for 500 years. Both are.
776 Computer Vision Jan-Michael Frahm, Enrique Dunn Spring 2013.
Single-view Metrology and Camera Calibration Computer Vision Derek Hoiem, University of Illinois 01/25/11 1.
Peripheral drift illusion. Multiple views Hartley and Zisserman Lowe stereo vision structure from motion optical flow.
Computational Photography Derek Hoiem, University of Illinois
Single-view geometry Odilon Redon, Cyclops, 1914.
CS-498 Computer Vision Week 7, Day 2 Camera Parameters Intrinsic Calibration  Linear  Radial Distortion (Extrinsic Calibration?) 1.
Projection Readings Nalwa 2.1 Szeliski, Ch , 2.1
Single-view Metrology and Cameras Computational Photography Derek Hoiem, University of Illinois 10/06/15.
1 Chapter 2: Geometric Camera Models Objective: Formulate the geometrical relationships between image and scene measurements Scene: a 3-D function, g(x,y,z)
More with Pinhole + Single-view Metrology
Announcements Project 1 grading session this Thursday 2:30-5pm, Sieg 327 –signup ASAP:signup –10 minute slot to demo your project for a TA »have your program.
Lecture 14: Projection CS4670 / 5670: Computer Vision Noah Snavely “The School of Athens,” Raphael.
Lecture 18: Cameras CS4670 / 5670: Computer Vision KavitaBala Source: S. Lazebnik.
CSE 185 Introduction to Computer Vision
Prof. Adriana Kovashka University of Pittsburgh October 3, 2016
CS5670: Computer Vision Lecture 9: Cameras Noah Snavely
The Camera : Computational Photography
Announcements Project 1 Project 2
CSCE 441 Computer Graphics 3-D Viewing
CS 790: Introduction to Computational Vision
CS4670 / 5670: Computer Vision Lecture 12: Cameras Noah Snavely
Study the mathematical relations between corresponding image points.
Lecture 13: Cameras and geometry
Lecturer: Dr. A.H. Abdul Hafez
The Camera : Computational Photography
Announcements Midterm out today Project 1 demos.
Projection Readings Nalwa 2.1.
Credit: CS231a, Stanford, Silvio Savarese
Projection Readings Szeliski 2.1.
Announcements Midterm out today Project 1 demos.
Camera model and calibration
Presentation transcript:

EEM 561 Machine Vision Week 10 :Image Formation and Cameras Spring 2015 Instructor: Hatice Çınar Akakın, Ph.D. haticecinarakakin@anadolu.edu.tr Anadolu University

Image formation 3D world 2D image Images are projections of the 3-D world onto a 2-D plane… Figures © Stephen E. Palmer, 2002 Slide source: A.Torralba

Image formation Let’s design a camera Idea 1: put a piece of film in front of an object Do we get a reasonable image? Slide source: Seitz

The barrier blocks off most of the rays Pinhole camera The barrier blocks off most of the rays It gets inverted Add a barrier to block off most of the rays This reduces blurring The opening known as the aperture How does this transform the image? It gets inverted!! Slide source: Seitz

Light rays from many different parts of the scene strike the same point on the paper. Each point on the image plane sees light from only one direction, the one that passes through the pinhole. The point to make here is that each point on the image plane sees light from only one direction, the one that passes through the pinhole. Forsyth & Ponce

Pinhole camera is a simple model to approximate imaging process, perspective projection f c f = focal length c = center of the camera If we treat pinhole as a point, only one ray from any given point can enter the camera. Figure from Forsyth

Pinhole camera Photograph by Abelardo Morell, 1991 Slide source: A.Torralba

Pinhole camera Photograph by Abelardo Morell, 1991 Slide source: A.Torralba

Pinhole camera Photograph by Abelardo Morell, 1991 Slide source: A.Torralba

Pinhole camera Photograph by Abelardo Morell, 1991 Slide source: A.Torralba

Effect of pinhole size Wandell, Foundations of Vision, Sinauer, 1995

Wandell, Foundations of Vision, Sinauer, 1995

Shrinking the aperture Why not make the aperture as small as possible? Less light gets through Diffraction effects... Slide source:N.Snavely

Shrinking the aperture Slide source:N.Snavely

Camera obscura: The pre-camera In Latin, means ‘dark room’ "Reinerus Gemma-Frisius, observed an eclipse of the sun at Louvain on January 24, 1544, and later he used this illustration of the event in his book De Radio Astronomica et Geometrica, 1545. It is thought to be the first published illustration of a camera obscura..." Hammond, John H., The Camera Obscura, A Chronicle http://www.acmi.net.au/AIC/CAMERA_OBSCURA.html CS 376 Lecture 15

Camera Obscura

Freestanding camera obscura at UNC Chapel Hill Illustration of Camera Obscura Freestanding camera obscura at UNC Chapel Hill Photo by Seth Ilys

Camera obscura at home http://blog.makezine.com/archive/2006/02/how_to_room_sized_camera_obscu.html Sketch from http://www.funsci.com/fun3_en/sky/sky.htm CS 376 Lecture 15

Accidental pinhole camera Outside scene * Aperture See Zomet, A.; Nayar, S.K. CVPR 2006 for a detailed analysis. Slide source: A.Torralba

Measuring distance Object size decreases with distance to the pinhole There, given a single projection, if we know the size of the object we can know how far it is. But for objects of unknown size, the 3D information seems to be lost.

Adding a lens A lens focuses light onto the film “circle of confusion” A lens focuses light onto the film There is a specific distance at which objects are “in focus” other points project to a “circle of confusion” in the image Changing the shape of the lens changes this distance Slide source:N.Snavely

(Center Of Projection) Cameras with lenses F focal point optical center (Center Of Projection) A lens focuses parallel rays onto a single focal point Gather more light, while keeping focus; make pinhole perspective projection practical Slide source:K.Grauman CS 376 Lecture 15

Thin lens equation 𝑦 ′ 𝑦 = 𝑣 𝑢 𝑦 𝑦 ′ 𝑦 = (𝑣−𝑓) 𝑓 𝑦′ Any object point satisfying this equation is in focus Slide source:K.Grauman CS 376 Lecture 15

Combining Lenses

The eye The human eye is a camera Note that the retina is curved The human eye is a camera Iris - colored annulus with radial muscles Pupil - the hole (aperture) whose size is controlled by the iris What’s the “film”? photoreceptor cells (rods and cones) in the retina

Perspective projection camera world f y z y’ Cartesian coordinates: We have, by similar triangles, that (x, y, z) -> (f x/z, f y/z, -f) Ignore the third coordinate, and get f: focal length O: camera center Slide source: A.Torralba

Geometric properties of projection Points go to points Lines go to lines Planes go to whole image or half-planes. Polygons go to polygons Degenerate cases line through focal point to point plane through focal point to line Slide source: A.Torralba

Modeling projection Is this a linear transformation? no—division by z is nonlinear Homogeneous coordinates to the rescue! homogeneous image coordinates homogeneous scene coordinates Converting from homogeneous coordinates Slide by Steve Seitz

Perspective Projection Matrix Projection is a matrix multiplication using homogeneous coordinates: divide by the third coordinate to convert back to non-homogeneous coordinates Slide by Steve Seitz CS 376 Lecture 15

Perspective Projection -- Ideal Case

Perspective Projection -- Ideal Case

Orthographic projection Given camera at constant distance from scene World points projected along rays parallel to optical access CS 376 Lecture 15

Projection properties Parallel lines converge at a vanishing point Each direction in space has its own vanishing point But parallels parallel to the image plane remain parallel Slide source:N.Snavely

Vanishing points and lines Vertical vanishing point (at infinity) Vanishing line Vanishing point Vanishing point source:J.Hays Slide from Efros, Photo from Criminisi

Homogeneous coordinates 2D Points: 2D Lines: d (nx, ny) Slide source: A.Torralba

Homogeneous coordinates Intersection between two lines: Slide source: A.Torralba

Homogeneous coordinates Line joining two points: Slide source: A.Torralba

2D Transformations Example: translation = . + = . = tx ty 1 tx ty 1 = + . 1 tx ty = . = Now we can chain transformations Slide source: A.Torralba

Recall:Summary of Affine Transformations

More Realistic Perspective Projection

Perspective projection (converts from 3D rays in camera coordinate system to pixel coordinates) (intrinsics) in general, (upper triangular matrix) : aspect ratio (1 unless pixels are not square) : skew (0 unless pixels are shaped like rhombi/parallelograms) : principal point ((0,0) unless optical axis doesn’t intersect projection plane at origin) Slide source:N.Snavely

Projection matrix jw kw Ow iw R,T x: Image Coordinates: (u,v,1) K: Intrinsic Matrix (3x3) R: Rotation (3x3) t: Translation (3x1) X: World Coordinates: (X,Y,Z,1) We can use homogeneous coordinates to write camera matrix in linear form. Slide Credit: Saverese

Projection matrix Intrinsic Assumptions Unit aspect ratio Optical center at (0,0) No skew Extrinsic Assumptions No rotation Camera at (0,0,0) K Work through equations for u and v on board Slide Credit: Saverese

Remove assumption: known optical center Intrinsic Assumptions Unit aspect ratio No skew Extrinsic Assumptions No rotation Camera at (0,0,0)

Remove assumption: square pixels Intrinsic Assumptions No skew Extrinsic Assumptions No rotation Camera at (0,0,0)

Remove assumption: non-skewed pixels Intrinsic Assumptions Extrinsic Assumptions No rotation Camera at (0,0,0) Note: different books use different notation for parameters Slide Credit: J. Hays

Oriented and Translated Camera jw t kw Ow iw Slide Credit: J. Hays

Allow camera translation Intrinsic Assumptions Extrinsic Assumptions No rotation Slide Credit: J. Hays

3D Rotation of Points Rotation around the coordinate axes, counter-clockwise: p p’ g y z Slide Credit: Saverese

Allow camera rotation Slide source:J.Hays

Degrees of freedom How many known points are needed to estimate this? 5 6 How many known points are needed to estimate this? Slide source:J.Hays

Camera calibration Use the camera to tell you things about the world: Relationship between coordinates in the world and coordinates in the image: geometric camera calibration, see Szeliski, section 5.2, 5.3 for references (Relationship between intensities in the world and intensities in the image: photometric image formation, see Szeliski, sect. 2.2.) Slide source: A.Torralba

Things to remember Vanishing points and vanishing lines Vertical vanishing (at infinity) Vanishing points and vanishing lines Pinhole camera model and camera projection matrix Homogeneous coordinates