1
0
mirror of https://github.com/opencv/opencv.git synced 2026-07-30 07:43:03 +04:00

Merge remote-tracking branch 'upstream/3.4' into merge-3.4

This commit is contained in:
Alexander Alekhin
2022-08-14 15:50:42 +00:00
37 changed files with 246 additions and 90 deletions
+3 -2
View File
@@ -1232,7 +1232,7 @@ int ChessBoardDetector::cleanFoundConnectedQuads(std::vector<ChessBoardQuad*>& q
centers[i] = ci;
center += ci;
}
center.x *= (1.0f / quad_count);
center *= (1.0f / quad_count);
// If we still have more quadrangles than we should,
// we try to eliminate bad ones based on minimizing the bounding box.
@@ -1256,7 +1256,7 @@ int ChessBoardDetector::cleanFoundConnectedQuads(std::vector<ChessBoardQuad*>& q
Mat points(1, quad_count, CV_32FC2, &centers[0]);
cv::convexHull(points, hull, true);
centers[skip] = temp;
double hull_area = contourArea(hull, true);
double hull_area = contourArea(hull, false);
// remember smallest box area
if (hull_area < min_box_area)
@@ -1298,6 +1298,7 @@ int ChessBoardDetector::cleanFoundConnectedQuads(std::vector<ChessBoardQuad*>& q
quad_group[min_box_area_index] = quad_group[quad_count];
centers[min_box_area_index] = centers[quad_count];
}
quad_group.resize(quad_count);
return quad_count;
}
+1 -1
View File
@@ -601,7 +601,7 @@ int cv::recoverPose( InputArray E, InputArray _points1, InputArray _points2,
P3(Range::all(), Range(0, 3)) = R1 * 1.0; P3.col(3) = -t * 1.0;
P4(Range::all(), Range(0, 3)) = R2 * 1.0; P4.col(3) = -t * 1.0;
// Do the cheirality check.
// Do the chirality check.
// Notice here a threshold dist is used to filter
// out far away points (i.e. infinite points) since
// their depth may vary between positive and negative.