Monday, February 25, 2013

Sorting out the Kinect skeleton feature



The Kinect has some very clever software and firmware which enables it to capture the skeleton patterns of up to two people at the same time.  I have been tracking the progress of the Kinect since it's introduction and bought a commercial, as opposed to an Xbox release, when it became available in 2012.  With the rapid completion of the Inmoov robot print here and the successful testing of the Mini Maestro 24 servo controller with the Hitech HS-805BB servos used to move the arms and shoulders, I began to delve into the Kinect SDK.

The Kinect can capture skeleton patterns in two modes; full body...



...and upper body {seated}




Extracting the Cartesian coordinates of the bones in three dimensions is straightforward.  Being a naturally suspicious sort, however, I decided to check to see how consistent the length of the individual bones actually was.  As I suspected, they vary.  This shouldn't be surprising considering the wickedness of trying to figure out the position of bones buried in flesh and muscle starting only with surface measurements of the body and on top of that making the calculations at a rate of thirty frames per second.

Just eyeballing the captured data it appeared that the bone lengths were varying wildly.  When I took a mean and standard deviation for each bone, however, I discovered that the calculation was remarkably consistent. I made a test data set using myself as the subject.  The measurements are in meters.


Mean SD
Shoulder
Left 0.217 0.017
Right 0.218 0.013
Humerus 
Left 0.242 0.025
Right 0.241 0.026
Forearm
Left 0.235 0.024
Right 0.235 0.026
Palm
Left 0.089 0.034
Right 0.086 0.029










The numbers are not too bad.  The wrist/palm measurements are the worst.  I have extra code which I hope will give better results for the hands and fingers.

The next step will be to see if I can transform the coordinates into something more useful with the Inmoov by fixing the bone lengths to calibrated means.

No comments:

Post a Comment