Get JointType from Body class Kinect

喜夏-厌秋 提交于 2019-12-22 10:45:20

问题


I know in the old SDK, there was a Skeleton class and you can do something like

public void Compare(Skeleton skeleton) {
    var leftShoulderPosition = skeleton.Joints.Where(j => j.JointType == JointType.ShoulderLeft);
}

However, the new SDK came out and the Skeleton class is replaced by the Body class. Now, the code is throwing an error at j.JointType.

Is there a workaround for this problem?


回答1:


With Microsoft Kinect SDK v2.0, you can get the ShoulderLeft joint (and, similarly, any other skeletal joint) as follows:

body.Joints[JointType.ShoulderLeft]

where body is an instance of the Body class to which you refer.



来源:https://stackoverflow.com/questions/34832590/get-jointtype-from-body-class-kinect

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!