从车身类Kinect的获取JointType [英] Get JointType from Body class Kinect
本文介绍了从车身类Kinect的获取JointType的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我知道在旧的SDK,有一个骨架
类,你可以这样做。
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);
}
然而,新的SDK走了出来,骨架
类是由机身
类取代。现在,该代码在 j.JointType
抛出一个错误。
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
.
是否有此问题的方法?
推荐答案
使用微软Kinect SDK 2.0版,你可以得到 ShoulderLeft
关节(并且类似地,任何其他骨骼关节)如下:
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.
这篇关于从车身类Kinect的获取JointType的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文