Tag Recognition Example
HuskyLens 2 AprilTag blocks let Mind+ programs detect tags, count them, and read ID, content and position in real time. It’s like giving your robot QR-code vision so it can know which tag it sees, where it is on screen, and whether specific learned IDs appear or how many duplicates exist.
1.Tag recognition Blocks
Before You Start:
1.1 Tag Recognition - 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:
Click 'Run' in Mind+ and wait for the program to upload.
Point the HuskyLens 2 camera at the tag in the frame to learn it.
Point the HUSKYLENS 2 camera at the tag and observe the results displayed on the M10 (User provided K10, but document context is M10) 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.
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:
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 10 The second ID 0 tag is on the right, and its coordinates are (318, 183). For detailed instructions on how to learn tags, refer to: Tag Recognition.
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?
