apriltag icon indicating copy to clipboard operation
apriltag copied to clipboard

Poor tag detecion when tags are rotated.

Open Frank-Michel opened this issue 9 months ago • 3 comments

Hi, I am trying to detect tags on a calibration target board (36h11 with double pixel border). Everything is looking okay (first image 24 out of 30 tags detected) when the tags are aligned with the image border. However, when the target is rotated by 45deg (second image) at most 5 tags are getting detected. I was playing with the detector parameters but I was not able to substantially increase the number of detected targets. I was using an altered version of the open_cv example in the repository when running the experiments.

Any advice on why the tags are not detected and how to improve the number of detections is highly appreciated.

Image

Image

Frank-Michel avatar Feb 14 '25 00:02 Frank-Michel

Unfortunately we do not support the kalibr board. Some previous discussion is here

mkrogius avatar Feb 14 '25 04:02 mkrogius

Got it. In your linked issue you were talking about the possibility of creating a checkerboard like pattern using Apriltags and inverted Apriltags. I was experimenting with those two types of tags but I was not able to find a solution that does not brake up the solid border around the tags. Could you elaborate on that idea.

Frank-Michel avatar Feb 18 '25 18:02 Frank-Michel

Here's a diagram of an apriltag from the 36h11 family -- it consists of an outer white border, an inner black border, and 36 data bits in the middle: Image

If we used https://github.com/AprilRobotics/apriltag-generation to generate a new family which also has 36 data bits but has a black outer border and white inner border, then we could make a calibration board by alternating tags from the 36h11 family and this new family. The outer white border from a 36h11 tag would form a calibration corner with the outer black border from the neighboring tag from the new family.

Alternately, an easier way to accomplish the above that lets you avoid generating a new tag family and recompiling the detector would be to make a calibration board where you alternate normal 36h11 tags with tags from the 36h11 but with black & white swapped. In order to detect all the tags in this calibration board you would need to run the detector twice, once normally, and once on the image inverted

mkrogius avatar Feb 20 '25 15:02 mkrogius

Please try https://github.com/powei-lin/aprilgrid or https://github.com/powei-lin/aprilgrid-rs

Image Image

powei-lin avatar Jul 09 '25 13:07 powei-lin