Vangos Pterneas, Friend of the Gallery and becoming known as Mr Kinect, has a new great Kinect post and project on how you can determine joint rotations
In one of my previous blog posts, I showed you how to measure joint angles using Kinect and C#. Today, we’ll dive into a more complex topic: in this article, you are going to learn how to measure the orientation of a joint around each axis (X, Y, Z).
Measuring the orientation values is not trivial because it requires some good knowledge of Mathematics. Do not be afraid, though! After reading this article, you’ll be able to calculate the orientation of each joint using one line of C# code!
Sounds good? Let’s get started.
To run the code and samples provided in this guide, you’ll need the following:
- Kinect for XBOX v2 sensor with an adapter (or Kinect for Windows v2 sensor)
- Kinect for Windows v2 SDK
- Windows 8.1 or higher
- Visual Studio 2013 or higher
- A dedicated USB 3 port
Let’s do the Math
Using the code
Here is the complete code. All you have to do is import the following C# file into your Kinect project.
Measuring the rotation of the human body joints is not a trivial job. Unfortunately, Kinect does not provide us with Orientation values for the Head, Hands, and Feet. These joints do not have a “parent” joint, so it’s extremely difficult to accurately measure their orientation. The orientation accuracy regarding the rest of the joints is pretty good. The supported joints are the following:
In this blog post, you’ve learnt how to easily measure the rotation of the human body joints around the X, Y, and Z axis.
Project Information URL: http://pterneas.com/2017/05/28/kinect-joint-rotation/