Skip to content

Commit

Permalink
Fix false-positive vision estimation edgecase (#932)
Browse files Browse the repository at this point in the history
> 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().
  • Loading branch information
amquake committed Oct 8, 2023
1 parent 74f1779 commit 2881741
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ public static PNPResults estimateCamPosePNP(
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);
Expand Down

0 comments on commit 2881741

Please sign in to comment.