From f4848df8e32e287c4d835149cca516d1049ee2a0 Mon Sep 17 00:00:00 2001 From: Liu Yunhuang <1369215984@qq.com> Date: Mon, 15 Apr 2024 13:23:40 +0800 Subject: [PATCH] fix(issue#9): more bigger adaptive threshod region and use CALIB_CB_CLUSTERING to find wide field of vision features. --- src/calibration/concentricRingCalibrator.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/calibration/concentricRingCalibrator.cpp b/src/calibration/concentricRingCalibrator.cpp index 426bcbd..9a43900 100644 --- a/src/calibration/concentricRingCalibrator.cpp +++ b/src/calibration/concentricRingCalibrator.cpp @@ -136,7 +136,7 @@ bool ConcentricRingCalibrator::findConcentricRingGrid( cv::Mat src_display = inputImg.clone(); cv::Mat threshodFindCircle = inputImg.clone(); cv::adaptiveThreshold(threshodFindCircle, threshodFindCircle, 255, - cv::ADAPTIVE_THRESH_MEAN_C, cv::THRESH_BINARY, 41, 0); + cv::ADAPTIVE_THRESH_MEAN_C, cv::THRESH_BINARY, 51, 0); // cv::threshold(threshodFindCircle, threshodFindCircle, 0, 255, // cv::THRESH_BINARY | cv::THRESH_OTSU); @@ -154,8 +154,8 @@ bool ConcentricRingCalibrator::findConcentricRingGrid( if (!isFind) { pointsOfCell.clear(); isFind = cv::findCirclesGrid( - threshodFindCircle, cv::Size(patternSize.height, patternSize.width), - pointsOfCell, cv::CALIB_CB_SYMMETRIC_GRID, detector); + threshodFindCircle, cv::Size(patternSize.width, patternSize.height), + pointsOfCell, cv::CALIB_CB_SYMMETRIC_GRID | cv::CALIB_CB_CLUSTERING, detector); if (!isFind) { return false;