提交 21ee113a 编写于 作者: A Ahmatnurov Dinar

fixig std::bad_alloc

if points0 is empty checkVector(2) return -1, it causes the exception
上级 fdf31ec1
......@@ -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% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册