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

Add the new families from apriltags v 3 #80

Open
Affie opened this issue Feb 3, 2022 · 2 comments
Open

Add the new families from apriltags v 3 #80

Affie opened this issue Feb 3, 2022 · 2 comments
Milestone

Comments

@Affie
Copy link
Member

Affie commented Feb 3, 2022

Also the new families from apriltags v 3

Originally posted by @Affie in #7 (comment)

If new families are need, please comment here.

@Affie Affie mentioned this issue Feb 3, 2022
3 tasks
@Affie Affie added this to the v0.x.0 milestone Feb 3, 2022
@yakir12
Copy link
Contributor

yakir12 commented May 7, 2024

I would love to have 49H12 Circle and 41H12 Standard.

@Affie
Copy link
Member Author

Affie commented May 7, 2024

Hi @yakir12. To implement the new families in v3 should work by adding the low-level wrappers:

AprilTags.jl/src/wrapper.jl

Lines 316 to 326 in fdb6b2d

function tag36h11_create()
ccall((:tag36h11_create, libapriltag), Ptr{apriltag_family_t}, ())
end
"""
tag36h11_destroy(tf)
Destroy the AprilTag family object.
"""
function tag36h11_destroy(tf)
ccall((:tag36h11_destroy, libapriltag), Nothing, (Ptr{apriltag_family_t},), tf)
end

and adding to the high-level convenience functions:

@enum TagFamilies tag36h11 tag25h9 tag16h5

and

AprilTags.jl/src/helpers.jl

Lines 106 to 125 in fdb6b2d

function AprilTagDetector(tagfamily::TagFamilies = tag36h11)
#create tag detector
td = apriltag_detector_create()
#create tag family
if tagfamily == tag36h11
tf = tag36h11_create()
# elseif tagfamily == tag36h10
# tf = tag36h10_create()
elseif tagfamily == tag25h9
tf = tag25h9_create()
elseif tagfamily == tag16h5
tf = tag16h5_create()
end
#add family to detector
apriltag_detector_add_family(td, tf)
#Register finalizer and return detector
return finalizer(d->freeDetector!(d, false), AprilTagDetector(td,tf))
end

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

2 participants