Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
TemugeB authored Sep 16, 2021
1 parent 910a2b3 commit 6f229d8
Showing 1 changed file with 15 additions and 2 deletions.
17 changes: 15 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,15 @@
# joint_angles_calculate
Calculate the joint angles of a body pose
**Calculating Joint Angles**

This code calculates the joint angles of a 3D body pose that was output from my other repository: [Real time 3D body pose estimation using MediaPipe](https://github.com/TemugeB/bodypose3d). If you want to know how the joint angles are calculated, check my blog post [here](https://temugeb.github.io/python/motion_capture/2021/09/16/joint_rotations.html). The joint angles are calculated by defining a T pose and assigning right handed coordinate system at each joint, as shown below.

![pose](media/tpose.png "T pose")

I've included a sample keypoints file. Simply run the demo as:

```
python calculate_joint_angles.py kpts_3d.dat
```

The calculated joint angles are returned as "jointname_angles". We can use the calculated joint angles to put the motion on a standard skeleton. This is useful because keypoints estimators are not consistent with their estimations, which leads to varying bone lengths. In red, we show the original output of Blazepose[link](https://google.github.io/mediapipe/solutions/pose.html) estimated 3D keypoints. In blue, we show the pose applied on a standard skeleton from the joint angles. The discrepancy between the poses is due to inaccuracy in keypoints estimation leading to bone lengths changing.

![example](media/poses.gif "poses")

0 comments on commit 6f229d8

Please sign in to comment.