Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to detect AprilGrid? #328

Closed
wfxcqsc opened this issue May 10, 2024 · 5 comments
Closed

How to detect AprilGrid? #328

wfxcqsc opened this issue May 10, 2024 · 5 comments

Comments

@wfxcqsc
Copy link

wfxcqsc commented May 10, 2024

hello,I am confused with the AprilGrid, when i detect the following picture(Apriltag board) using the opencv_demo, it can be successfully detected.
apriltag7

however,when detect the AprilGrid, it can not detect, i guess the reason is the the border width of Apriltag board is one ,while AprilGrid with border width the size of two
 apriltag3

so,i want to figure out whether can set the borderbits, and how to detect AprilGrid?

Looking forward to your reply!

@christian-rauch
Copy link
Collaborator

The apriltag library needs a white border around the tag to do the edge detection properly. This border is interrupted by the black squares on the corner of the tags.

@wfxcqsc
Copy link
Author

wfxcqsc commented May 11, 2024

thanks for your reply!
i am sorry about my issue,i put the wrong image in the first picture. the Apriltag board that can be Apriltag library successfully detect is the following
untitled

however, i have tried to cover up the black squares in the AprilGrid,and detect again. but it still doesn't work.
apriltag7

then, i detect the same picture get from the above using OpenCV aruco , there is a"DICT_APRILTAG_36h11", if i don't set the "markBorderBits"(default value is 1), it also can't detect. while i set the parameter "markBorderBits=2", it can be successfully detect
image

Therefore, in addition to black square interruption, is the border width also a part of the impact on detection? and whether the apriltag library can detect the APRILGRID?

@mkrogius
Copy link
Contributor

The apriltag library only supports a black border width of 1. It looks like in your image the border width is 2, which is why it is not detected

@christian-rauch
Copy link
Collaborator

@wfxcqsc I tried your AprilGrid image with apriltag_demo and opencv_demo and I got a couple of detections. Do you not get any detections?

Alternatively, you can also try the "AprilTags C++ Library" from https://people.csail.mit.edu/kaess/apriltags/ (https://bitbucket.org/kaess/apriltags/src/master/) which generally supports tag families with multiple black border sizes: https://bitbucket.org/kaess/apriltags/src/3aea96d3239bb83870cb5e0a85f142a2b0589563/AprilTags/TagFamily.h#lines-64.

@wfxcqsc
Copy link
Author

wfxcqsc commented May 28, 2024

Thanks for your reply!in fact, when I using opencv_demo to detect AprilGrid which have black squares on the corner of tags, I can not detect any detections. but I have detected AprilGrid successfully by using Kalibr,and I will also try the “AprilTags C++ Library”.

@wfxcqsc wfxcqsc closed this as completed May 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants