Skip to content

Commit

Permalink
Fix perimeter threshold
Browse files Browse the repository at this point in the history
April tags will only have straight sides.  With the deduplication
happening earlier, each pixel along that boundary will now only
have 2 neighbors (one above, one at 45 degrees).  We should adjust the
max blob length threshold accordingly.

Signed-off-by: Austin Schuh <[email protected]>
  • Loading branch information
AustinSchuh committed Jan 22, 2024
1 parent c598bd8 commit 37eed82
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions apriltag_quad_thresh.c
Original file line number Diff line number Diff line change
Expand Up @@ -1061,10 +1061,10 @@ static void do_quad_task(void *p)
// a cluster should contain only boundary points around the
// tag. it cannot be bigger than the whole screen. (Reject
// large connected blobs that will be prohibitively slow to
// fit quads to.) A typical point along an edge is added three
// times (because it has 3 neighbors). The maximum perimeter
// is 2w+2h.
if (zarray_size(*cluster) > 3*(2*w+2*h)) {
// fit quads to.) A typical point along an edge is added two
// times (because it has 2 unique neighbors). The maximum
// perimeter is 2w+2h.
if (zarray_size(*cluster) > 2*(2*w+2*h)) {
continue;
}

Expand Down

0 comments on commit 37eed82

Please sign in to comment.