[# KINECT] HowTo: Soften the detection of movements in the skeleton



While we await the final SDK for developers with Kinectleave in a few days, we still have to adjust quite a bit to make the SDK will allow us to make robust applications. One of these “debts” Kinect has with us is the ability to remove the “tembleque / tremor” have at each point of the skeleton when working with the same point to point or Joint to Joint. If you run the application that shows both skeletons in a Canvas of WPF, you’ll see that it works pretty well.

Now, if we modify it with a bit of the code base of this post, to add 2 worlds in each hand (I have ‘ s got the whole world in his hands!) in will see something similar to the following image. While I have not well adjusted the size of the form so that the worlds coincide 100% with each hand, when you run the application you can see that it is a flickering or tembleque a little weird when examines the detail of the skeleton.


As well to solve this problem to our hands comes a fabulous property of the SDK called TransformSmooth. While there is lots of documentation in this respect, using this property we can define a series of buffers for deviations that will be processed during the analysis of the skeleton. Thus if we add the following lines before subscribe to the event of detection of skeletons, we can work in a smooth way.

   1: Kinect.SkeletonEngine.TransformSmooth = true;

   2: var parameters = new TransformSmoothParameters

   3:     {

   4:         Smoothing = 0.75f, 

   5:         Correction = 0.1f, 

   6:         Prediction = 0.0f, 

   7:         JitterRadius = 0.05f, 

   8:         MaxDeviationRadius = 0.08f

   9:     };

  10: Kinect.SkeletonEngine.SmoothParameters = parameters;

  11: Kinect.SkeletonFrameReady += KinectSkeletonFrameReady;


Now, to see that values have to apply to each property, it is best to go testing them to see that format is better suited to our application. In this post, is described a bit to represent each property and values by default of the same.

Parameter Description Default Value Comments
Smoothing Specifies the amount of smoothing. 0.5 Higher values correspond to more smoothing and a value of 0 causes the raw data to be returned. Increasing smoothing tends to increase latency. Values must be in the range [0, 1.0].
Correction Specifies the amount of correction. 0.5 Lower values are slower to correct towards the raw data and appear smoother, while higher values correct toward the raw data more quickly. Values must be in the range [0, 1.0].
Prediction Specifies the number of predicted frames. 0.5  
Jitter Radius Specifies the jitter-reduction radius, in meters. 0.05 The default value of 0.05 represents 5cm. Any jitter beyond the radius is clamped to the radius.
Maximum Deviation Radius Specifies the maximum radius that filter positions can deviate from raw data, in meters. 0.04 Filtered values that would exceed the radius from the raw data are clamped at this distance, in the direction of the filtered value.

And as always if you want to download the ´código of this post you can do from here

https://skydrive.live.com/redir.aspx?cid=bef06dffdb192125 & SPL = BEF06DFFDB192125! 3798 & parid = BEF06DFFDB192125! 1932

Greetings @ Home

El Bruno





One thought on “[# KINECT] HowTo: Soften the detection of movements in the skeleton

  1. Everything is very open with a very clear description of the issues.
    It was definitely informative. Your website is very useful.
    Thank you for sharing!


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s