The actual least-square algorithm to be incorporated in a DLT programs is more complex than  of the DLT Method page. Typical least-square algorithm involves weights to assure a more stable set of zeros. For this, add the weight matrix to  of the DLT Method page:
n = number of the equations, and W = diagonal weight matrix.
In the camera calibration, matrices X, Y & L shown in  are
where = the image-plane coordinates, = the object- space coordinates, L1 - L16 = the DLT and additional parameters, n = the number of control points, and
and = the coordinates of the principal point.
From  and  of the DLT Method page:
where = the random errors involved in the equation, and = optical errors.
It was assumed in  that L1 - L11 and R are constants and
where = the variances of the equations, = the variances of the image-plane coordinates, and = the variances of the object-space coordinates. The variance of the image-plane coordinates can be obtained by repeating digitization of the control points and computing the variance of their image-plane coordinates. The variance of the object-space coordinates can be obtained by repeating measurement of the real-life coordinates of the control points and computing their variance. It was assumed in  that x, y, z, u, and v are mutually independent.
It is a common practice to use the reciprocal of the variance as the weight associated with the equation:
Matrix X and Y in  both contain R that is a function of L9 - L11. For this reason, an iterative approach is typically employed in the camera calibration. Here are a sketch of the iterative approach commonly used in programming:
The variance-covariance matrix of the parameters can be expressed as
MSE in  is the mean square error from the least-square estimation. Since a control point provides two equations, the DOF (degree of freedom) for the MSE computation is 2n - 16 as shown in . The variance-covariance matrix of the parameters is symmetric and square (11 x 11):
The diagonal terms are the variances while the off-diagonal terms are the covariances.
In the reconstruction, matrices X, Y & L shown in  are
where m = the number of cameras, and
Although the weight matrix is again in the form of , the actual method to compute the weights is different from . From :
It was assumed in  that x, y, and z are constants and . Therefore, the variances of the equations are
where = the variance/covariance between the parameters from , and
It was assumed in  that u and v are independent from L1 - L11. L1 - L11 are mutually dependent. The weight matrix for the reconstruction, therefore, becomes
where m = the number of cameras.
Again, an iterative approach must be used in solving the system:
Marzan, G.T. & Karara, H.M. (1975). A computer program for direct lnear transformation solution of the collinearity condition, and some spplications of it. Proceedings of the Symposium on Close-Range Photogrammetric Systems (pp. 420-476). Falls Church, VA: American Society of Photogrammetry.
Neter, J., Wasserman, W., and Kutner, M.H. (1985). Applied linear statistical models, 2nd Ed. Homewood, IL: Irwin.
© Young-Hoo Kwon, 1998-