Functions

Function Reference

AprilTags.jl functions

AprilTagDetector(tagfamily=tag36h11)

Create a default AprilTag detector with the 36h11 tag family Create an AprilTag detector with tag family in tagfamily::TagFamilies @enum TagFamilies tag36h11 tag25h9 tag16h5

source
freeDetector!(apriltagdetector)

Free the allocated memmory

source
homography_to_pose(H, fx, fy, cx, cy, [taglength = 2.0])

Given a 3x3 homography matrix and the camera model (focal length and centre), compute the pose of the tag. The focal lengths should be given in pixels. The returned units are those of the tag size, therefore the translational components should be scaled with the tag size. Note: the tag coordinates are from (-1,-1) to (1,1), i.e. the tag size has lenght of 2 units. Optionally, the tag length (in metre) can be passed to return a scaled value.

source
homographytopose(H, fx, fy, cx, cy, [taglength = 2.0])

Given a 3x3 homography matrix and the camera model (focal length and centre), compute the pose of the tag. The focal lengths should be given in pixels. The returned units are those of the tag size, therefore the translational components should be scaled with the tag size. Note: the tag coordinates are from (-1,-1) to (1,1), i.e. the tag size has lenght of 2 units. Optionally, the tag length (in metre) can be passed to return a scaled value. The camara coordinate system: camera looking in positive Z axis with x to the right and y down.

source
AprilTags.drawTagBox!Function.
drawTagBox!(image, tag)

Draw a box around the tag. imageCol = RGB.(image) foreach(tag->drawTagBox!(imageCol, tag), tags)

source
drawTagAxes!(image, tag, CameraMatrix)

Draw the tag x, y, and z axes to show the orientation. imageCol = RGB.(image) foreach(tag->drawTagAxes!(imageCol, tag, K), tags)

source
getAprilTagImage(tagIndex, tagfamily=tag36h11)

Return an image [Gray{N0f8}] for with tagIndex from tag family in tagfamily::TagFamilies @enum TagFamilies tag36h11 tag25h9 tag16h5

source
threadcalldetect(detector, image)

Run the april tag detector on a image

source
detectAndPose(detector, image, fx, fy, cx, cy, taglength)

Detect tags and calcuate the pose on them.

source
tagOrthogonalIteration

Run the orthoganal iteration algorithm on the poses. See apriltag_pose.h [2]: Lu, G. D. Hager and E. Mjolsness, "Fast and globally convergent pose estimation from video images," in IEEE Transactions on Pattern Analysis and Machine Intelligence, vol. 22, no. 6, pp. 610-622, June 2000. doi: 10.1109/34.862199

source

Wrappers

apriltag_detector_create()

Create a AprilTag Detector object with all fields set to default value.

source
tag36h11_create()

Create a AprilTag family object for tag36h11 with all fields set to default value.

source
tag36h11_destroy(tf)

Destroy the AprilTag family object.

source
apriltag_detector_add_family(tag_detector, tag_family)

Add a tag family to an AprilTag Detector object. The caller still "owns" the family and a single instance should only be provided to one apriltag detector instance.

source
apriltag_detector_detect(tag_detector, image)

Detect tags from an image and return an array of apriltagdetectiont*. You can use apriltagdetectionsdestroy to free the array and the detections it contains, or call detectiondestroy and zarraydestroy yourself.

source
threadcall_apriltag_detector_detect(tag_detector, image)

Experimental call apriltagdetectordetect in a seperate thread using the experimantal @threadcall Detect tags from an image and return an array of apriltagdetectiont*. You can use apriltagdetectionsdestroy to free the array and the detections it contains, or call detectiondestroy and zarraydestroy yourself.

source

Index