[Insight-users] incorrect matrix inverse

Suyash P. Awate suyash at cs.utah.edu
Thu Nov 10 00:09:48 EST 2005


Dear ITK-users,

I used the itk::matrix<double,3,3> class to compute the matrix inverse 
(GetInverse()) for a 3x3 matrix and I got a warning followed by an 
incorrect answer.

I found the correct inverse in matlab and checked that the condition 
number of the matrix was 1.

So I am wondering why vnl would find this difficult. I also did not 
understand the warnings very well. It would be great if someone shed 
some light on this. Thank you so much.

Best regards,
Suyash.


matrix
 0.99925   0.0371382 -0.0109982
-0.0373772 0.99905   -0.0223916
 0.0101562 0.0227859  0.999689


warnings:
InsightToolkit-2.2.0/Utilities/vxl/core/vnl/algo/vnl_svd.txx: suspicious 
return value (2) from SVDC
InsightToolkit-2.2.0/Utilities/vxl/core/vnl/algo/vnl_svd.txx: M is 3x3
M = [ ...
 0.9992500000000  0.0371382000000 -0.0109982000000
-0.0373772000000  0.9990500000000 -0.0223916000000
 0.0101562000000  0.0227859000000  0.9996890000000  ]


matrix inverse using vnl in itk (incorrect)
-0.982557 -0.0644525 -0.174434
-0.0677511 0.997618   0.0130162
-0.17318  -0.0246073  0.984583


matrix inverse in matlab (correct)
 0.9992   -0.0374    0.0102
 0.0371    0.9991    0.0228
-0.0110   -0.0224    0.9997


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://public.kitware.com/pipermail/insight-users/attachments/20051109/9732307b/attachment.htm


More information about the Insight-users mailing list