Xq11 + Yq12 + Zq13 + q14 - uXq31 - uYq32 - uZq33 = u
andXq21 + Yq22 + Zq23 + q24 - vXq31 - vYq32 - vZq33 = v.
In fact, using the given structure of C, this can be written in shorthand as
and We can write this as(5) |
We will first solve this system, however, without taking into account any special structure in the matrix C.
So given a set of N 3D world points and their image coordinates, we can build up the following matrix equation:
where the matrix of knowns is .With 11 unknowns and each point providing 2 constraint equations, we need at least six points to solve the equation.
The best least squares estimate of the qij is obtained using the pseudo-inverse. If we write the equation above as
then When the equations are over-constrained, as in our case, the pseudo-inverse is given byIn general, this matrix equation is very ill-conditioned and care must be taken in finding its solution.
Let's return now to the formulation given in equation (5). This is just a system of linear equation and we want to solve for q. Constraints must be imposed upon q however, to avoid the trivial solution q = 0, which is not physically significant. It is natural to use the constraints given to us by the structure of the matrix C, namely and . This is done via a technique known as constrained optimisation, which we will not cover in lectures. Suffice it to say, it leads to a closed form solution. What is of more interest though, is the question of the rank of the matrix L, since this leads to an understanding of how the reference points should be chosen.
We know from standard linear algebra that if we have an matrix L then
where null(L) represents the dimension of the nullspace of L. In our case m = 12 and there are three cases to consider:It is possible to re-cast the problem of solving equation (5) as a non-linear minimization problem, where we attempt to minimize the distance in the image plane between the points mi and the re-projected points Mi. We can do this by defining the quantity
We then use constrained minimization techniques to minimize E, subject to the constraint that . In general, non-linear methods lead to much more robust solutions.