mirror of
https://github.com/opencv/opencv.git
synced 2024-11-29 05:29:54 +08:00
Replaced CV_RANSAC in findHomography with CV_LMEDS (videostab)
This commit is contained in:
parent
54f92013b0
commit
30431b94d9
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user