Collinearity equation
# Collinearity equation

The collinearity equations are a set of two equations, used in photogrammetry and computer stereo vision, to relate coordinates in a sensor plane (in two dimensions) to object coordinates (in three dimensions). The equations originate from the central projection of a point of the object through the optical centre of the camera to the image on the sensor plane.

## Definition

Let x,y, and z refer to a coordinate system with the x- and y-axis in the sensor plane. Denote the coordinates of the point P on the object by $x_{P},y_{P},z_{P}$, the coordinates of the image point of P on the sensor plane by x and y and the coordinates of the projection (optical) centre by $x_{0},y_{0},z_{0}$. As a consequence of the projection method there is the same fixed ratio $\lambda$ between $x-x_{0}$ and $x_{0}-x_{P}$, $y-y_{0}$ and $y_{0}-y_{P}$, and the distance of the projection centre to the sensor plane $z_{0}=c$ and $z_{P}-z_{0}$. Hence:

    $x-x_{0}=-\lambda (x_{P}-x_{0})$
    $y-y_{0}=-\lambda (y_{P}-y_{0})$
    $c=\lambda (z_{P}-z_{0}),$

Solving for $\lambda$ in the last equation and entering it in the others yields:

    $x-x_{0}=-c\ {\frac {x_{P}-x_{0}}{z_{P}-z_{0}}}$
    $y-y_{0}=-c\ {\frac {y_{P}-y_{0}}{z_{P}-z_{0}}}$

The point P is normally given in some coordinate system "outside" the camera by the coordinates X, Y and Z, and the projection centre by $X_{0},Y_{0},Z_{0}$. These coordinates may be transformed through a rotation and a translation to the system on the camera. The translation doesn't influence the differences of the coordinates, and the rotation, often called camera transform, is given by a 3×3-matrix R, transforming $(X-X_{0},Y-Y_{0},Z-Z_{0})$ into:

    $x_{P}-x_{0}=R_{11}(X-X_{0})+R_{21}(Y-Y_{0})+R_{31}(Z-Z_{0})$
    $y_{P}-y_{0}=R_{12}(X-X_{0})+R_{22}(Y-Y_{0})+R_{32}(Z-Z_{0})$

and

    $z_{P}-z_{0}=R_{13}(X-X_{0})+R_{23}(Y-Y_{0})+R_{33}(Z-Z_{0})$

Substitution of these expressions, leads to a set of two equations, known as the collinearity equations:

    $x-x_{0}=-c\ {\frac {R_{11}(X-X_{0})+R_{21}(Y-Y_{0})+R_{31}(Z-Z_{0})}{R_{13}(X-X_{0})+R_{23}(Y-Y_{0})+R_{33}(Z-Z_{0})}}$
    $y-y_{0}=-c\ {\frac {R_{12}(X-X_{0})+R_{22}(Y-Y_{0})+R_{32}(Z-Z_{0})}{R_{13}(X-X_{0})+R_{23}(Y-Y_{0})+R_{33}(Z-Z_{0})}}$

The most obvious use of these equations is for images recorded by a camera. In this case the equation describes transformations from object space (X, Y, Z) to image coordinates (x, y). It forms the basis for the equations used in bundle adjustment. They indicate that the image point (on the sensor plate of the camera), the observed point (on the object) and the projection center of the camera were aligned when the picture was taken.

