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

Questions about the constructor parameters of the ApriltagBoard class #8

Open
batu1579 opened this issue Feb 26, 2024 · 3 comments
Open

Comments

@batu1579
Copy link

batu1579 commented Feb 26, 2024

hello.
I'm using this awesome library, but I'm having some problems and would like to ask you about them.

First I want to ask you about the constructor of the ApriltagBoard class, where I have a few arguments that I don't quite understand. I searched the documents you provided, but I found that they did not introduce their meanings in detail, such as scale and size. Can you explain it to me?

I always can't determine the specific size when printing (the tag printed out every time is too big), I don't know whether these parameters are not set correctly, or because there is a mistake in the setting when I print.

PS: It feels good to provide more detailed documentation or function comments so that others using the library can easily understand its usage.

In addition, I want to create "tagstanded41h12" family of apriltags, found that there is no way to generate the board, I open the source code and find that the code about apriltags v3 has been commented out, is there any reason for this? I made some simple changes and found that the code that was commented out worked fine.

Finally, I apologize in advance if I was unclear. My English is not very good. I wrote this issue with translation software. I hope to get your reply soon

With best wishes

@walchko
Copy link
Member

walchko commented Feb 28, 2024

hello ... sorry for the delay. I have been really busy, give me a few more days to get back to you on this. I wrote this library a while ago and haven't used it in while so I have to review the code when I get some free time.

@batu1579
Copy link
Author

Glad to hear from you

Thank you very much for your willingness to spend your rest time to help me answer my questions. I am looking forward to your reply

@walchko
Copy link
Member

walchko commented Feb 28, 2024

If you look at the jupyter notebook it shows how to create a board. This results in an image (1520x2240 pixels in the notebook example). When you print out the board, it is like printing an image and your printer preferences will probably scale the image to the whole sheet of paper. You should be able to turn that off or select a scale you want in your print dialog. Then measure the printed board tags with a ruler for calibration.

Maybe I could have offered a PDF output so you could define in python you want the tags to be 2 cm on each side, but that was more work.

So this shows you how to generate 41h12 tags which is a gen 3 tags. However, you want the tag to have a solid black boarder around the tag but that doesn't happen with gen 3 tags ... see the mosaic of 41h12 tags towards the bottom of the notebook or a screenshot shown below.

Screen Shot 2024-02-28 at 3 58 07 PM

See how some of the tags don't have black at the corners, that won't work for calibration.

Compare that with the calibration board here. The calibration algorithm looks for the nice chessboard intersections and you don't get that with gen 3. Here is the OpenCV camera calibration tutorial.

See how the calibration algorithm detects the intersection of the squares.

So if you look at my code here:

# elif self.family in apriltags_v3:

I commented out using gen 3 tags because they didn't easily work and gen 2 was good enough.

I would suggest using gen 2 tags for your calibration board. Otherwise you can create your own board using the example mosaic code in the notebook I suggested above and maybe write a new calibration algorithm.

Good luck!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants