Definitionintro
Camera intrinsic matrix
Also called calibration matrix, K matrix.
The upper triangular 3 by 3 matrix of focal lengths, skew and principal point that maps camera coordinates of a ray to pixel coordinates.
The camera intrinsic matrix is the upper triangular matrix that turns the direction of a ray, given in the frame of the camera, into the pixel where that ray meets the image. It holds the five internal parameters of a pinhole camera: two focal lengths in pixels, a skew and the two coordinates of the principal point. It does not hold the position or the turn of the camera, which are the extrinsic parameters, and it does not hold lens distortion. Together the two give the camera projection matrix . The graphics page pinhole camera model describes the same camera, but it looks along ; here the camera looks along .
Definition
Camera frame. The camera frame has its origin at the center of projection, to the right, down and forward along the optical axis. A point is in front of the camera if . Its normalized image coordinates are , the point where its ray meets the plane .
Pixels. An image has columns and rows. The pixel is in column (to the right) and row (down), and the origin is the top left pixel. We put the center of pixel at the point , as Hartley and Zisserman (HZ) and OpenCV do.
The matrix. The intrinsic matrix is
and it maps a point in the camera frame to its pixel by
The symbol means equal up to a nonzero scale, here the scale .
- and are the focal length in pixels along the rows and the columns: is the distance from the center to the image plane, and , are the numbers of pixels per unit length on the sensor. If the pixels are square, . The ratio is the aspect ratio.
- is the principal point, the pixel where the optical axis meets the image. It is near the image center, but it is not the image center.
- is the skew. It is not zero only if the axes of the pixel grid are not perpendicular. For almost all modern cameras , and many calibration programs fix it to 0.
So has 5 degrees of freedom, 4 with zero skew and 3 with zero skew and square pixels. Any upper triangular matrix with a positive diagonal is a multiple of exactly one such : divide it by its last entry.
The inverse. is invertible, with
For a pixel , the vector is the direction of the ray that the pixel sees, in the camera frame. Its last entry is 1, and its first two entries are . So and convert between pixels and normalized coordinates. Lens distortion acts on normalized coordinates: project, distort, then apply (see Brown-Conrady distortion model).
Angles between rays. The angle between the rays of two pixels and is
This is the angle between and . The matrix is the image of the absolute conic, and a known is what makes angles measurable in an image.
Examples and non-examples
A typical camera. Let , and , for an image of pixels. The point has , so
The pixel is to the right of and above the principal point, because and . Back the other way, , and the point at depth 2 on this ray is again.
Field of view. If the principal point is at the image center, the horizontal field of view is . Here degrees.
The image center depends on the pixel convention. With pixel centers at integer points, the image of columns covers , and its center is . With the convention of the graphics pixel page and of COLMAP, where the center of pixel is at , the same image covers and its center is 320. So a from such a source must be lowered by 0.5 before it is used with the formulas on this page.
Scaling the image. If the image is shrunk by a factor 2 in each direction, the new pixel covers the old coordinates , so an old coordinate becomes . Then and : for the camera above, and . The shift of disappears in the convention, and forgetting it is a common source of small biases.
Non-examples.
- A matrix with , which some graphics code uses for up. It is a valid camera, but not an intrinsic matrix in this convention: the pages of this area keep and put the flip in the axes.
- A lower triangular matrix, or one whose last row is not a multiple of . The decomposition of into and relies on the upper triangular form.
- The projection matrix of OpenGL. It maps to clip coordinates, keeps a depth value for the z-buffer, and is followed by the viewport transform. Its first two rows hold the same focal lengths and principal point, in another scale.
- A distortion model. Radial and tangential distortion are not linear in homogeneous coordinates, so no matrix can hold them.
Related definitions
- Camera extrinsic parameters: the rotation and the translation that take world coordinates into the camera frame used here.
- Camera projection matrix: , the full map from world points to pixels. Camera matrix decomposition recovers from by an RQ decomposition.
- Camera calibration: the problem of finding (and the distortion) from images.
- Image of the absolute conic: , which carries the same information as ; self-calibration estimates and then by a Cholesky factorization.
- Pinhole camera model: the graphics page on the same camera, with the view direction and the map to pixels in the viewport transform.
References
- Richard Hartley and Andrew Zisserman, Multiple View Geometry in Computer Vision, second edition, Cambridge University Press, 2004, Section 6.1, Finite cameras (the camera calibration matrix, its five parameters, and the meaning of each one)
- Richard Szeliski, Computer Vision, Algorithms and Applications, second edition, Springer, 2022, Chapter 2, Image formation (the calibration matrix and the camera intrinsics)
- Peter Sturm, Srikumar Ramalingam, Jean-Philippe Tardif, Simone Gasparini and Joao Barreto, Camera models and fundamental concepts used in geometric computer vision, Foundations and Trends in Computer Graphics and Vision 6(1-2), 2011, 1-183, the part on central perspective cameras and their intrinsic parameters
Where this leads
- Brown-Conrady distortion model
- Camera calibration
- Camera projection matrix
- Depth from disparity
- Disparity
- Division model of radial distortion
- EPnP
- Essential matrix
- Fundamental matrix
- Homography decomposition
- Image of the absolute conic
- Kannala-Brandt fisheye model
- Midpoint triangulation
- P3P
- Perspective-n-point
- Unified omnidirectional camera model
- Calibration from vanishing points
- Zhang's calibration method
About this page
The build computes these levels from the evidence in the repository. Each row says what the next level needs. Read what the levels mean.
| Ladder | Level | What the next level needs |
|---|---|---|
| Human proof | H0 no proof |
|
| Lean | L0 no Lean part |
|
| Visual | V0 none |
|
| Writing | W4 complete |
|
Tag 08K0VT Edit this page History Report an error Markdown