Skip to content

Commit d50ac0b

Browse files
committedApr 23, 2024
fix(concentricRingCalibrator.h/.cpp): more robust and accuracy algorithm.
1. use vonishing line to recover circle point.
1 parent 31b397e commit d50ac0b

File tree

4 files changed

+283
-61
lines changed

4 files changed

+283
-61
lines changed
 

‎gui/src/CalibrateEngine.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ void CalibrateEngine::stereoCalibrate(const int targetType, const int rowNum,
205205
leftCalibrator_->imgs(), caliInfo_.info_.M1_,
206206
caliInfo_.info_.D1_, cv::Size(rowNum, colNum), progress_);
207207

208-
if (leftError > 0.99 || leftError < 0.001) {
208+
if (std::abs(leftError - (int)leftError) < 0.001f) {
209209
emit findFeaturePointsError(
210210
leftCameraModel_->curFolderPath() + "/" +
211211
leftCameraModel_->imgPaths()[(int)leftError]);
@@ -230,7 +230,7 @@ void CalibrateEngine::stereoCalibrate(const int targetType, const int rowNum,
230230
rightCalibrator_->imgs(), caliInfo_.info_.M2_,
231231
caliInfo_.info_.D2_, cv::Size(rowNum, colNum), progress_);
232232

233-
if (rightError > 0.99 || rightError < 0.001) {
233+
if (std::abs(rightError - (int)rightError) < 0.001f) {
234234
emit findFeaturePointsError(
235235
rightCameraModel_->curFolderPath() + "/" +
236236
rightCameraModel_->imgPaths()[(int)rightError]);

0 commit comments

Comments
 (0)