This forum has been archived. All content is frozen. Please use KDE Discuss instead.

how to make a rotation matrix orthonormal?

Tags: None
(comma "," separated)
bennih
Registered Member
Posts
21
Karma
0
OS
Hello,

the title says it all.
Iam searching for a function doing something like this:

Code: Select all
Matrix3f M(Matrix3f::Random());
M = M.orthonormalized();


Didnt found it in the documentation.

Greetings!
jitseniesen
Registered Member
Posts
204
Karma
2
One possibility is to compute the QR decomposition of M and then use the Q matrix M: M = M.householderQr().householderQ(). However, this does not give you the orthogonal matrix closest to M (if I remember correctly, you need to do the polar decomposition for that). If your matrix M is a rotation matrix polluted by round-off error, then using the QR decomposition may be good enough.
bennih
Registered Member
Posts
21
Karma
0
OS
Hello,

thanks.


Bookmarks



Who is online

Registered users: Baidu [Spider], Bing [Bot], Google [Bot], Yahoo [Bot]