Documentation – Pilot v26.1

Geometric Camera Models

Definitions

Term Definition Notes
Backward Camera Model A Geometric Camera Model that transforms 2D image points into 3D rays. Opposite direction of the Forward Camera Model. This is sometimes called an “Inverse camera model”. We choose not to use this terminology, as you can invert a forward or backward camera model.
Camera-Relative World Point A World Point in the reference frame of the camera.  
Center of Radial Distortion An Image Point about which the distortion is radially symmetric.  
Central Camera Model A Geometric Camera Model for which all rays go through a single point. Complement to Non-Central Camera Model.
Distortion A deviation from the Pinhole Camera Model.  
Extrinsics A portion of a Geometric Camera Model that describes the position and orientation of an object within a world coordinate system. See also: Pose.
Forward Camera Model A Geometric Camera Model that transforms 3D world points into 2D image points. Opposite direction of the Backward Camera Model.
Geometric Camera Model A model that describes the geometric properties of a camera. This is sometimes referred to as a “geometric calibration model”. A Geometric Camera Model is composed of Extrinsics, Intrinsics, and Distortion.
Global World Point A World Point in the global reference frame.  
Image Coordinate System The basis for describing image points. See Image Coordinate System documentation.
Image Point An ordered pair (x, y) describing a 2D location on the focal plane. An Image Point is defined in an Image Coordinate System.
Intrinsics A portion of a Geometric Camera Model that describes the internal geometric properties of the camera.  
Non-Central Camera Model A Geometric Camera Model for which the rays do not go through a single point. Complement to Central Camera Model. Cameras with a non-stationary entrance pupil position exhibit non-central behaviors.
Pinhole Camera Model A Geometric Camera Model that models a pinhole camera.  
Pose The position and orientation of an object relative to some World Coordinate System. See also: Extrinsics.
Principal Point The Image Point on the focal plane that intersects the optical axis.  
World Point An ordered triple (X, Y, Z) describing a 3D location in a World Coordinate System.  
World Coordinate System The basis (coordinatae ordering, origin, positive positional directions, positive rotation directions) for describing World Points.  

Notation

All vectors are column vectors. Uppercase \(X\), \(Y\), and \(Z\) refer to 3D world points. Lowercase Uppercase \(x\) and \(y\) refer to 2D image points.

Homogeneous Coordinates

Homogeneous coordinates are a set of coordinates with useful properties for perspective geometry [1, 2]:

  • Infinity may be represented with a finite value.
  • Rotations and translations may be represented by a single matrix operation.
  • Homogeneous coordinates may be used for a space with an arbitrary dimension, including 2D (image) and 3D (world) coordinates.

A “standard” coordinate is referred to as inhomogeneous. 

Properties 

  • If and only if the last coordinate of a homogeneous coordinate is 0, then it is at infinity.
  • If and only if the last coordinate of a homogeneous coordinate is not 0, then it is at a finite location.
  • Two homogeneous points are the same iff there exists a non-zero scalar multiplier between them, i.e., \(\mathbf{x}=k\cdot\mathbf{y}\).

Transforms

Inhomogeneous to Homogeneous

The simplest way to convert from an inhomogeneous coordinate to a homogeneous one is to append a 1 to the end of the coordinate. 

\(\begin{bmatrix}x\\y\end{bmatrix}\rightarrow\begin{bmatrix}x\\y\\1\end{bmatrix}\)

\(\begin{bmatrix}X\\Y\\Z\end{bmatrix}\rightarrow\begin{bmatrix}X\\Y\\Z\\1\end{bmatrix}\)

The general conversion is to append 1 and multiply all elements by any non-zero real number.

\(\begin{bmatrix}x\\y\end{bmatrix}\rightarrow\begin{bmatrix}k\cdot x\\k\cdot y\\k\end{bmatrix}\)

\(\begin{bmatrix}X\\Y\\Z\end{bmatrix}\rightarrow\begin{bmatrix}k\cdot X\\k\cdot Y\\k\cdot Z\\k\end{bmatrix}\)

Homogeneous to Inhomogeneous

To convert from a homogeneous coordinate to an inhomogeneous one, divide all of the components by the last one, which is discarded.

\(\begin{bmatrix}x\\y\\w\end{bmatrix}\rightarrow\begin{bmatrix}x/w\\y/w\end{bmatrix}\)

\(\begin{bmatrix}X\\Y\\Z\\W\end{bmatrix}\rightarrow\begin{bmatrix}X/W\\Y/W\\Z/W\end{bmatrix}\)

Intrinsics

The intrinsic matrix, \(\mathbf{K}\), is an upper-triangular matrix that transforms a world coordinate relative to the camera into a homogeneous image coordinate. There are two general and equivalent forms of the intrinsic matrix:

\(\mathbf{K}=\begin{bmatrix} f_x & s & pp_x \\ 0 & f_y & pp_y \\ 0 & 0 & 1\end{bmatrix}=\begin{bmatrix} f & s & pp_x \\ 0 & f\cdot\alpha & pp_y \\ 0 & 0 & 1\end{bmatrix}\)

where

Variable Description
\(f_x\) The x-focal length
\(f_y=f_x\cdot\alpha\) The y-focal length
\(\alpha=f_y/f_x\) The focal length ratios 
\(s\) The skew
\(\mathbf{pp}=\begin{bmatrix}{pp}_x&{pp}_y\end{bmatrix}^\top\) The principal point (intersection of the optical axis with the focal plane)

The intrinsic matrix of the \(j\)th camera is applied to the \(i\)th camera-relative 3D point to produce a homogeneous image point.

\(\begin{bmatrix} {x}_{i}^{j} \\ {y}_{i}^{j} \\{w}_{i}^{j} \end{bmatrix}=\mathbf{K}^j\begin{bmatrix} {X}_{i} \\ {Y}_{i}\\{Z}_i \end{bmatrix}\)

Notes:

  • The focal length(s) are in pixel pitch units to allow for the creation of similar triangles where the units cancel.
  • The principal point is defined in an image coordinate system.

Camera Models

Summary

Model Forward Order of Operations Maximum Field of View Distortion Options Centrality  References Introduced
Simple Pinhole Extrinsics → Intrinsics <180° None Central [1, 2] Imatest 25.2
OpenCV Extrinsics → Distortion → Intrinsics <180° Radial, Tangential, Thin Prism, Tilt Central [3] Imatest 25.2
OpenCV Fisheye Extrinsics → Distortion → Intrinsics <180° Polynomial Central [4] Imatest 26.1
Pinhole + Distortion Extrinsics → Intrinsics → Distortion <180° See Distortion Central [1, 2, 5] Imatest 26.1

Simple Pinhole

The forward direction of the simple pinhole model is: Extrinsics → Intrinsics.

The forward direction of the OpenCV model is given by:

  1. Transform a camera-relative world point \(\begin{bmatrix} {X}_{c} & {Y}_{c} &{Z}_{c} \end{bmatrix}^\top\) through the intrinsics camera matrix: \(\begin{bmatrix} {x_a} \\ {y_a}\\w\end{bmatrix}=\begin{bmatrix} f_x & s & pp_x \\ 0 & f_y & pp_y \\ 0 & 0 & 1\end{bmatrix}\begin{bmatrix} {X}_{c} \\ {Y}_{c} \\{Z}_{c} \end{bmatrix}\)
  2. Convert to an inhomogeneous image point

OpenCV

The OpenCV camera model [3] is defined by the OpenCV library. The version used in Imatest is that of OpenCV 4.12.0.

The forward direction of the OpenCV model is: Extrinsics → Distortion → Intrinsics.

