手腕Yaw Kinect 1.8

时间:2015-03-24 11:25:13

标签: c# kinect kinect-sdk

我想知道如何使用Microsoft Kinect跟踪手腕偏航的角度。现在我正在使用以下代码:

Joint wrist = skeleton.Joints[JointType.WristLeft];
Joint hand = skeleton.Joints[JointType.HandLeft];
Joint elbow = skeleton.Joints[JointType.ElbowLeft];
Joint hipCenter = skeleton.Joints[JointType.HipCenter];

Vector3D vectorWristHand = new Vector3D(wrist.Position.X - hand.Position.X, wrist.Position.Y - hand.Position.Y, wrist.Position.Z - hand.Position.Z);
Vector3D vectorElbowWrist = new Vector3D(elbow.Position.X - wrist.Position.X, elbow.Position.Y - wrist.Position.Y, elbow.Position.Z - wrist.Position.Z);
Vector3D vectorElbowHip = new Vector3D(elbow.Position.X - hipCenter.Position.X, elbow.Position.Y - hipCenter.Position.Y, elbow.Position.Z - hipCenter.Position.Z);

Vector3D cpCenterWrist = Vector3D.CrossProduct(vectorElbowHip, vectorElbowWrist);
Vector3D cpWrist = Vector3D.CrossProduct(cpCenterWrist, vectorWristHand);

return AngleBetweenTwoVectors(cpCenterWrist, cpWrist, inDegrees);

这应该让我回到手腕偏转的角度。然而,我的数学技能并不是那么好,如果我对数学没有清楚的认识,那么很难找到一个好的实现。

也许有人也可以向我解释我可以使用哪些精确的矢量,如果甚至可以跟踪Kinect上的手腕偏航运动。

0 个答案:

没有答案