The Pinhole Camera Model

Slides:



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

Computer vision: models, learning and inference
Camera Calibration. Issues: what are intrinsic parameters of the camera? what is the camera matrix? (intrinsic+extrinsic) General strategy: view calibration.
Computer vision. Camera Calibration Camera Calibration ToolBox – Intrinsic parameters Focal length: The focal length in pixels is stored in the.
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.
1 Basic geometric concepts to understand Affine, Euclidean geometries (inhomogeneous coordinates) projective geometry (homogeneous coordinates) plane at.
Geometry of Images Pinhole camera, projection A taste of projective geometry Two view geometry:  Homography  Epipolar geometry, the essential matrix.
Used slides/content with permission from
Epipolar geometry. (i)Correspondence geometry: Given an image point x in the first view, how does this constrain the position of the corresponding point.
Structure from motion. Multiple-view geometry questions Scene geometry (structure): Given 2D point matches in two or more images, where are the corresponding.
Uncalibrated Geometry & Stratification Sastry and Yang
CS485/685 Computer Vision Prof. George Bebis
Camera model Relation between pixels and rays in space ?
Calibration Dorit Moshe.
Previously Two view geometry: epipolar geometry Stereo vision: 3D reconstruction epipolar lines Baseline O O’ epipolar plane.
Single-view geometry Odilon Redon, Cyclops, 1914.
The Pinhole Camera Model
CS223b, Jana Kosecka Rigid Body Motion and Image Formation.
Camera parameters Extrinisic parameters define location and orientation of camera reference frame with respect to world frame Intrinsic parameters define.
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.
Cameras, lenses, and calibration
3-D Scene u u’u’ Study the mathematical relations between corresponding image points. “Corresponding” means originated from the same 3D point. Objective.
ME 1202: Linear Algebra & Ordinary Differential Equations (ODEs)
Epipolar geometry The fundamental matrix and the tensor
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 Camera Models and Camera Calibration
Course 12 Calibration. 1.Introduction In theoretic discussions, we have assumed: Camera is located at the origin of coordinate system of scene.
Geometric Models & Camera Calibration
Imaging Geometry for the Pinhole Camera Outline: Motivation |The pinhole camera.
视觉的三维运动理解 刘允才 上海交通大学 2002 年 11 月 16 日 Understanding 3D Motion from Images Yuncai Liu Shanghai Jiao Tong University November 16, 2002.
Geometric Camera Models
Vision Review: Image Formation Course web page: September 10, 2002.
Affine Structure from Motion
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.
A Flexible New Technique for Camera Calibration Zhengyou Zhang Sung Huh CSPS 643 Individual Presentation 1 February 25,
EECS 274 Computer Vision Affine Structure from Motion.
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)
Reconnaissance d’objets et vision artificielle Jean Ponce Equipe-projet WILLOW ENS/INRIA/CNRS UMR 8548 Laboratoire.
Computer vision: models, learning and inference M Ahad Multiple Cameras
Affine Geometry.
Single-view geometry Odilon Redon, Cyclops, 1914.
Digital Image Processing Additional Material : Imaging Geometry 11 September 2006 Digital Image Processing Additional Material : Imaging Geometry 11 September.
Instructor: Mircea Nicolescu Lecture 9
Computer vision: geometric models Md. Atiqur Rahman Ahad Based on: Computer vision: models, learning and inference. ©2011 Simon J.D. Prince.
CS682, Jana Kosecka Rigid Body Motion and Image Formation Jana Kosecka
Calibrating a single camera
Nazar Khan PUCIT Lecture 19
Computer vision: models, learning and inference
Chapter 11 Three-Dimensional Geometric and Modeling Transformations
Geometric Model of Camera
CSCE 441 Computer Graphics 3-D Viewing
Copyright © Cengage Learning. All rights reserved.
Homogeneous Coordinates (Projective Space)
CENG 477 Introduction to Computer Graphics
Epipolar geometry.
Computer Graphics Recitation 12.
Lecture 13: Cameras and geometry
Geometric Camera Models
Lecturer: Dr. A.H. Abdul Hafez
Multiple View Geometry for Robotics
Announcements Midterm out today Project 1 demos.
Reconstruction.
Course 7 Motion.
Copyright © Cengage Learning. All rights reserved.
Single-view geometry Odilon Redon, Cyclops, 1914.
CSCE441: Computer Graphics 2D/3D Transformations
Presentation transcript:

