fixed small matrix inversion using Cholesky algorithm (ticket #536)
authorVadim Pisarevsky <no@email>
Thu, 21 Oct 2010 12:07:49 +0000 (12:07 +0000)
committerVadim Pisarevsky <no@email>
Thu, 21 Oct 2010 12:07:49 +0000 (12:07 +0000)
modules/core/src/lapack.cpp

index 7a95fb4..8871e0a 100644 (file)
@@ -488,7 +488,7 @@ double invert( const Mat& src, Mat& dst, int method )
             result = LU((float*)src1.data, n, (float*)dst1.data, n);
         else if( method == DECOMP_LU && type == CV_64F )
             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);
         else
             result = Cholesky((double*)src1.data, n, (double*)dst1.data, n);