Kinect v2 Finger Tracking
Today Vangos Pterneas, monster friend of the Gallery, shares a project he's been working on and that I bet you will all dig...
During the past few days, I have been working on a really cool personal project: finger tracking using Kinect version 2! As always, I’m providing the source code to you.
If you want to understand how things work, keep reading!
- 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
Finger Tracking Algorithm
While developing the project, I had the following facts in mind: the algorithm should be able to track both hands and also know who those hands belong to. The Kinect SDK provides us with information about the human bodies. The finger tracking algorithm should be able to extend this functionality and assign fingers to specific Body objects.
Existing finger tracking algorithms simply process the depth frame and search for fingers withing a huge array (512×424) of data. Most of the existing solutions provide no information about the body; they only focus on the fingers. I did something different: instead of searching the whole 512×424 array of data, I am only searching the portion of the array around the hands! This way, the search area is limited tremendously! Moreover, I know who the hands belong to.
So, how does the finger tracking algorithm work?
Step 1 – Detect the Hand joints
Step 2 – Specify the search area
Step 3 – Find the contour
Step 4 – Find the Convex Hull
While building this project, my goal was simple: I did not want you to mess with the all of the complexity. So, I encapsulated all of the above algorithm into a handy class: HandsController.
Finger Tracking is under the LightBuzz.Vitruvius.FingerTracking namespace. This namespace should be imported whenever you need to use the finger tracking capabilities.
And… That’s it! Everything is encapsulated into a single component!
Need the position of a finger in the 3D space? Just use the CameraPoint property. Need to display a finger point in the Depth or Infrared space? Use the DepthPoint. Want to display a finger point on the Color space? Use the ColorPoint.
Project Information URL: http://pterneas.com/2016/01/24/kinect-finger-tracking/
Project Source URL: https://github.com/LightBuzz/Kinect-Finger-Tracking