The Pinhole Camera Model X m F I y f Z C c x Y M image plane focal plane The geometric model of pinhole camera consists of an image plane I and an eyepoint C on the focal plane F. The fundamental property of perspective is that every image point m is collinear with the C and its corresponding world point M. The point C is also called optical center, or the focus. The line Cc, perpendicular to I and to F, is called optical axis, c is called the principal point. 6/2/2019 CS-236607 Visual Recognition

Equations for Perspective Projection Let (C,X,Y,Z) be the camera coordinate system (c.s.) and (c,x,y) be the image c.s. It’s clear that From the geometric viewpoint, there is no difference to replace the image plane by a virtual image plane located on the other side of the focal plane. In this new c.s, an image point (x,y) has 3D coordinates (x,y,f). 6/2/2019 CS-236607 Visual Recognition

The Pinhole Camera Model X I x f C c Z y Y m M lM 6/2/2019 CS-236607 Visual Recognition

Perspective Projection Matrix In projective geometry any point along the ray going through the optical center projects to the same image point. So rescaling “homogeneous coordinates” makes no difference: (X,Y,Z) ~ s(X,Y,Z) = (s X, s Y, s Z) It can be seen from (1): Equations (1) can be rewritten linearly (s arbitrary): 6/2/2019 CS-236607 Visual Recognition

Perspective Projection Matrix and Extrinsic Parameters Given a vector x=[x,y,…]T, we use to denote augmented vector by adding 1 as the last element. The 3x4 matrix P is called the camera perspective projection matrix. Given a 3D point M=[X,Y,Z]T and its image m=[x,y]T (2) can be written in matrix form as (with arbitrary scalar s): For real image point, s should not be 0. If s=0, then Z=0, and the 3D point is in the focal plane and image coordinates x and y are not defined. For all points in the focal plane but C 6/2/2019 CS-236607 Visual Recognition

Perspective Projection Matrix and Extrinsic Parameters their corresponding points in the image plane are at infinity. For the optical center C, we have x=y=s=0 and X=Y=Z=0. In practice 3D points can be expressed in arbitrary world c.s. (not only the camera c.s.). We go from the old c.s. centered at the optical center C to the new c.s. centered at point O (world c.s.) by a rotation R followed by a translation t=CO. A relation between coordinates of a single point in a camera c.s. Mc and in the world c.s. Mw is: Mc = R Mw + t or more compactly where D is Euclidean transformation of the 3D space: 6/2/2019 CS-236607 Visual Recognition

Perspective Projection Matrix and Extrinsic Parameters The matrix R and the vector t describe the orientation and position of the camera with respect to the new world c.s. They are called the extrinsic parameters of the camera (3 rotations +3 translations). X (R,t) Xw I x Zw C c Z y O camera c.s. Yw world c.s. Y m M 6/2/2019 CS-236607 Visual Recognition

Perspective Projection Matrix From (3) and (4) we have: Therefore the new perspective projection matrix is: In real images, the origin of the image c.s. is not the principal point and the scaling along each image axis is different, so the image coordinates undergo a further transformation described by some matrix K, and finally we have: 6/2/2019 CS-236607 Visual Recognition

Intrinsic Parameters of the Camera K is independent of the camera position. It contains the interior (or intrinsic) parameters of the camera. It is represented as an upper triangular matrix: where and stand for the scaling along the x and y axes of the image plane, gives the skew (non-orthogonality) between the axes, and (u0, v0) are the coordinates of the principal point. y v m v0 c x q o u0 u 6/2/2019 CS-236607 Visual Recognition

