Replaced CV_RANSAC in findHomography with CV_LMEDS (videostab)
authorAlexey Spizhevoy <no@email>
Fri, 27 Apr 2012 12:38:33 +0000 (12:38 +0000)
committerAlexey Spizhevoy <no@email>
Fri, 27 Apr 2012 12:38:33 +0000 (12:38 +0000)
modules/videostab/src/global_motion.cpp
modules/videostab/src/motion_stabilizing.cpp

index a835943..c9998ab 100644 (file)
@@ -429,7 +429,7 @@ Mat MotionEstimatorRansacL2::estimate(InputArray points0, InputArray points1, bo
     else
     {
         vector<uchar> mask;
-        M = findHomography(points0, points1, mask, CV_RANSAC, ransacParams_.thresh);
+        M = findHomography(points0, points1, mask, CV_LMEDS);
         for (int i  = 0; i < npoints; ++i)
             if (mask[i]) ninliers++;
     }
index 417ccf7..800ac80 100644 (file)
@@ -264,8 +264,10 @@ void LpMotionStabilizer::stabilize(
         {
             set(r, c, pt[i].x); set(r, c+1, pt[i].y); set(r, c+2, 1);
             set(r+1, c, pt[i].y); set(r+1, c+1, -pt[i].x); set(r+1, c+3, 1);
-            rowlb_[r] = pt[i].x-tw; rowub_[r] = pt[i].x+tw;
-            rowlb_[r+1] = pt[i].y-th; rowub_[r+1] = pt[i].y+th;
+            rowlb_[r] = pt[i].x-tw;
+            rowub_[r] = pt[i].x+tw;
+            rowlb_[r+1] = pt[i].y-th;
+            rowub_[r+1] = pt[i].y+th;
         }
     }