Fixed warning on Windows, clarified refineDetectedMarkers method

This commit is contained in:
Benjamin Knecht 2025-02-20 15:12:56 +01:00
parent f212c163e3
commit 1f9d6aa6cf
2 changed files with 2 additions and 2 deletions

View File

@ -340,7 +340,7 @@ public:
* using projectPoint function. If not, missing marker projections are interpolated using global * using projectPoint function. If not, missing marker projections are interpolated using global
* homography, and all the marker corners in the board must have the same Z coordinate. * homography, and all the marker corners in the board must have the same Z coordinate.
* @note This function assumes that the board only contains markers from one dictionary, so only the * @note This function assumes that the board only contains markers from one dictionary, so only the
* first configured dictionary is used. * first configured dictionary is used. It has to match the dictionary of the board to work properly.
*/ */
CV_WRAP void refineDetectedMarkers(InputArray image, const Board &board, CV_WRAP void refineDetectedMarkers(InputArray image, const Board &board,
InputOutputArrayOfArrays detectedCorners, InputOutputArrayOfArrays detectedCorners,

View File

@ -837,7 +837,7 @@ struct ArucoDetector::ArucoDetectorImpl {
} }
// Clean up rejectedImgPoints by comparing to itself and all candidates // Clean up rejectedImgPoints by comparing to itself and all candidates
const float epsilon = 0.000001; const float epsilon = 0.000001f;
auto compareCandidates = [epsilon](std::vector<Point2f> a, std::vector<Point2f> b) { auto compareCandidates = [epsilon](std::vector<Point2f> a, std::vector<Point2f> b) {
for (int i = 0; i < 4; i++) { for (int i = 0; i < 4; i++) {
if (std::abs(a[i].x - b[i].x) > epsilon || std::abs(a[i].y - b[i].y) > epsilon) { if (std::abs(a[i].x - b[i].x) > epsilon || std::abs(a[i].y - b[i].y) > epsilon) {