AprilRobotics / apriltag

AprilTag is a visual fiducial system popular for robotics research.
https://april.eecs.umich.edu/software/apriltag
Other
1.61k stars 539 forks source link

can i use square detection of your code ? #357

Closed ehswnmohseni closed 1 month ago

ehswnmohseni commented 1 month ago

Run Method I built AprilTag from source following the instructions in the README

Is there a way I can use your algorithm solely for detecting marker squares and not for detecting the ID of AprilTags?

I need to be able to detect my own marker from a high altitude and I feel that detecting the ID inside the marker limits the height from which I can detect it, due to noise that causes small parts of the marker to be invisible. And to determine that the square I've found is a marker, I need to use separate algorithms.

I've written my own marker square detection code but it's not as robust to noise as your code. Can you help me with how I can use only the square detector part of your code in python?

thanks ![Uploading Screenshot 2024-09-24 151241.png…]()

christian-rauch commented 1 month ago

Have a look at apriltag_detector_detect: https://github.com/AprilRobotics/apriltag/blob/786ad11fa812524f33ad8375a5f157b7e57b730d/apriltag.c#L1003 which lists the steps in the detection process.

The first step is the quad detection and the second step is already the decoding. If you only want to detect the tag edges/corners, you can stop after the quad detection and extract this information from the quads. See how the debug image with the detections is drawn and exported here via the quad corners in quad->p: https://github.com/AprilRobotics/apriltag/blob/786ad11fa812524f33ad8375a5f157b7e57b730d/apriltag.c#L1120-L1131