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

What is the unit of tag_size? #1

Open
mzahana opened this issue Jul 14, 2020 · 6 comments
Open

What is the unit of tag_size? #1

mzahana opened this issue Jul 14, 2020 · 6 comments

Comments

@mzahana
Copy link

mzahana commented Jul 14, 2020

@koide3 Thanks for this useful package.

What is the unit of the tag_size ? If I want to generate tag with 1 meter edge length, what would be the tag_size value?
Thank you.

@koide3
Copy link
Owner

koide3 commented Jul 15, 2020

tag_size in generate.py is the texture size. To change the tag size, you need to change <size> in model.sdf.

<size>1.0 1.0 0.01</size>

In this case, real tag size (for pose estimation) will be 0.8 because each tag occupies 80% of the rectangle in width.

@mzahana
Copy link
Author

mzahana commented Jul 15, 2020

Thanks @koide3 . So, what are the required steps to, for example, generate a tag with physical size of 1 meter?
In this case, the size which will be passed to the tag detector is 1.0.

@koide3
Copy link
Owner

koide3 commented Jul 15, 2020

The steps would be like: 1) change <size> in template/model.sdf to 1 / 0.8 = 1.25, 2) run generate.py, 3) you can find generated models in models

@qlibp
Copy link

qlibp commented Jan 9, 2023

@koide3 Thanks for the script!
I have another question on how to set the "correct" tag_size. If the physical size of tag is 1mx1m, what's the recommended tag_size? 1024x1024? What if the physical size is 3m? 1024 * 3 x 1024 * 3?

@koide3
Copy link
Owner

koide3 commented Jan 9, 2023

Usually you don't need to change tag_size (texture size) unless you see some blur on rendering results. 1024x1024 is sufficiently large for most situations. If you want to change the "physical size" of tags, modify the <size> tag in model.sdf.

<size>1.0 1.0 0.01</size>

@qlibp
Copy link

qlibp commented Jan 9, 2023

Usually you don't need to change tag_size (texture size) unless you see some blur on rendering results. 1024x1024 is sufficiently large for most situations. If you want to change the "physical size" of tags, modify the <size> tag in model.sdf.

<size>1.0 1.0 0.01</size>

Thanks for your experience! As I try to generate a apriltag board, I need to try some texture size to see if it will blur with 1024x1024.

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