icp
icp copied to clipboard
why did this ? what's the meaning?
if (R.determinant() < 0 ){
Vt.block<1,3>(2,0) *= -1;
R = Vt.transpose()*U.transpose();
}
In 3D geometry, the matrix Vt is used to calculate the rotation matrix R. The check if (R.determinant() < 0) is performed to ensure that R is a proper rotation matrix. If the determinant of R is negative, it means that the transformation involves a reflection. In such cases, the line you mentioned is applied to correct the reflection by negating the third row of the transposed matrix Vt.