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

Issues with Detecting Custom Tags #14

Open
dhruvapaul opened this issue Jul 2, 2024 · 3 comments
Open

Issues with Detecting Custom Tags #14

dhruvapaul opened this issue Jul 2, 2024 · 3 comments

Comments

@dhruvapaul
Copy link

I am trying to detect custom 25h7 tags and used this github to generate those codes. I followed all the instructions listed and used the layout classic_9 with hamming distance 7. However, when I used the generated codes in the apriltag library for detection, I could not detect sample 25h7 tags I found online.
I decided to look into the apriltag generation library to see if I made any mistakes and noticed that when generating a predefined library such as 16h5 (classic_8 5), the generated codes are different from the predefined codes listed in the library.

this is the predefined list of codes[30]: 0x231bL, 0x2ea5L, 0x346aL, 0x45b9L, 0x79a6L, 0x7f6bL, 0xb358L, 0xe745L, 0xfe59L, 0x156dL, 0x380bL, 0xf0abL, 0x0d84L, 0x4736L, 0x8c72L, 0xaf10L, 0x093cL, 0x93b4L, 0xa503L, 0x468fL, 0xe137L, 0x5795L, 0xdf42L, 0x1c1dL, 0xe9dcL, 0x73adL, 0xad5fL, 0xd530L, 0x07caL, 0xaf2eL

this is the generated list of codes[25]:0x9765L, 0x9d2aL, 0xa2efL, 0xa8b4L, 0xba03L, 0xbfc8L, 0xf3b5L, 0x2d67L, 0x447bL, 0x55caL, 0x3c92L, 0x98e2L, 0xed49L, 0x384aL, 0x71fcL, 0xb691L, 0x91cfL, 0xaa60L, 0x435cL, 0xc768L, 0xaf35L, 0xe6c3L, 0x64f0L, 0xe5b9L, 0xdfacL

Can someone explain the problem? I believe this is the reason why I cannot detect tags based on my custom generated codes.

@mkrogius
Copy link
Contributor

mkrogius commented Jul 2, 2024

Yes, if you re-generate any of the families you will not necessarily get the same family of tags as is checked in. This happens because you are probably using a different version of Java than was used originally, which has a different random number generator. If you set the initial code to the checked-in one, then the results should reproduce, with one additional wrinkle which is that the order of the bits is now interpreted differently.

If you generate a new family, you should be able to detect the tags if you print out the actual tag codes that you generated instead of using another 25h7 family

@dhruvapaul
Copy link
Author

Thank you for the fast response! How would one implement the fix? Changing to the original version of Java or inputting the checked-in code? What was the original version of Java used here?

@acshi
Copy link

acshi commented Jul 2, 2024

If the goal is to detect the sample 25h7 tags you found online, then the simplest way to handle this would be to contact whoever generated those tags to get the full code family from them.

If the goal is simply to have a 25h7 family for your own use, then there is no problem, and you should only expect to detect codes you have printed off from the family you generated.

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