Skip to content
Snippets Groups Projects
Commit a2db3faf authored by Sebastian Hahta's avatar Sebastian Hahta
Browse files

ChessboardCornersSB should work now

parent b6e8e14c
No related branches found
No related tags found
1 merge request!7Feature/chessboardcornerssb
......@@ -437,11 +437,13 @@ bool Calibrate::_recalibrate(vector<vector<Point2f>> *imagePoints,
vector<Point2f> pointBuf[2];
bool found1, found2;
#if CV_VERSION_MAJOR >= 4
LOG(INFO) << "Using findChessboardCornersSB()";
found1 = findChessboardCornersSB(view[0], settings_.boardSize,
pointBuf[0], chessBoardFlags);
found2 = !local_->isStereo() || findChessboardCornersSB(view[1],
settings_.boardSize, pointBuf[1], chessBoardFlags);
#else
LOG(INFO) << "Using findChessboardCorners()"
found1 = findChessboardCorners(view[0], settings_.boardSize,
pointBuf[0], chessBoardFlags);
found2 = !local_->isStereo() || findChessboardCorners(view[1],
......@@ -473,8 +475,8 @@ bool Calibrate::_recalibrate(vector<vector<Point2f>> *imagePoints,
drawChessboardCorners(view[0], settings_.boardSize,
Mat(pointBuf[0]), found1);
if (local_->isStereo()) drawChessboardCorners(view[1],
settings_.boardSize, Mat(pointBuf[1]), found2);
if (local_->isStereo())
drawChessboardCorners(view[1],settings_.boardSize, Mat(pointBuf[1]), found2);
} else {
LOG(WARNING) << "No calibration pattern found";
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment