This decomposition is proposed in the book “Multiple View Geometry in computer vision” by Hartley and Zisserman. It is basically a RQ decomposition (which takes a matrix \(M\) and finds a right, upper diagonal camera matrix \(K\) and a orthogonal matrix \(Q\) so that \(M = aKQ\) (\(a\) is a normalizing factor (\(R[-1,-1]\))).
This specific function has the following extra steps:
1) it defines a diagonal matrix \(D\) which, when post-multiplied by \(K\) makes its diagonal elements positive.
The use of these steps is that when the matrix \(M\) is a DLT matrix, \(K\) is a camera matrix, and \(Q\) is the orientation of the camera (its rows are the front, down and left vectors, respectively).
Parameters : | A : numpy.ndarray \((3,3)\)
|
---|---|
Returns : | K : numpy.ndarray \((3,3)\)
Q : numpy.ndarray \((3,3)\)
|