Skip to content

Commit

Permalink
fix(issue#9): more bigger adaptive threshod region and use CALIB_CB_C…
Browse files Browse the repository at this point in the history
…LUSTERING to find wide field of vision features.
  • Loading branch information
Practice3DVision committed Apr 15, 2024
1 parent 36a936f commit f4848df
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/calibration/concentricRingCalibrator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand All @@ -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;
Expand Down

0 comments on commit f4848df

Please sign in to comment.