Determinant error (Bug #492)
Description
I have some troubles in using determinant() function.
Here an example thet explains the problem.
I calculate the determinant on this 2x2 matrix:
M= [ 0.00397431 2.97867e-11 ]
[ 2.97867e-11 0.00397431 ]
and this is the result of determinant(M): -7.63802e-09
While the result of manual calc is 1.57951e-05.
I calculate determinant in this way:
double d = M.at<float> (0, 0) * M.at<float> (1, 1) - M.at<float> (0, 1) * M.at<float> (0, 1);
Also inv matrix is wrong and this could be related to wrong determinant.
Associated revisions
Merge pull request #492 from taka-no-me:fix_warnings_gcov
History
Updated by Delia Passalacqua over 14 years ago
There was a wrong matrix dimension in my code.
- Status changed from Open to Done
- (deleted custom field) set to invalid