提交 30431b94 编写于 作者: A Alexey Spizhevoy

Replaced CV_RANSAC in findHomography with CV_LMEDS (videostab)

上级 54f92013
......@@ -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++;
}
......
......@@ -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;
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册