Minor changes in videostab module
authorAlexey Spizhevoy <no@email>
Thu, 26 Apr 2012 11:56:30 +0000 (11:56 +0000)
committerAlexey Spizhevoy <no@email>
Thu, 26 Apr 2012 11:56:30 +0000 (11:56 +0000)
modules/videostab/src/global_motion.cpp

index 3fc4c2b..a835943 100644 (file)
@@ -460,9 +460,6 @@ Mat MotionEstimatorL1::estimate(InputArray points0, InputArray points1, bool *ok
     const int npoints = points0.getMat().checkVector(2);
     CV_Assert(points1.getMat().checkVector(2) == npoints);
 
-    const Point2f *points0_ = points0.getMat().ptr<Point2f>();
-    const Point2f *points1_ = points1.getMat().ptr<Point2f>();
-
 #ifndef HAVE_CLP
 
     CV_Error(CV_StsError, "The library is built without Clp support");
@@ -475,6 +472,9 @@ Mat MotionEstimatorL1::estimate(InputArray points0, InputArray points1, bool *ok
 
     // prepare LP problem
 
+    const Point2f *points0_ = points0.getMat().ptr<Point2f>();
+    const Point2f *points1_ = points1.getMat().ptr<Point2f>();
+
     int ncols = 6 + 2*npoints;
     int nrows = 4*npoints;