Pose Recognition Example

HuskyLens 2 pose blocks detect bodies, assign IDs, and output rich keypoint coordinates for eyes, nose, shoulders, elbows, hips, knees, and ankles. It’s like a visual ruler that tracks learned and unlearned poses by ID and index.

1.Pose Recognition Blocks

Before You Start:

1.1 Recognize Human Pose and Output Relevant Data

It can recognize human poses within the HuskyLens 2 field of view and acquire pose-related data. Readable data includes: the total number of bodies detected, the ID of the human pose closest to the center of the HuskyLens 2 camera frame, and the ID of the first detected pose.

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 human pose in the frame to learn it. For detailed instructions on how to learn poses, refer to Pose Recognition .

Once learning is complete, aim at the pose and observe the output results on the UNIHIKER K10 screen.

Output Result: It can output the total number of bodies detected; it can output the specified human pose ID. Learned human poses are assigned IDs in learning order, while unlearned poses have an ID of 0.

Interface Diagram

1.2 Get Data for a Specific Pose

It can acquire keypoint data for a specific human pose, such as its ID, Name, facial features, and body joints. Detailed data includes: Human ID, Human Pose Name, X and Y coordinates of the human's center point, Width, Height, X/Y coordinates for left/right eyes, ears, and nose, and X/Y coordinates for left/right shoulders, elbows, wrists, hips, knees, and ankles. For details, please see the Pose Recognition Blocks Description.

The example program below shows how to get the X/Y coordinate data for the nose, left shoulder, elbow, hip, knee, and ankle of the human body closest to the center of the camera frame. This data can also be obtained for unlearned human poses.

Interface Diagram

Output Result: shown below, after running the program, the UNIHIKER K10 screen displays the Human ID and the coordinate data for the nose and other key body points. Since this human pose has not been learned, the Human ID is 0.

Interface Diagram

In addition to the data above, more human pose data can be acquired. For example, determining if a pose with a specific ID is in the frame, the name of a specific pose, or the count of identical poses in the frame.

When multiple identical poses appear, it's possible to specify and acquire parameters for one of them, including Name, X/Y coordinates, Width, Height, and key body point coordinate data.
Example Program:

Interface Diagram

Output Result: As shown, it can acquire the count and name of Pose ID 1 in the frame, and the coordinate position of the first detected Pose ID 1.

Interface Diagram

1.3 Pose Recognition Blocks Description

block Description
Used to obtain one set of pose recognition data under the Pose Recognition function of HUSKYLENS 2.
Determines whether human bodies exist in the current frame.
Get the related data of the human posture closest to the crosshair on the screen, including: Human posture ID, Human posture name, X coordinate of the center of the human posture, Y coordinate of the center of the human posture, Width, Height, X/Y coordinates of both eyes, ears, and nose, X/Y coordinates of both shoulders, elbows, wrists, hips, knees, and ankles.
Gets the total number of detected human bodies on the screen.
When multiple human bodies appear, obtain the data of a specified body by index.
Detect the number of poses that have been learned by HuskyLens 2, regardless of whether they appear in the current frame.
Determines whether a learned pose with a specified ID exists in the image. (After HUSKYLENS 2 learns poses, IDs are assigned sequentially.)
Obtains the number of learned poses with a specified ID in the current frame.
Obtains the data of a learned pose with a specified ID.
When multiple identical learned poses appear, obtain the data of a specified one by index.

Was this article helpful?

TOP