The forward direction of the OpenCV model is given by:

  1. Transform a camera-relative world point \(\begin{bmatrix} {X}_{c} & {Y}_{c} &{Z}_{c} \end{bmatrix}^\top\) into an undistorted image point \(\begin{bmatrix} {x_a} & {y_a}\end{bmatrix}^\top\): \(\begin{bmatrix} {x_a} \\ {y_a}\end{bmatrix}=\begin{bmatrix} {X}_{c} / {Z}_{c} \\ {Y}_{c} / {Z}_{c}\end{bmatrix}\)
  2. Compute the radius, \(r\): \(r=\sqrt{x_a^2+y_a^2}\)
  3. Apply the radial distortion: \(\begin{bmatrix} {x_b} \\ {y_b}\end{bmatrix}=\begin{bmatrix} {x_a\cdot \frac{1+k_1\cdot r^2+k_2\cdot r^4+k_3\cdot r^6}{1+k_4\cdot r^2+k_5\cdot r^4+k_6\cdot r^6}} \\ {y_a\cdot \frac{1+k_1\cdot r^2+k_2\cdot r^4+k_3\cdot r^6}{1+k_4\cdot r^2+k_5\cdot r^4+k_6\cdot r^6}}\end{bmatrix}\)
  4. Apply the tangential distortion: \(\begin{bmatrix} {x_c} \\ {y_c}\end{bmatrix}=\begin{bmatrix} {x_b + 2\cdot p_1\cdot x_a\cdot y_a+p_2\cdot (r^2+2\cdot x_a^2) \\ y_b+ p_1\cdot (r^2+2\cdot y_a^2)+2\cdot p_2\cdot x_a\cdot y_a}\end{bmatrix}\)
  5. Apply the thin-prism distortion: \(\begin{bmatrix} {x_d} \\ {y_d}\end{bmatrix}=\begin{bmatrix} {x_c + s_1\cdot r^2 + s_2\cdot r^4 \\ y_c+ s_3\cdot r^2 + s_4\cdot r^4}\end{bmatrix}\)
  6. Apply the tilt-distortion (and convert back to an inhomogeneous image coordinate): \(w\cdot \begin{bmatrix} {x_e} \\ {y_e} \\ 1\end{bmatrix}=\begin{bmatrix}\cos^2(\tau_x) \cdot \cos(\tau_y) + \cos(\tau_x)\cdot \sin^2(\tau_y) & 0 & 0 \\ -\sin(\tau_x) \cdot \sin(\tau_y) & \cos^2(\tau_x)\cdot \cos(\tau_y) + \cos(\tau_y) \cdot \sin^2(\tau_x) & 0 \\ \sin(\tau_y) & -\cos(\tau_y)\cdot \sin(\tau_x) & \cos(\tau_x) \cdot \cos(\tau_y)\end{bmatrix}\begin{bmatrix} {x_d\\y_d\\1}\end{bmatrix}\)
  7. Apply the intrinsics: \(\begin{bmatrix} {x_f} \\ {y_f}\end{bmatrix}=\begin{bmatrix} f_x\cdot x_e + s\cdot y_e + {pp}_x \\ f_y\cdot y_e + {pp}_y\end{bmatrix}\)

OpenCV Fisheye

The OpenCV Fisheye camera model [4] is defined by the OpenCV library. The version used in Imatest is that of OpenCV 4.12.0.

The forward direction of the OpenCV model is: Extrinsics → Distortion → Intrinsics.

The forward direction of the OpenCV model is given by:

  1. Transform a camera-relative world point \(\begin{bmatrix} {X}_{c} & {Y}_{c} &{Z}_{c} \end{bmatrix}^\top\) into a normalized world point \(\begin{bmatrix} a & b\end{bmatrix}^\top\): \(\begin{bmatrix} a \\ b\end{bmatrix}=\begin{bmatrix} {X}_{c} / {Z}_{c} \\ {Y}_{c} / {Z}_{c}\end{bmatrix}\)
  2. Compute the radius, \(r\): \(r=\sqrt{a^2+b^2}\)
  3. Compute the angle, \(\theta\): \(\theta=\tan^{-1}\left(r\right)\)
  4. Apply the fisheye distortion: \(\theta_d = \theta \cdot \left(1+k_1\cdot \theta^2 + k_2\cdot \theta^4 + k_3\cdot \theta^6 + k_4\cdot \theta^8\right)\)
  5. Compute the normalized, distorted image point \(\begin{bmatrix} x_a & y_a \end{bmatrix}^\top\): \(\begin{bmatrix} x_a \\ y_a \end{bmatrix}=\begin{bmatrix} \frac{\theta_d\cdot a}{r} \\ \frac{\theta_d\cdot b}{r} \end{bmatrix}\)
  6. Apply the 2D intrinsics to convert the normalized, distorted image point into a distorted image point \(\begin{bmatrix} x_b & y_b \end{bmatrix}^\top\): \(\begin{bmatrix} x_b \\ y_b \end{bmatrix} = \begin{bmatrix} f\cdot x_a + s \cdot y_a + {pp}_x \\ f\cdot\alpha\cdot y_a + {pp}_y \end{bmatrix} \)

Notes

  1. The method for computing the angle in steps 1-3 limits this model to 180° FOV.
  2. The form of the intrinsics used in Imatest differs from the OpenCV documented application of intrinsics (step 6): The skew directly multiplies the y-component instead of the skew and focal length multiplying the y-component. When skew is 0, this difference has no effect.

Pinhole + Distortion

The Pinhole + Distortion model is the “classic” camera model from photogrammetry.

The forward direction of the Pinhole + Distortion model is: Extrinsics → Intrinsics → Distortion.

The forward direction of the Pinhole + Distortion model is given by:

  1. Project the camera-relative world point \(\begin{bmatrix} {X}_{c} & {Y}_{c} &{Z}_{c} \end{bmatrix}^\top\) through the intrinsics matrix to get a homogenous undistorted image point \(\begin{bmatrix} {x}_{h} & {y}_{h} & w \end{bmatrix}^\top\)
  2. Convert the homogeneous undistorted image point into an inhomogeneous undistorted image point
  3. Apply the distortion model to transform the inhomogeneous, undistorted image point into a distorted image point.

