Reply to topic

How to get polar decomposition with Jacobi using eigen3?

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
2194
Karma
15
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
2194
Karma
15
OS
right, the ctor is explicit so:

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

 
Reply to topic

Bookmarks



Who is online

Registered users: alake, Baidu [Spider], bcooksley, Bing [Bot], claydoh, Exabot [Bot], garthecho, Google [Bot], koriun, Majestic-12 [Bot], north, rodsherwin, shmerl, Steve Guilford, verbalshadow, Vim, Yahoo [Bot], šumski