Commit 4f9a72ea authored by Vadim Pisarevsky's avatar Vadim Pisarevsky

fixed small matrix inversion using Cholesky algorithm (ticket #536)

parent f9753a5a
...@@ -488,7 +488,7 @@ double invert( const Mat& src, Mat& dst, int method ) ...@@ -488,7 +488,7 @@ double invert( const Mat& src, Mat& dst, int method )
result = LU((float*)src1.data, n, (float*)dst1.data, n); result = LU((float*)src1.data, n, (float*)dst1.data, n);
else if( method == DECOMP_LU && type == CV_64F ) else if( method == DECOMP_LU && type == CV_64F )
result = LU((double*)src1.data, n, (double*)dst1.data, n); result = LU((double*)src1.data, n, (double*)dst1.data, n);
else if( method == DECOMP_LU && type == CV_32F ) else if( method == DECOMP_CHOLESKY && type == CV_32F )
result = Cholesky((float*)src1.data, n, (float*)dst1.data, n); result = Cholesky((float*)src1.data, n, (float*)dst1.data, n);
else else
result = Cholesky((double*)src1.data, n, (double*)dst1.data, n); result = Cholesky((double*)src1.data, n, (double*)dst1.data, n);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment