Fix false-positive vision estimation edgecase (#932)

> there is a problem if the found tags are a valid one plus an invalid tag, so eg it sees a tag but finds noise on the wall, and so lists tags 2 and 15. Lines 90-99 will ignore tag 15, and put 4 corners into the list. It will get past the test on line 100 (there are 4 corners). BUT then at line 106, there are 2 entries in visTags, so it will go to the "else" and try to use solvePNP_SQPNP().
This commit is contained in:
amquake
2023-10-07 17:59:19 -07:00
committed by GitHub
parent 74f1779961
commit 2881741226

View File

@@ -103,7 +103,7 @@ public class VisionEstimation {
Point[] points = OpenCVHelp.cornersToPoints(corners);
// single-tag pnp
if (visTags.size() == 1) {
if (knownTags.size() == 1) {
var camToTag =
OpenCVHelp.solvePNP_SQUARE(
cameraMatrix, distCoeffs, TargetModel.kTag16h5.vertices, points);