Differences in AprilTag libraries.

apriltag computer-vision robotics

I’ve been working with two different AprilTag libraries. AprilTags are a 2D bar code used in robotics research mainly, originating from Edwin Olson’s lab (paper), whereas in the OpenCV library, the aruco markers are used as well as the chessboard / aruco mix, charuco. (I’m a big fan of aruco and charuco markers.)

So I am working with a tool that uses one of the existing AprilTag libraries, from Michael Kaess. First, I started with the one from Edwin Olson’s lab AprilRobotics, and to my suprise the detection was terrible.

Then, I got Michael Kaess’ (MK for short) library going (much cmake wrangling was involved with both), and detection was great for the tags generated by the tool.

Ok. Then I am generating tags and creating layouts of patterns in programs I write, but MK’s library doesn’t have a tag generator, so I altered the one from April Robotics’ library. But the detector from MK’s library now doesn’t work robustly.

After a long time of looking at code and two identical tags side-by-side, I discover the difference: the AprilRobotics’ library has a 1-pixel white border on each tag. The MK library has a 1-pixel black border on each tag, so they look slightly thicker. Change the generator to have a black border, and then the MK library’s detector works.

© Amy Tabb 2018 - 2023. All rights reserved. The contents of this site reflect my personal perspectives and not those of any other entity.