Commit b64e106b authored by Vadim Pisarevsky's avatar Vadim Pisarevsky

Merge pull request #3703 from BKNio:fixing_bad_alloc

parents 1d356b6a 21ee113a
......@@ -544,6 +544,9 @@ Mat MotionEstimatorL1::estimate(InputArray points0, InputArray points1, bool *ok
CV_Assert(motionModel() <= MM_AFFINE && motionModel() != MM_RIGID);
if(npoints <= 0)
return Mat::eye(3, 3, CV_32F);
// prepare LP problem
const Point2f *points0_ = points0.getMat().ptr<Point2f>();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment