【问题标题】:Get a Kinect JointType by its ID number instead of its name通过 ID 号而不是名称获取 Kinect JointType
【发布时间】:2016-06-25 10:59:15
【问题描述】:

是否可以通过值而不是名称来检索“关节类型”?

例如,我们写(joints[8]);,而不是(joints[JointType.ShoulderRight]);

根据JointType Enumeration,当我做后者时,它给了我以下错误

无法从“int”转换为“Microsoft.Kinect.JointType”

【问题讨论】:

    标签: c# visual-studio kinect kinect-sdk


    【解决方案1】:

    这是我在来源中使用的方式。

    你只需要做一个演员:

    JointType myJoint;
    myJoint = (JointType)8;
    

    之后你可以写:

    (joints[myJoint]);
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2021-09-10
      • 1970-01-01
      • 1970-01-01
      • 2021-01-12
      • 1970-01-01
      • 2011-07-28
      相关资源
      最近更新 更多