当前位置: 动力学知识库 > 问答 > 编程问答 >

position - "reference to a non-shared member requires an object reference" when trying to track Kinect joint

问题描述:

I want to track a joint position (LeftKnee) from Kinect. The problem is that I get reference to a non-shared member requires an object reference on the Skeleton.Joints part. Can anyone help me please?

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

网友答案:

You are referencing the JointType Enumeration incorrectly. See the JointType Enumeration documentation at MSDN for a list of possible enumeration values.

It's JointType.KneeLeft, not 'LeftKnee'.

分享给朋友:
您可能感兴趣的文章:
随机阅读: