Re: [eigen] Problem inverting a Matrix4f with Eigen 2.0.0

[ Thread Index | Date Index | More Archives ]

Robert Lupton the Good wrote:
I'm using Eigen 2.0.0 to invert some small (4x4) matrices --- I need
the covariance matrix, so there's no need to tell me to

Anyway, with floats, we fail to invert although the determinant is
decent, ~ 3.6e4.  Is there a better way to check for a failed
inversion?  I didn't see anything in the manual.

determinant != condition:

Matlab says the condition of your matrix is 3.8e8, which is pretty bad. (btw: is there a way to calculate condition with Eigen?)

I think invert() uses LU-Decomposition. Have you tried using slightly more stable Cholesky instead? I guess something like this could work:

Matrix4f inverse;

hth, Christoph

Dipl.-Inf. Christoph Hertzberg
Cartesium 0.051
Universität Bremen
Enrique-Schmidt-Straße 5
28359 Bremen

Tel: (+49) 421-218-64252

Mail converted by MHonArc 2.6.19+