Cameras, lenses, and calibration

Slides:



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

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)
Computer vision: models, learning and inference
Projection Readings Szeliski 2.1. Projection Readings Szeliski 2.1.
Camera Calibration. Issues: what are intrinsic parameters of the camera? what is the camera matrix? (intrinsic+extrinsic) General strategy: view calibration.
Camera calibration and epipolar geometry
Camera Models A camera is a mapping between the 3D world and a 2D image The principal camera of interest is central projection.
Structure from motion.
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
Camera model Relation between pixels and rays in space ?
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.
Single-view geometry Odilon Redon, Cyclops, 1914.
The Pinhole Camera Model
Panoramas and Calibration : Rendering and Image Processing Alexei Efros …with a lot of slides stolen from Steve Seitz and Rick Szeliski.
The Image Formation Pipeline
CS223b, Jana Kosecka Rigid Body Motion and Image Formation.
CS4670 / 5670: Computer Vision KavitaBala Lecture 15: Projection “The School of Athens,” Raphael.
The Camera : Computational Photography Alexei Efros, CMU, Fall 2008.
1 Digital Images WorldCameraDigitizer Digital Image (i) What determines where the image of a 3D point appears on the 2D image? (ii) What determines how.
Perspective projection
EEM 561 Machine Vision Week 10 :Image Formation and Cameras
776 Computer Vision Jan-Michael Frahm, Enrique Dunn Spring 2013.
Lecture 14: Projection CS4670 / 5670: Computer Vision Noah Snavely “The School of Athens,” Raphael.
Camera Geometry and Calibration Thanks to Martial Hebert.
776 Computer Vision Jan-Michael Frahm Fall Camera.
Image Formation Fundamentals Basic Concepts (Continued…)
Homogeneous Coordinates (Projective Space) Let be a point in Euclidean space Change to homogeneous coordinates: Defined up to scale: Can go back to non-homogeneous.
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.
Geometric Camera Models
Vision Review: Image Formation Course web page: September 10, 2002.
6.869 Advances in Computer Vision Bill Freeman and Antonio Torralba Lecture 11 MRF’s (continued), cameras and lenses. Spring 2011 remember correction on.
Peripheral drift illusion. Multiple views Hartley and Zisserman Lowe stereo vision structure from motion optical flow.
Lecture 03 15/11/2011 Shai Avidan הבהרה : החומר המחייב הוא החומר הנלמד בכיתה ולא זה המופיע / לא מופיע במצגת.
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.
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)
Computer vision: models, learning and inference M Ahad Multiple Cameras
Single-view geometry Odilon Redon, Cyclops, 1914.
Cameras, lenses, and sensors 6.801/6.866 Profs. Bill Freeman and Trevor Darrell Sept. 10, 2002 Reading: Chapter 1, Forsyth & Ponce Optional: Section 2.1,
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
Calibrating a single camera
Geometric Model of Camera
CS5670: Computer Vision Lecture 9: Cameras Noah Snavely
The Camera : Computational Photography
CSCE 441 Computer Graphics 3-D Viewing
Modeling 101 For the moment assume that all geometry consists of points, lines and faces Line: A segment between two endpoints Face: A planar area bounded.
Homogeneous Coordinates (Projective Space)
Lecture 13: Cameras and geometry
Geometric Camera Models
Lecturer: Dr. A.H. Abdul Hafez
Announcements Midterm out today Project 1 demos.
Projection Readings Nalwa 2.1.
Credit: CS231a, Stanford, Silvio Savarese
Single-view geometry Odilon Redon, Cyclops, 1914.
The Pinhole Camera Model
Announcements Midterm out today Project 1 demos.
Presentation transcript:

Cameras, lenses, and calibration Camera models Projection equations Images are projections of the 3-D world onto a 2-D plane…

Light rays from many different parts of the scene strike the same point on the paper. 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. Pinhole camera only allows rays from one point in the scene to strike each point of the paper. Forsyth&Ponce

Pinhole camera geometry: Distant objects are smaller

