Object Recognition Example
HuskyLens 2 object recognition blocks let Mind+ projects detect, count and locate learned objects in up to 80 categories in real time. It’s like giving your camera a label-reading assistant that reports IDs, names, positions and sizes so students can build interactive, vision-driven STEM activities with minimal coding.
1.Object Recognition Blocks
Before You Start:
1.1 Object Recognition - Output Relevant Data
It can recognize objects within the HuskyLens 2 field of view (must be among the 80 fixed categories of recognizable objects, see Object Recognition function description for details), and acquire object-related data. Readable data includes: the total number of recognizable objects in the frame, the ID of the object closest to the center of the HuskyLens 2 camera frame, and the first detected object.
Example Program:
Click 'Run' in Mind+ and wait for the program to upload. HuskyLens 2 will automatically enter the Object Recognition function. Point the HuskyLens 2 camera at the objects in the frame to learn them. For detailed instructions on how to learn objects, refer to: Object Recognition
Once learning is complete, aim at the object and observe the output results on the screen.
Output Result:It can output corresponding data as required. For example, the first line outputs the total number of detected objects, and the second line outputs the total number of learned objects. The third and fourth lines output the specified gesture ID. Learned gestures are assigned IDs in learning order, while unlearned gestures have an ID of 0.
1.2 Get Data for a Specific Object in the Frame
After HuskyLens 2 recognizes an object, it can acquire data for a specific object in the frame. For example, it can determine if a specific object is in the frame, get the name of a specific object, get the count of similar objects in the frame, and when multiple similar objects appear, it can be set to acquire parameters for a specific one, including its Name, X/Y coordinates, Width, and Height.
Example Program:
Output Result: As shown, it can acquire the total number of objects in the frame, the count and name of ID 2 objects, and the coordinate position of the first detected ID 2 object.
1.3 Object Recognition Blocks Description
| block | Description |
|---|---|
|
Used to obtain one set of object recognition data under the Object Recognition function of HUSKYLENS 2. |
|
Determines whether there are recognizable objects in the current frame. |
|
Obtains data for the object closest to the crosshair on the screen, including object ID, name, center X coordinate, center Y coordinate, width, and height. |
|
Gets the number of all detectable objects in the screen. |
|
When multiple recognizable objects appear,obtains the relevant data of a specified object. |
|
Detect the number of objects that have been learned by HuskyLens 2, regardless of whether they appear in the current frame. |
|
Determines whether an object with a specified ID exists in the frame. (After HUSKYLENS 2 learns objects, it assigns ID numbers according to the learning order.) |
|
Obtains the number of objects with the specified ID in the current frame. |
|
Obtains the related data of a specified object. |
|
When multiple similar objects appear,obtains the related data of a specified object. |
Was this article helpful?
