## How to get polar decomposition with Jacobi using eigen3?

hsharma
Registered Member
Posts
11
Karma
0

### How to get polar decomposition with Jacobi using eigen3?

Sat Jul 13, 2013 2:33 pm
Hi,
I am quite new to eigen3, so need some help in calculating polar decomposition with jacobi rotations using eigen3, please reply soon.

ggael
Moderator
Posts
2194
Karma
15
OS

### Re: How to get polar decomposition with Jacobi using eigen3?

Sat Jul 13, 2013 8:05 pm
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

### Re: How to get polar decomposition with Jacobi using eigen3?

Sat Jul 13, 2013 9:52 pm
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...
ggael
Moderator
Posts
2194
Karma
15
OS

### Re: How to get polar decomposition with Jacobi using eigen3?

Sun Jul 14, 2013 11:36 am
right, the ctor is explicit so:

Affine3f t;
t = mat;
hsharma
Registered Member
Posts
11
Karma
0

### Re: How to get polar decomposition with Jacobi using eigen3?

Sun Jul 14, 2013 4:13 pm
Thank you so much it worked...

## 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