Right - handed system y y z x x z y z x x z y left top far right bottom near x z y z x x z y

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

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

Perspective projection of that line Line in 3-space In the limit as we have (for ): This tells us that any set of parallel lines (same a, b, c parameters) project to the same point (called the vanishing point).

Vanishing point y camera z

http://www. ider. herts. ac http://www.ider.herts.ac.uk/school/courseware/graphics/two_point_perspective.html

Vanishing points Each set of parallel lines (=direction) meets at a different point The vanishing point for this direction Sets of parallel lines on the same plane lead to collinear vanishing points. The line is called the horizon for that plane

What if you photograph a brick wall head-on? x

Perspective projection of that line Brick wall line in 3-space Perspective projection of that line All bricks have same z0. Those in same row have same y0 Thus, a brick wall, photographed head-on, gets rendered as set of parallel lines in the image plane.

Other projection models: Orthographic projection

Other projection models: Weak perspective Issue perspective effects, but not over the scale of individual objects collect points into a group at about the same depth, then divide each point by the depth of its group Adv: easy Disadv: only approximate

Three camera projections 3-d point 2-d image position (1) Perspective: (2) Weak perspective: (3) Orthographic:

Homogeneous coordinates Is this a linear transformation? Trick: add one more coordinate: no—division by z is nonlinear homogeneous image coordinates homogeneous scene coordinates Converting from homogeneous coordinates Slide by Steve Seitz

Perspective Projection Projection is a matrix multiply using homogeneous coordinates: This is known as perspective projection The matrix is the projection matrix Slide by Steve Seitz

Perspective Projection How does scaling the projection matrix change the transformation? Slide by Steve Seitz

Orthographic Projection Special case of perspective projection Orthography is an approximate model for long focal length (telephoto) lenses and objects whose depth is shallow relative to their distance to the camera Also called “parallel projection” . What’s the projection matrix? Image World ? Slide by Steve Seitz

Orthographic Projection Special case of perspective projection Also called “parallel projection” What’s the projection matrix? Image World Slide by Steve Seitz

Homogeneous coordinates 2D Points: 2D Lines: d (nx, ny)

Homogeneous coordinates Intersection between two lines:

Homogeneous coordinates Line joining two points:

2D Transformations

2D Transformations Example: translation tx ty = +

2D Transformations Example: translation tx ty 1 tx ty 1 = + . =

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

Translation and rotation, written in each set of coordinates Non-homogeneous coordinates Homogeneous coordinates where

Translation and rotation “as described in the coordinates of frame B” Let’s write as a single matrix equation:

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.)

Intrinsic parameters: from idealized world coordinates to pixel values Forsyth&Ponce Perspective projection

Intrinsic parameters But “pixels” are in some arbitrary spatial units

Intrinsic parameters Maybe pixels are not square

Intrinsic parameters We don’t know the origin of our camera pixel coordinates

Intrinsic parameters May be skew between camera pixel axes

Intrinsic parameters, homogeneous coordinates Using homogenous coordinates, we can write this as: or: In pixels In camera-based coords

Extrinsic parameters: translation and rotation of camera frame Non-homogeneous coordinates Homogeneous coordinates

Combining extrinsic and intrinsic calibration parameters, in homogeneous coordinates pixels Intrinsic Camera coordinates World coordinates Extrinsic Forsyth&Ponce

Other ways to write the same equation pixel coordinates world coordinates Conversion back from homogeneous coordinates leads to:

Camera parameters A camera is described by several parameters Translation T of the optical center from the origin of world coords Rotation R of the image plane focal length f, principle point (x’c, y’c), pixel size (sx, sy) blue parameters are called “extrinsics,” red are “intrinsics” Projection equation The projection matrix models the cumulative effect of all parameters Useful to decompose into a series of operations projection intrinsics rotation translation identity matrix The definitions of these parameters are not completely standardized especially intrinsics—varies from one book to another

Projection matrices for Orhographic and scaled orthographic projections (5dof) Scaled orthographic projection (6dof)