Subsections

Aligned Cameras

For cameras perfectly aligned with the axes and with identical intrinsic parameters (the same focal length and principal point), the equations for three-dimensional reconstruction simplify considerably.

In this configuration, the perspective projection equations reduce to

\begin{displaymath}
\begin{array}{l}
u_i = - k_{u} \dfrac{ y - y_i }{ x - x_i ...
...= - k_{v} \dfrac{ z - z_i }{ x - x_i } + v_{0} \\
\end{array}\end{displaymath} (10.17)

where $(x,y,z)$ is a point in “world” coordinates (see the following section) and $(u_i,v_i)$ denotes the coordinates of its projection in the ith image. The point $(u_0,v_0)$ is the principal point, which must be the same for all the cameras involved; by assumption, the cameras must be perfectly aligned with the coordinate axes.

We now consider only the stereo case: for simplicity, the left camera is denoted by subscript 1 and the right camera by 2. The alignment constraints require $x_1=x_2=0$, $y_1=b$, $y_2=0$, and $z_1=z_2=0$, with the right camera placed at the origin of the reference frame without loss of generality. The quantity $b = y_1 - y_2$ is called the baseline.

The difference $d = u_1 - u_2$ between the horizontal coordinates of the projections of the same point in the two images of the stereo pair is called the disparity. Substituting the alignment constraints into equation (10.17) gives

\begin{displaymath}
u_1 - u_2 = d = k_u \frac{ b }{ x }
\end{displaymath} (10.18)

Inverting this simple relationship and substituting it into equation (10.17) makes it possible to recover the world-coordinate point $(x,y,z)$ corresponding to a point $(u_2, v_2)$ in the right camera with disparity $d$:

\begin{displaymath}
\begin{array}{l}
x = k_u \dfrac{b}{d} \\
y = - (u_2 - u_0...
...
z = - (v - v_0) \dfrac{k_u}{k_v} \dfrac{b}{d} \\
\end{array}\end{displaymath} (10.19)

with $v=v_1=v_2$. Clearly, $d \geq 0$ must hold for world points in front of the stereo pair.

As can be seen, each coordinate is determined by the multiplicative factor $b$, the baseline, which is the true scale factor of the reconstruction, and by the inverse disparity $1/d$.

Triangulation in World Coordinates

The coordinates $(x,y,z)$ obtained in this way are sensor coordinates, defined for a particular stereo configuration in which the orientation and position are aligned with and coincident with the coordinate axes. To convert from sensor coordinates to the general case of world coordinates, with arbitrarily oriented cameras, a transformation from sensor to world coordinates must be applied: the rotation matrix $\prescript{w}{}{\mathbf{R}}_{b}$ and the translation $(x_i,y_i,z_i)^{\top}$ of the pin-hole coordinates, so that we can write

\begin{displaymath}
\begin{bmatrix}
x \\ y \\ z
\end{bmatrix} = \prescript{w...
...nd{bmatrix} + \begin{bmatrix}
x_i \\ y_i \\ z_i
\end{bmatrix}\end{displaymath} (10.20)

Combining equation (10.19) with equation (10.20), we can define a matrix $\mathbf{M}$ such that the conversion from image-disparity point $(u_i,v,d)$ to world coordinates $(x,y,z)$ can be written in the compact form

\begin{displaymath}
\begin{bmatrix}
x \\ y \\ z
\end{bmatrix} = \frac{1}{d} ...
...nd{bmatrix} + \begin{bmatrix}
x_i \\ y_i \\ z_i
\end{bmatrix}\end{displaymath} (10.21)

where i can denote either the left or the right camera.

Paolo medici
2026-10-19