Tag Recognition Example

HuskyLens 2 tag recognition blocks let Mind+ users detect AprilTag markers and read ID, content, position and size data in real time; it’s like giving your UNIHIKER K10 a pair of smart eyes that count and describe every tag in view, including learned IDs, unlearned ID 0 tags, totals, and specific tags closest to the crosshair or matching a chosen ID.

1.Tag recognition Blocks

Before You Start:

1.1 Tag Recognition And Output Relevant Data

HUSKYLENS 2 can recognize AprilTag tags appearing in the frame. You can get data about detected tags through programming. Readable tag data includes: data for a specific tag (such as ID, content, width, height, and X/Y coordinates of the center point) and the total number of detected tags.

Example Program:

Interface Diagram

Click to upload the program to the device in Mind+, and wait for the upload to complete.
Point the HuskyLens 2 camera at the tag in the frame to learn it. For detailed instructions on how to learn tags, refer to: Tag Recognition.

Point the HUSKYLENS 2 camera at the tag and observe the results displayed on the UNIHIKER K10 screen.

Output Result: As shown, it can output the number of detected tags (whether learned or not) and the specified tag ID. Unlearned tags have an ID of 0.

Interface Diagram

1.2 Get Data for a Specific Tag in the Frame

After HuskyLens 2 recognizes tags, it can acquire data for a specific tag in the frame. For example, it can determine if a tag with a specific ID is in the frame, get the count of tags with the same ID, and when multiple tags with the same ID appear, it can be set to acquire parameters for a specific one, including Name, Content, X/Y coordinates, Width, and Height.

Example Program:

Interface Diagram

Output Result: As shown, there are two unlearned tags (ID 0) in the frame. The first ID 0 tag is on the left, and its content is 2. The coordinates of second ID 0 tag are (247, 163).

Interface Diagram

1.3 Tag Reconition Blocks Description

block Description
Acquire tag recognition data once.
Determine if any tag is detected.
Get data of tag closest to crosshair: ID, center X/Y coordinates, width, height, decoded content.
Get total number of detected tags,including both unlearned and learned labels..
Get data of a specified tag.
Get total number of learned tags that have been learned by HuskyLens 2, regardless of whether they appear in the current frame.
Determine whether a tag with the specified ID exists.The IDs of unlearned tags are all set to 0, and the IDs of learned tags are sorted in the order in which they were learned.
Get the number of tags with a specified ID.
Get data of a specified ID tag.
Get data of a specified one when multiple tags share the same ID.

Was this article helpful?

TOP