Intrinsic Parameters of the Camera For a given point, let . Since we have and thus Normalized coordinate system of the camera is a system where the image plane is located at a unit distance from the optical center (i.e. f=1). The perspective projection matrix P in such c.s. is given by 6/2/2019 CS-236607 Visual Recognition

Intrinsic Parameters of the Camera For a world point its coordinates in normalized coordinate system are A matrix Pnew defined by (10) can be decomposed: where Matrix A contains only intrinsic parameters, and is called camera intrinsic matrix. 6/2/2019 CS-236607 Visual Recognition

Intrinsic Parameters of the Camera It is thus clear that the normalized image coordinates are given by Through this transformation from the available pixel image coordinates,[u,v]T, to the imaginary normalized image coordinates the projection from the space onto the normalized image does not depend on the specific cameras. This frees us from thinking about characteristics of the specific cameras and allows us to think in terms of ideal systems 6/2/2019 CS-236607 Visual Recognition

The General Form of the Perspective Projection Matrix Camera can be considered as a system with intrinsic and extrinsic parameters. Here are 5 intrinsic parameters: the coordinates u0,v0 of principal point, and the angle between the two image axes. There are 6 extrinsic parameters, three for the rotation and three for the translation, which define the transformation from the world coordinate system, to the standard coordinate system of the camera. Combining (7) and (13) yields the general form of the perspective projection matrix of the camera: The projection of 3D world coordinates to 2D pixel coordinates is then given by (s is arbitrary scale factor) 6/2/2019 CS-236607 Visual Recognition

The General Form of the Perspective Projection Matrix cont. Matrix P has 3x4=12 elements, but has only 11 degrees of freedom. Why? Let be the (i,j) entry of the matrix P. Eliminating the scalar s in (17) yields two nonlinear equations: 6/2/2019 CS-236607 Visual Recognition

The General Form of the Perspective Projection Matrix cont. Problem 1. Given the perspective projection matrix P find coordinates of the optical center C of the camera in the world coordinate system. Solution. Decompose the 3x4 matrix P as the concatenation of 3x3 matrix B and a 3-vector b, i.e. P =[B b]. Assume that the rank of B is 3. Under the pinhole model, the optical center projects to [0 0 0]T (i.e. s=0). Therefore, the optical center can be obtained by solving The solution is 6/2/2019 CS-236607 Visual Recognition

The General Form of the Perspective Projection Matrix cont. Problem 2. Given matrix P and an image point m find an optical ray going through this point. Solution. The optical center C is on the optical ray. Any point on this ray is also projected on m. Without loss of generality, we can choose the point D such that the scale factor s =1, i.e. This gives A point on the optical ray is thus given by Where l varies from 0 to 6/2/2019 CS-236607 Visual Recognition

Perspective Approximations The perspective projection (2) is a nonlinear mapping which makes it difficult to solve many vision problems. It also ill-conditioned when perspective effects are small. There are several linear mappings, approximating the perspective projection: Orthographic Projection. It ignores the depth dimension. It can be used if distance and position effects can be ignored. 6/2/2019 CS-236607 Visual Recognition

Orthographic and Weak Perspective Projection Orthographic Projection X I x C c Z y Y 6/2/2019 CS-236607 Visual Recognition

Orthographic and Weak Perspective Projection Orthographic Projection X I C Z Y 6/2/2019 CS-236607 Visual Recognition

Weak Perspective Projection Much more reasonable approximation is Weak Perspective Projection. When the object size is small enough with respect to the distance from the camera to the object, Z can be replaced by a common depth Zc . Then the equations (1) become linear: Here we assumed that the focal length f is normalized to 1 6/2/2019 CS-236607 Visual Recognition

Weak Perspective Projection Two step projection: image plane average depth plane X I C Zc Z Y 6/2/2019 CS-236607 Visual Recognition

Weak Perspective Projection Let Equation (12) can be written as 6/2/2019 CS-236607 Visual Recognition

Weak Perspective Projection Taking into account the intrinsic and extrinsic parameters of the camera yields: where A is the intrinsic matrix (14), and D is the rigid transformation (5). 6/2/2019 CS-236607 Visual Recognition