Distortion Models

Distortion Model: Generic

A generic distortion model transforms undistorted image points into distorted image points.

\(\begin{bmatrix}x_d\\y_d\end{bmatrix}=\begin{bmatrix}F_x\left(x_u, y_u\right)\\F_y\left(x_u, y_u\right)\end{bmatrix}\)

The following distortion models are available:

Model Radial Tangential References Introduced
Brown-Conrady Yes Yes [5] Imatest 26.1
None No No   Imatest 26.1
Radial Yes No [5] Imatest 26.1

Distortion Model: Brown-Conrady

The Brown-Conrady distortion model includes both radial and tangential components.

The forward direction model is given by:

\(\begin{bmatrix}x_d\\y_d\end{bmatrix}=\begin{bmatrix}x_u+(x_d-x_c)\cdot (1+k_1\cdot r^2 + k_2\cdot r^4 + \cdots)+\left[p_1(r^2+2(x_u-x_c)^2)+2p_2(x_u-x_c)(y_u-y_c)\right]\cdot(1+p_3\cdot r^2 + p_4\cdot r^4 + \cdots)\\y_u+(y_d-y_c)\cdot (1+k_1\cdot r^2 + k_2\cdot r^4 + \cdots)+\left[p_2(r^2+2(y_u-y_c)^2)+2p_1(x_u-x_c)(y_u-y_c\right]\cdot(1+p_3\cdot r^2 + p_4\cdot r^4 + \cdots)\end{bmatrix}\)

Where:

\(\begin{bmatrix}x_c & y_c\end{bmatrix}^\top\) is the center of radial distortion

\(r=\sqrt{(x_u-x_c)^2 + (y_u-y_c)^2}\)

Notes:

  • The Brown-Conrady model used in Imatest is a forward (image formation/apply distortion) direction.
  • The ordering of the tangential coefficients (\(p_1, p_2\)) used in Imatest is the “photogrammetry” order.

Distortion Model: None

The None distortion model does not apply any distortion.

The forward direction model is given by:

\(\begin{bmatrix}x_d\\y_d\end{bmatrix}=\begin{bmatrix}x_u\\y_u\end{bmatrix}\)

Distortion Model: Radial

Radial Distortion Models are radially symmetric about a center of distortion.

The forward direction model is given by:

\(\begin{bmatrix}F_x\left(x_d, y_d\right)\\F_y\left(x_u, y_u\right)\end{bmatrix}=\begin{bmatrix}F_r\left(r\right)\cdot \cos(\theta)+x_c\\F_r\left(r\right)\cdot \sin(\theta)+y_c\end{bmatrix}\)

Where

\(\begin{bmatrix}x_c & y_c\end{bmatrix}^\top\) is the center of radial distortion

\(r=\sqrt{(x_u-x_c)^2 + (y_u-y_c)^2}\)
\(\theta=\tan^{-1}\left(\frac{y_u-y_c}{x_u-x_c}\right)\)
\(F_r\left(r\right)\) is a radial distortion model

The following radial distortion models are available:

Model Reference(s) Introduced
Division Polynomial [5] Imatest 26.1
None   Imatest 26.1
Polynomial [5] Imatest 26.1

Radial Distortion Model: Division Polynomial

The forward direction model is given by:

\(F_r\left(r\right)=\frac{r}{1+k_1\cdot r^2 + k_2\cdot r^4 + \cdots}\)

Radial Distortion Model: None

The forward direction model is given by:

\(F_r\left(r\right)=r\)

Radial Distortion Model: Polynomial

The forward direction model is given by:

\(F_r\left(r\right)=r\cdot(1+k_1\cdot r^2 + k_2\cdot r^4 + \cdots)\)

References

[1] Hartley, R., & Zisserman, A. (2003). Multiple view geometry in computer vision. Cambridge University Press.

[2] Ma, Y., Soatto, S., Košecká, J., & Sastry, S. (2004). An invitation to 3-d vision: from images to geometric models (Vol. 26). New York: Springer.

[3] OpenCV. Camera Calibration and 3D Reconstruction. https://docs.opencv.org/4.12.0/d9/d0c/group__calib3d.html [Accessed 2025-08-18]

[4] OpenCV. Fisheye camera model. https://docs.opencv.org/4.12.0/db/d58/group__calib3d__fisheye.html [Accessed 2025-01-02]

[5] Wikipedia. Distortion (optics). https://en.wikipedia.org/wiki/Distortion_(optics) [Accessed 2025-01-02]