骨架平滑无法正常工作

Skeleton Smoothing not working properly

我必须对骨架关节应用平滑。我使用了 this link 提出的联合过滤,但它没有给出正确的结果。是否有任何其他过滤器或任何其他方式将平滑应用于骨架?

例如:我已将所有 Kinect 关节传递给 Update 函数 KinectJointFilter.cpp(我从上面得到的link)。但是同样的数据 正在作为输出。我感觉骨骼平滑没有任何变化。

请告诉我我的实现是否正确。

您可能需要在初始化之后调用具有不同平滑参数的 Init() 方法。

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);

现在,只要您有一个新骨架,将其传递给 Update() 方法并使用 GetFilteredJoints() 以获得平滑的关节。

我没有试过上面的代码,但应该可以。

您可以在this page中找到一些有用的参数组合(它指的是SDK 1.8,但示例中的参数在这种情况下也很好)。