Replaced CV_RANSAC in findHomography with CV_LMEDS (videostab)

This commit is contained in:
Alexey Spizhevoy 2012-04-27 12:38:33 +00:00
parent 54f92013b0
commit 30431b94d9
2 changed files with 5 additions and 3 deletions

View File

@ -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++;
}

View File

@ -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;
}
}