Hand Recognition Example
HUSKYLENS 2 hand recognition reads, counts and labels gestures via Mind+ serial data, like a smart camera tagging each hand pose in view. It detects any framed gesture, assigns learned IDs or 0, and lets users query specific IDs for presence, count, name and X/Y/size of each target gesture.
1.Hand Recognition blocks
Before You Start:
1.1 Hand Recognition Output Data
HUSKYLENS 2 can detect gestures within its field of view and print related data through the serial port. The readable data includes the ID of the gesture closest to the camera center, the total number of detected gestures, and the ID of the first detected gesture.
The sample program is shown below.
Click “Upload” in Mind+ and wait for the upload to complete.Use the touchscreen to enter the Gesture Recognition function of HUSKYLENS 2. Aim the camera at gestures in the frame to learn them individually. For detailed steps, see Hand Recognition.
After the learning process is complete, open the serial port in Mind+ and observe the output results.
Result:The output includes the total number of detected gestures. Regardless of whether a gesture has been learned, it will be counted once detected (a framed box indicates detection). Learned gestures are assigned IDs sequentially, while unlearned gestures have an ID of 0.
1.2 Obtain Data of Specified Gesture
After HUSKYLENS 2 recognizes gestures, you can obtain the data of a specified gesture. For example, check whether a learned gesture appears in the frame, gets its name, or obtains the number of identical gestures. When multiple gestures of the same type appear, you can specify one gesture to retrieve parameters including name, X/Y coordinates, width, and height.
The sample program is shown below:
Result:As shown in the figure, you can obtain the number and name of gestures with ID1, as well as the coordinate position of the first detected ID1 gesture.
1.3 Hand Recognition Description
| block | description |
|---|---|
|
Used to obtain one set of gesture recognition data under the Gesture Recognition function of HUSKYLENS 2. |
|
Determines whether gestures exist in the current frame. |
|
Obtains data for the gesture closest to the crosshair on the screen, including ID, name, center X/Y coordinates, width, and height. |
|
Gets the total number of gestures detected on the screen. |
|
When multiple gestures are detected, obtains the data of a specified gesture. |
|
Determines whether a gesture with the specified ID exists in the image. (After HUSKYLENS 2 learns gestures, IDs are assigned sequentially.) |
|
Obtains the total number of gestures with a specified ID in the current frame. |
|
Obtains data for a gesture with a specified ID. |
|
When multiple gestures share the same ID, obtains the data of a specified gesture. |
Was this article helpful?
