# Camera matrix

Camera matrix

In computer vision a camera matrix or (camera) projection matrix is a $3 imes 4$ matrix which describes the mapping of a pinhole camera from 3D points in the world to 2D points in an image.

Let $mathbf\left\{x\right\}$ be a representation of a 3D point in homogeneous coordinates (a 4-dimensional vector), and let $mathbf\left\{y\right\}$ be a representation of the image of this point in the pinhole camera (a 3-dimensional vector). Then the following relation holds

: $mathbf\left\{y\right\} sim mathbf\left\{C\right\} , mathbf\left\{x\right\}$

where $mathbf\left\{C\right\}$ is the camera matrix and the $, sim$ sign implies that the left and right hand sides are equal up to a non-zero scalar multiplication.

Since the camera matrix $mathbf\left\{C\right\}$ is involved in the mapping between elements of two projective spaces, it too can be regarded as a projective element. This means that it has only 11 degrees of freedom since any multiplication by a non-zero scalar results in an equivalent camera matrix.

Derivation

The mapping from the coordinates of a 3D point P to the 2D image coordinates of the point's projection onto the image plane, according to the pinhole camera model is given by

:

where $\left(x_1, x_2, x_3\right)$ are the 3D coordinates of P relative to a camera centered coordinate system, $\left(y_1, y_2\right)$ are the resulting image coordinates, and "f" is the camera's focal length.

To derive the camera matrix this expression is rewritten in terms of homogeneous coordinates. Instead of the 2D vector $\left(y_1,y_2\right)$ we consider the projective element (a 3D vector) $\left(y_1,y_2,1\right)$ and instead of equality we consider equality up to scaling by a non-zero number, denoted $, sim$. First, we write the homogeneous image coordinates as expressions in the usual 3D coordinates.

:

Finally, also the 3D coordinates are expressed in a homogeneous representation and this is how the camera matrix appears:

: or $mathbf\left\{y\right\} sim mathbf\left\{C\right\} , mathbf\left\{x\right\}$

where $mathbf\left\{C\right\}$ is the camera matrix, which here is given by

:

, and the corresponding camera matrix now becomes

:

The last step is a consequence of $mathbf\left\{C\right\}$ itself being a projective element.

The camera matrix derived here may appear trivial in the sense that it contains very few non-zero element. This depends to a large extent on the particular coordinate systems which have been chosen for the 3D and 2D points. In practice, however, other forms of camera matrices are common, as will be shown below.

The camera focal point

The camera matrix $mathbf\left\{C\right\}$ derived in the previous section has a null space which is spanned by the vector

:

This is also the homogeneous representation of the 3D point which has coordinates (0,0,0), that is, the camera focal point O. This means that the focal point (and only this point) cannot be mapped to a particular point in the image plane by the camera. This is consistent with the fact that the projection line becomes ambiguous in this case.

Normalized camera matrix and normalized image coordinates

The camera matrix derived above can be simplified even further if we assume that "f = 1":

:

where $mathbf\left\{I\right\}$ here denotes a $3 imes 3$ identity matrix. Note that $3 imes 4$ matrix $mathbf\left\{C\right\}$ here is divided into a concatenation of a $3 imes 3$ matrix and a 3-dimensional vector. The camera matrix $mathbf\left\{C\right\}_\left\{0\right\}$ is sometimes referred to as a "canonical form".

So far all points in the 3D world have been represented in a "camera centered" coordinate system, that is, a coordinate system which has its origin at the camera focal point. In practice however, the 3D points may be represented in terms of coordinates relative to an arbitrary coordinate system (X1',X2',X3'). Assuming that the camera coordinate axes (X1,X2,X3) and the axes (X1',X2',X3') are of Euclidean type (orthogonal and isotropic), there is a unique Euclidean 3D transformation (rotation and translation) between the two coordinate systems.

The two operations of rotation and translation of 3D coordinates can be represented as the two $4 imes 4$ matrices

: and

where $mathbf\left\{R\right\}$ is a $3 imes 3$ rotation matrix and $mathbf\left\{t\right\}$ is a 3-dimensional translation vector. When the first matrix is multiplied onto the homogeneous representation of a 3D point, the result is the homogeneous representation of the rotated point, and the second matrix performs instead a translation. Performing the two operations in sequence gives a combined rotation and translation matrix

:

