Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

why did this ? what's the meaning? #4

Open
duguguang opened this issue Oct 11, 2022 · 1 comment
Open

why did this ? what's the meaning? #4

duguguang opened this issue Oct 11, 2022 · 1 comment

Comments

@duguguang
Copy link

if (R.determinant() < 0 ){
    Vt.block<1,3>(2,0) *= -1;
    R = Vt.transpose()*U.transpose();
}
@zlg9folira
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants