Reputation: 63
I have to apply smoothing over the skeleton Joints. I have used Joint Filtering proposed at this link, but it is not giving correct result. Is there is any other filter or anyother way to apply the smoothing to the Skeleton?
For example: I have passed all Kinect Joints to the Update
function on
KinectJointFilter.cpp (which I got from the above link). But the same data
are coming as output. I don't feel any change in skeleton smoothing.
Please tell me whether my implementation is correct or not.
Upvotes: 2
Views: 591
Reputation: 14356
You probably need to call the Init()
method with different smoothing parameters, just after the initialization.
FilterDoubleExponential fde = new FilterDoubleExponential();
FLOAT fSmoothing = 0.7f;
FLOAT fCorrection = 0.3f;
FLOAT fPrediction = 1.0f;
FLOAT fJitterRadius = 1.0f;
FLOAT fMaxDeviationRadius = 1.0f;
// The above parameters provide very smoothed joints,
// but also an high latency.
// Change them as you prefer
// Set transform parameters.
fde.Init(fSmoothing, fCorrection, fPrediction, fJitterRadius, fMaxDeviationRadius);
Now, whenever you have a new skeleton, pass it to the Update()
method and use the GetFilteredJoints()
in order to obtain the smoothed joints.
I have not tried the above code, but it should work.
You can find some useful combinations of parameter in this page (it refers to the SDK 1.8, but the parameters in the example are good also in this case).
Upvotes: 1