Assuming that $mathbf\left\{R\right\}$ and $mathbf\left\{t\right\}$ are precisely the rotation and translations which relate the two coordinate system (X1,X2,X3) and (X1',X2',X3') above, this implies that

:

where $mathbf\left\{x\right\}\text{'}$ is the homogeneous representation of the point P in the coordinate system (X1',X2',X3').

Assuming also that the camera matrix is given by $mathbf\left\{C\right\}_\left\{0\right\}$, the mapping from the coordinates in the (X1',X2',X3') system to homogeneous image coordinates becomes

:

Consequently, the camera matrix which relates points in the coordinate system (X1',X2',X3') to image coordinates is

:

a concatenation of a 3D rotation matrix and a 3-dimensional translation vector.

This type of camera matrix is referred to as a "normalized camera matrix", it assumes focal length = 1 and that image coordinates are measured in a coordinate system where the origin is located at the intersection between axis X3 and the image plane and has the same units as the 3D coordinate system. The resulting image coordinates are referred to as "normalized image coordinates".

The camera focal point

The null space of the normalized camera matrix $mathbf\left\{C\right\}_\left\{N\right\}$ described above is spanned by the 4-dimensional vector

:

This is also, again, the coordinates of the focal point but now relative to the (X1',X2',X3') system. This can be seen by applying first the rotation and then the translation to the 3-dimensional vector $ildemathbf\left\{n\right\}$ and the result is the homogeneous representation of 3D coordinates (0,0,0).

This implies that the focal point (in its homogeneous representation) lies in the null space of the camera matrix, provided that it is represented in terms of 3D coordinates relative to the same coordinate system as the camera matrix refers to.

The normalized camera matrix $mathbf\left\{C\right\}_\left\{N\right\}$ can now be written as

:

where $ildemathbf\left\{n\right\}$ is the 3D coordinates of the focal point relative to the (X1',X2',X3') system.

General camera matrix

Given the mapping produced by a normalized camera matrix, the resulting normalized image coordinates can be transformed by means of an arbitrary 2D homography. This includes 2D translations and rotations as well as scaling (isotropic and anisotropic) but also general 2D perspective transformations. Such a transformation can be represented as a $3 imes 3$ matrix $mathbf\left\{H\right\}$ which maps the homogeneous normalized image coordinates $mathbf\left\{y\right\}$ to the homogeneous transformed image coordinates $mathbf\left\{y\right\}\text{'}$:

: $mathbf\left\{y\right\}\text{'} = mathbf\left\{H\right\} , mathbf\left\{y\right\}$

Inserting the above expression for the normalized image coordinates in terms of the 3D coordinates gives

: $mathbf\left\{y\right\}\text{'} = mathbf\left\{H\right\} , mathbf\left\{C\right\}_\left\{N\right\} , mathbf\left\{x\right\}\text{'}$

This produces the most general form of camera matrix

:

References

* cite book
author=Richard Hartley and Andrew Zisserman
title=Multiple View Geometry in computer vision
publisher=Cambridge University Press
year=2003
id=ISBN 0-521-54051-8

Wikimedia Foundation. 2010.

### Look at other dictionaries:

• Matrix - получить на Академике действующий промокод Pharmacosmetica или выгодно matrix купить со скидкой на распродаже в Pharmacosmetica

• Camera resectioning — (often called camera calibration) is the process of finding the true parameters of the camera that produced a given photograph or video. These parameters characterize the transformation that maps 3D points in the scene to 2D points in the camera… …   Wikipedia

• Matrix — Données clés Titre original The Matrix …   Wikipédia en Français

• Matrix (monde imaginaire) — Matrix Matrix Titre original The Matrix Titre québécois La Matrice Réalisation Andy et Larry Wachowski Acteurs principaux …   Wikipédia en Français

• Matrix (univers de fiction) — Matrix Matrix Titre original The Matrix Titre québécois La Matrice Réalisation Andy et Larry Wachowski Acteurs principaux …   Wikipédia en Français

• Matrix (mathematics) — Specific elements of a matrix are often denoted by a variable with two subscripts. For instance, a2,1 represents the element at the second row and first column of a matrix A. In mathematics, a matrix (plural matrices, or less commonly matrixes)… …   Wikipedia

• Caméra intelligente — Une caméra Intelligente [1] est un système de vision (Vision industrielle) compact qui capture des images et les interpréte. Sommaire 1 Description 2 Utilisation 3 Caractéri …   Wikipédia en Français

• Pinhole camera model — The pinhole camera model describes the mathematical relationship between the coordinates of a 3D point and its projection onto the image plane of an ideal pinhole camera, where the camera aperture is described as a point and no lenses are used to …   Wikipedia

• The Matrix — Matrix Matrix Titre original The Matrix Titre québécois La Matrice Réalisation Andy et Larry Wachowski Acteurs principaux …   Wikipédia en Français

• The Matrix — For the series, see The Matrix (franchise). For other uses, see Matrix. The Matrix Theatrical release poster Directed by Andy Wachowski Larry Wachowski …   Wikipedia

• Calibrage de caméra — Calibration de caméra En traitement d image, l opération de calibration de caméra revient à modéliser le processus de formation des images, c est à dire trouver la relation entre les coordonnées spatiales d un point de l espace avec le point… …   Wikipédia en Français