Don't add bad corners to multi-tag solution (#817)

Closes #837


---------

Co-authored-by: Chris Gerth <gerth2@users.noreply.github.com>
This commit is contained in:
Matt
2023-06-17 22:16:10 -07:00
committed by GitHub
parent b1546b8038
commit f6756bdb9a
3 changed files with 49 additions and 43 deletions

View File

@@ -391,8 +391,9 @@ std::optional<EstimatedRobotPose> PhotonPoseEstimator::MultiTagPnpStrategy(
}
}
if (imagePoints.empty()) {
return std::nullopt;
// We should only do multi-tag if at least 2 tags (* 4 corners/tag)
if (imagePoints.size() < 8) {
return Update(result, camMat, distCoeffs, this->multiTagFallbackStrategy);
}
// Use OpenCV ITERATIVE solver