This section is heavily based on the contents of @hartley2003multiple.
The projections of a 3D point
Adding intrinsic parameters with
This matrix links the relative position of the cameras to the fundamental matrix. Camera poses can be recovered using SVD decomposition.
where
By defining a helper matrix
the rotation matrix
In some cases an alternative formulation of the translation vector can be used if
If the scene is planar (
The triangulation problem consists of computing the 3D point
- Compute the mid-point of the shortest line between the two projection rays using vector
- Compute the linear triangulation using linear algebra, where
$X$ can be solved up to scale. However the value being minimized has no geometric meaning and multiplying the equations by some weights will change the solution. The iterative approach reweights the linear equations adaptively so that this equations correspond to errors in point coordinates. The main advantage of these methods is that they are easy to implement but convergence is not always guaranteed. The iterations can be applied over two different linear methods:-
Eigen: find
$\mathbf{x}$ which minimize$||Ax||, ||x|| = 1$ . The solution is the unit eigenvector corresponding to the smallest eigenvector of the matrix$A^TA$ computed using SVD. -
Least-Squares: representing
$x = (x, y, z, 1)$ the set of homogeneous equations$\mathbf{A}\mathbf{x} = 0$ can be reduced to 4 non-homogeneous equations in 3 unknowns. SVD or pseudo-inverses can be used to solve this problem.
-
Eigen: find
- Minimizing a statistical error (optimization): the aim is to estimate a
$\mathbf{\hat{X}}$ from$\mathbf{x}$ , \mathbf{x}'$ which minimizes the reprojection error using$d$ as the euclidean distance between two points.
Even when minimization appears to be over the three parameters of
Triangulation can be applied from two to
- For each correspondence
$(\mathbf{x},\mathbf{x}')$ build matrix$\mathbf{A}_i$ with at least the first two rows - Join
$2n \times 9$ matrices$\mathbf{A}_i$ into a single$\mathbf{A}$ - Compute the
$SVD(\mathbf{A})$ - The solution for
$\mathbf{h}$ is the last column of$V$ - Determine
$\mathbf{H}$ from$\mathbf{h}$
In order to guaranteed method stability since DLT is not invariant, it is recommended to normalize coordinates in both images independently before applying DLT and denormalize after.
- Translate centroid to the origin
- Scale to a
$\sqrt{2}$ average distance to the origin
The resulting matrix to apply will be: