I created a simple test application to evaluate translation (T) and rotation (R) from the main matrix.
- Create 50 random Points .
- Compute the projection pointSet1 .
- Transform Points through the matrix (R | T).
- Calculate the new pointSet2 projection.
- Then we calculate the fundamental matrix F.
- Extract the essential matrix, for example,
E = K2^TF K1 ( K1, K2 are the internal matrixes of the camera). - Use SVD to get
UDV^T
And calculate restoredR1 = UWV^T , restoredR2 = UW^T And look that one of them is equal to the initial R.
But when I compute the translation vector, restoredT = UZU^T , I get a normalized T.
restoredT*max(Tx, Ty, Tz) = T
How to restore the correct translation vector?
opencv computer-vision linear-algebra
Vie
source share