-
Notifications
You must be signed in to change notification settings - Fork 541
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
Python Wrapper for estimate_tag_pose #101
Comments
this repository may already have what you need: |
I don't believe that we have a wrapper for estimate_tag_pose yet. If you want to write it, take a look at apriltag_pywrap.c for the current wrapper. If you write a wrapper for it, please send me a pull request and I'll incorporate it into this repo. OpenCV's SOLVEPNP_IPPE_SQUARE is most likely more accurate, but I have not actually tested it. I'm not sure which method would be faster either. |
Hey @mkrogius Thanks |
@iuliuv thanks for sharing that. It works nicely! |
@ShrutheeshIR You're going to have to figure out exactly how to use it on your own. I can say at least that the points that apriltag returns would correspond to their imagePoints argument which is a list of 2d points, like our detector gives you. The objectPoints, which are in 3d, would correspond to the nominal positions of the corners of the tag, so something like {{tag_size/2, tag_size/2, 0},{tag_size/2,-tag_size/2,0}, {-tag_size/2, -tag_size/2, 0}, {-tag_size/2, tag_size/2, 0}} should work. Basically you want a list of the 3d points that the detected 2d points should correspond to. |
It's a little outdated, but here how to estimate the pose with cv2 in python from apriltag, maybe it helps someone else with a similar problem.
If you need any pointers please read the documentation of the respective functions, particular What I am quite interested would be to understand if this method is better/worse than the one implemented in apriltags? |
Thanks for the wonderful repo!
Is there a similar python wrapper for estimate_tag_pose as well?
How would I go about writing one?
If not, can I write a similar function in Python directly? The doc does say we can use OpenCV's SOLVEPNP_IPPE_SQUARE
However, I wish to know if that is different from the estimate_tag_pose implementation. If so, how different is it? How much drop in accuracy can I expect?
Thanks
The text was updated successfully, but these errors were encountered: