Object Recognition Example
HuskyLens 2 object recognition blocks let Mind+ users count, identify, and track up to 80 learned objects on screen, including ID, name, position, size, and presence. It’s like giving your project smart eyes that report what they see in real time.
1.Object Recognition Blocks
Before You Start:
1.1 Object Recognition - Output Relevant Data
You can recognize objects within the HuskyLens 2 field of view (limited to 80 predefined object categories, as described in Object Recognition. The related data that can be retrieved includes: total number of recognizable objects on the screen, object ID near the center of the HuskyLens 2 camera frame, and the first detected object.
Example Program:
Click to upload the program to the device in Mind+, and wait for the upload to complete.
Point the HuskyLens 2 camera at the object in the frame to learn it. For detailed instructions on how to learn objects, refer to the Object Recognition.
Once the learning is complete, aim at the object and observe the output results on the K10 screen.
Output Result: The total number of objects detected can be output, along with the corresponding object ID, name, and other data. If the object has not been learned, the ID will be 0.
1.2 Get Relevant Data of a Specific Object
After recognizing an object, HuskyLens 2 can retrieve relevant data for a specified object in the frame. For example, it can check if a particular object is in the frame, retrieve the object's name, get the number of the same type of object in the frame, and when multiple objects of the same type appear, it can retrieve parameters for a specified object, such as name, X/Y coordinates, width, and height.
Example Program:
Output Result: As shown in the figure, the total number of objects in the frame, the number of ID2 objects, their names, and the coordinates of the first detected ID2 object can be obtained.
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?
