Replaced DECOMP_SVD with DECOMP_NORMAL|DECOMP_LU for speed (videostab)
authorAlexey Spizhevoy <no@email>
Fri, 20 Apr 2012 09:02:39 +0000 (09:02 +0000)
committerAlexey Spizhevoy <no@email>
Fri, 20 Apr 2012 09:02:39 +0000 (09:02 +0000)
modules/videostab/src/global_motion.cpp

index 56c278f..f3f4fc2 100644 (file)
@@ -136,7 +136,7 @@ static Mat estimateGlobMotionLeastSquaresTranslationAndScale(
     }
 
     Mat_<float> sol;
-    solve(A, b, sol, DECOMP_SVD);
+    solve(A, b, sol, DECOMP_NORMAL | DECOMP_LU);
 
     if (rmse)
         *rmse = static_cast<float>(norm(A*sol, b, NORM_L2) / sqrt(static_cast<double>(npoints)));
@@ -173,7 +173,7 @@ static Mat estimateGlobMotionLeastSquaresSimilarity(
     }
 
     Mat_<float> sol;
-    solve(A, b, sol, DECOMP_SVD);
+    solve(A, b, sol, DECOMP_NORMAL | DECOMP_LU);
 
     if (rmse)
         *rmse = static_cast<float>(norm(A*sol, b, NORM_L2) / sqrt(static_cast<double>(npoints)));
@@ -212,7 +212,7 @@ static Mat estimateGlobMotionLeastSquaresAffine(
     }
 
     Mat_<float> sol;
-    solve(A, b, sol, DECOMP_SVD);
+    solve(A, b, sol, DECOMP_NORMAL | DECOMP_LU);
 
     if (rmse)
         *rmse = static_cast<float>(norm(A*sol, b, NORM_L2) / sqrt(static_cast<double>(npoints)));