pykinect

Converting Python (PyKinect) Skeleton data to Points (X,Y)

会有一股神秘感。 提交于 2019-12-08 05:34:07
问题 This is a pretty simple issue but I am new to Python and I can't seem to accomplish it. I want to convert Skeleton data co-ordinates in Python (PyKinect) to Points (X,Y). I know that the similar task can be achieved in C# (using Microsoft.Kinect libraries) like the below code: var p = new Point[6]; Point shoulderRight = new Point(), shoulderLeft = new Point(); foreach (Joint j in data.Joints) { switch (j.ID) { case JointID.HandLeft: p[0] = new Point(j.Position.X, j.Position.Y); // ... In