【发布时间】:2014-02-06 14:46:52
【问题描述】:
使用 kinect 工具箱,使用算法检测简单的滑动手势等,例如检测向右滑动的手势
protected override void LookForGesture()
{
// Swipe to right
if (ScanPositions((p1, p2) => Math.Abs(p2.Y - p1.Y) < SwipeMaximalHeight, // Height
(p1, p2) => p2.X - p1.X > -0.01f, // Progression to right
(p1, p2) => Math.Abs(p2.X - p1.X) > SwipeMinimalLength, // Length
SwipeMininalDuration, SwipeMaximalDuration)) // Duration
{
RaiseGestureDetected("SwipeToRight");
return;
}
或检测到手过头的姿势:
bool CheckHandOverHead(Vector3? headPosition, Vector3? handPosition)
{
if (!handPosition.HasValue || !headPosition.HasValue)
return false;
if (handPosition.Value.Y < headPosition.Value.Y)
return false;
if (Math.Abs(handPosition.Value.X - headPosition.Value.X) > MaxRange)
return false;
if (Math.Abs(handPosition.Value.Z - headPosition.Value.Z) > MaxRange)
return false;
return true;
}
如何检测“蹲”手势或姿势。我假设它与上面的示例类似,但是您将如何检测髋关节是否通过膝关节下方以检测全范围深蹲。
关于一种方法的任何想法或是否有可用的库来模拟深蹲运动?
【问题讨论】:
标签: kinect