在尝试跟踪Kinect关节时,“对非共享成员的引用需要对象引用”

时间:2013-06-11 08:23:10

标签: position kinect

我想跟踪Kinect的联合位置(LeftKnee)。问题是我在reference to a non-shared member requires an object reference部分得到了Skeleton.Joints。有人可以帮帮我吗?

Private Sub SensorSkeletonFrameReady(ByVal sender As Object, ByVal e As SkeletonFrameReadyEventArgs)
    Dim skeletons(-1) As Skeleton
    Using skeletonFrame As SkeletonFrame = e.OpenSkeletonFrame()
        If skeletonFrame IsNot Nothing Then
            skeletons = New Skeleton(skeletonFrame.SkeletonArrayLength - 1) {}
            skeletonFrame.CopySkeletonDataTo(skeletons)
            Dim j As Joint = Skeleton.Joints(JointType.LeftKnee)
        End If
    End Using

1 个答案:

答案 0 :(得分:0)

您错误地引用了JointType枚举。请参阅MSDN上的JointType Enumeration documentation以获取可能的枚举值列表。

它是JointType.KneeLeft,而不是'LeftKnee'。