Added asserts into global motion estimation functions (videostab module)
authorAlexey Spizhevoy <no@email>
Wed, 4 Apr 2012 11:49:48 +0000 (11:49 +0000)
committerAlexey Spizhevoy <no@email>
Wed, 4 Apr 2012 11:49:48 +0000 (11:49 +0000)
modules/videostab/src/global_motion.cpp

index 9d9f503..b3d476c 100644 (file)
@@ -179,6 +179,7 @@ static Mat estimateGlobMotionLeastSquaresAffine(
 Mat estimateGlobalMotionLeastSquares(
         const vector<Point2f> &points0, const vector<Point2f> &points1, int model, float *rmse)
 {
+    CV_Assert(model <= AFFINE);
     CV_Assert(points0.size() == points1.size());
 
     typedef Mat (*Impl)(int, const Point2f*, const Point2f*, float*);
@@ -196,6 +197,7 @@ Mat estimateGlobalMotionRobust(
         const vector<Point2f> &points0, const vector<Point2f> &points1, int model,
         const RansacParams &params, float *rmse, int *ninliers)
 {
+    CV_Assert(model <= AFFINE);
     CV_Assert(points0.size() == points1.size());
 
     typedef Mat (*Impl)(int, const Point2f*, const Point2f*, float*);