Skip to content

Commit c5542ab

Browse files
committed
Bump hamming distance to 2
The upgraded apriltag library uses a pigeonhole-based quick-decode lookup table (AprilRobotics/apriltag#421), making bits_corrected=2 affordable in memory. Match the value the upstream apriltag_detector_add_family inline wrapper recommends.
1 parent c013559 commit c5542ab

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

wasm/src/apriltag_js.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ int atagjs_init()
9898
printf("Error initializing detector.");
9999
return -1;
100100
}
101-
apriltag_detector_add_family_bits(g_td, g_tf, 1);
101+
apriltag_detector_add_family_bits(g_td, g_tf, 2);
102102
g_td->quad_decimate = 2.0;
103103
g_td->quad_sigma = 0.0;
104104
g_td->nthreads = 1;
@@ -187,7 +187,7 @@ int atagjs_set_family(const char* family_name)
187187
}
188188

189189
// Add new family to detector
190-
apriltag_detector_add_family_bits(g_td, g_tf, 1);
190+
apriltag_detector_add_family_bits(g_td, g_tf, 2);
191191

192192
printf("Switched to tag family: %s\n", family_name);
193193
return 0;

0 commit comments

Comments
 (0)