I created a simple test application to perform translation (T) and rotation (R) estimation from the essential matrix.
- Generate 50 random Points.
- Calculate projection pointSet1.
- Transform Points via matrix (R|T).
- Calculate new projection pointSet2.
- Then calculate fundamental matrix F.
- Extract essential matrix like
E = K2^T F K1(K1, K2- internal camera matrices). - Use SVD to get
UDV^T.
And calculate restoredR1 = UWV^T, restoredR2 = UW^T. And see that one of them equal to initial R.
But when I calculate translation vector, restoredT = UZU^T, I get normalized T.
restoredT*max(T.x, T.y, T.z) = T
How to restore correct translation vector?