Camera resectioning is the process of estimating the parameters of a
pinhole camera model
The pinhole camera model describes the mathematical relationship between the coordinates of a point in three-dimensional space and its projection onto the image plane of an ''ideal'' pinhole camera, where the camera aperture is described as a ...
approximating the camera that produced a given photograph or video; it determines which incoming
light ray
In optics, a ray is an idealized geometrical model of light or other electromagnetic radiation, obtained by choosing a curve that is perpendicular to the ''wavefronts'' of the actual light, and that points in the direction of energy flow. Rays ...
is associated with each pixel on the resulting image. Basically, the process determines the
pose of the pinhole camera.
Usually, the camera parameters are represented in a 3 × 4
projection matrix
In statistics, the projection matrix (\mathbf), sometimes also called the influence matrix or hat matrix (\mathbf), maps the vector of response values (dependent variable values) to the vector of fitted values (or predicted values). It describes ...
called the ''
camera matrix''.
The extrinsic parameters define the camera ''
pose'' (position and orientation) while the intrinsic parameters specify the camera image format (focal length, pixel size, and image origin).
This process is often called geometric camera calibration or simply camera calibration, although that term may also refer to
photometric camera calibration or be restricted for the estimation of the intrinsic parameters only. Exterior orientation and interior orientation refer to the determination of only the extrinsic and intrinsic parameters, respectively.
The classic camera calibration requires special objects in the scene, which is not required in ''
camera auto-calibration''.
Camera resectioning is often used in the application of
stereo vision where the camera projection matrices of two cameras are used to calculate the 3D world coordinates of a point viewed by both cameras.
Formulation
The camera projection matrix is derived from the intrinsic and extrinsic parameters of the camera, and is often represented by the series of transformations; e.g., a matrix of camera intrinsic parameters, a 3 × 3
rotation matrix
In linear algebra, a rotation matrix is a transformation matrix that is used to perform a rotation (mathematics), rotation in Euclidean space. For example, using the convention below, the matrix
:R = \begin
\cos \theta & -\sin \theta \\
\sin \t ...
, and a translation vector. The camera projection matrix can be used to associate points in a camera's image space with locations in 3D world space.
Homogeneous coordinates
In this context, we use
to represent a 2D point position in ''pixel'' coordinates and
is used to represent a 3D point position in ''world'' coordinates. In both cases, they are represented in
homogeneous coordinates
In mathematics, homogeneous coordinates or projective coordinates, introduced by August Ferdinand Möbius in his 1827 work , are a system of coordinates used in projective geometry, just as Cartesian coordinates are used in Euclidean geometry. ...
(i.e. they have an additional last component, which is initially, by convention, a 1), which is the most common notation in
robotics
Robotics is the interdisciplinary study and practice of the design, construction, operation, and use of robots.
Within mechanical engineering, robotics is the design and construction of the physical structures of robots, while in computer s ...
and
rigid body
In physics, a rigid body, also known as a rigid object, is a solid body in which deformation is zero or negligible, when a deforming pressure or deforming force is applied on it. The distance between any two given points on a rigid body rema ...
transforms.
Projection
Referring to the
pinhole camera model
The pinhole camera model describes the mathematical relationship between the coordinates of a point in three-dimensional space and its projection onto the image plane of an ''ideal'' pinhole camera, where the camera aperture is described as a ...
, a
camera matrix is used to denote a projective mapping from ''world'' coordinates to ''pixel'' coordinates.
:
where
.
by convention are the x and y coordinates of the pixel in the camera,
is the intrinsic matrix as described below, and
form the extrinsic matrix as described below.
are the coordinates of the source of the light ray which hits the camera sensor in world coordinates, relative to the origin of the world. By dividing the matrix product by
, the theoretical value for the pixel coordinates can be found.
Intrinsic parameters
:
The
contains 5 intrinsic parameters of the specific camera model. These parameters encompass
focal length
The focal length of an Optics, optical system is a measure of how strongly the system converges or diverges light; it is the Multiplicative inverse, inverse of the system's optical power. A positive focal length indicates that a system Converge ...
,
image sensor format, and
camera principal point.
The parameters
and
represent focal length in terms of pixels, where
and
are the inverses of the width and height of a pixel on the projection plane and
is the
focal length
The focal length of an Optics, optical system is a measure of how strongly the system converges or diverges light; it is the Multiplicative inverse, inverse of the system's optical power. A positive focal length indicates that a system Converge ...
in terms of distance.
represents the skew coefficient between the x and the y axis, and is often 0.
and
represent the principal point, which would be ideally in the center of the image.
Nonlinear intrinsic parameters such as
lens distortion are also important although they cannot be included in the linear camera model described by the intrinsic parameter matrix. Many modern camera calibration algorithms estimate these intrinsic parameters as well in the form of non-linear optimisation techniques. This is done in the form of optimising the camera and distortion parameters in the form of what is generally known as
bundle adjustment
In photogrammetry and computer stereo vision, bundle adjustment is simultaneous refining of the 3D coordinates describing the scene geometry, the parameters of the relative motion, and the optical characteristics of the camera(s) employed to acq ...
.
Extrinsic parameters
are the extrinsic parameters which denote the coordinate system transformations from 3D world coordinates to 3D camera coordinates. Equivalently, the extrinsic parameters define the position of the
camera center and the camera's heading in world coordinates.
is the position of the origin of the world coordinate system expressed in coordinates of the camera-centered coordinate system.
is often mistakenly considered the position of the camera. The position,
, of the camera expressed in world coordinates is
(since
is a
rotation matrix
In linear algebra, a rotation matrix is a transformation matrix that is used to perform a rotation (mathematics), rotation in Euclidean space. For example, using the convention below, the matrix
:R = \begin
\cos \theta & -\sin \theta \\
\sin \t ...
). This can be verified by checking that the point