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

How to get polar decomposition with Jacobi using eigen3?

Tags: None
(comma "," separated)
hsharma
Registered Member
Posts
11
Karma
0
Hi,
I am quite new to eigen3, so need some help in calculating polar decomposition with jacobi rotations using eigen3, please reply soon.

Thanks in advance.
User avatar
ggael
Moderator
Posts
3447
Karma
19
OS
It is implemented in Transform::rotation(), e.g.:
Code: Select all
Matrix3f mat = ...;
Affine3f t = mat;
Matrix3f rot = t.rotation();
hsharma
Registered Member
Posts
11
Karma
0
Thanks for the reply but I am getting this error when I use your code:

conversion from 'Eigen::Matrix3d {aka Eigen::Matrix<double,3,3>}' to non-scaler type 'Eigen::Affine3d{aka Eigen::Transform<double, 3,2>}' requested


My problem is:

A = RS {I have the matrix A and I need matrix R and S, separately}

S = sqrt(A.transform() * A) { to calculate this I need to use Jacobi to get Diagonal Matrix}

So that R can be calculated as:

R = A * S.inverse()

I hope it is clear...
User avatar
ggael
Moderator
Posts
3447
Karma
19
OS
right, the ctor is explicit so:

Affine3f t;
t = mat;
hsharma
Registered Member
Posts
11
Karma
0
Thank you so much it worked... :)


Bookmarks



Who is online

Registered users: Bing [Bot], Google [Bot], Sogou [Bot]