如何检测打开/关闭并使用Microsoft Kinect v2通过手动指针拖动图像

时间:2015-06-27 19:33:36

标签: c# kinect

在Window 8应用程序中,我想使用Kinect手指针和Kinect V2拖动图像 我可以使用鼠标指针拖动该图像但不能使用Kinect手形指针...

无法读取指针的握把状态请帮助......

KinectCoreWindow kinectCoreWindow = KinectCoreWindow.GetForCurrentThread(); 
kinectCoreWindow.PointerMoved += kinectCoreWindow_PointerMoved;

private void kinectCoreWindow_PointerMoved(KinectCoreWindow sender,KinectPointerEventArgs args)
{
    KinectPointerPoint hand = args.CurrentPoint;

    var xpoint = hand.Position.X;
    var ypoint = hand.Position.Y;

    //txtxypoints.Text = "X :" + xpoint + "  Y : " + ypoint;

    txtxypoints.Text = "HandReachExtent : " + hand.Properties.HandReachExtent.ToString();
    txtxypoints2.Text = "HandRotation : " + hand.Properties.HandRotation.ToString();
    txtxypoints3.Text = "HandType : " + hand.Properties.HandType.ToString();
    txtxypoints4.Text = "IsEngaged : " + hand.Properties.IsEngaged.ToString();
    txtxypoints5.Text = "IsInRange : " + hand.Properties.IsInRange.ToString();
    txtxypoints6.Text = "IsPrimary : " + hand.Properties.IsPrimary.ToString();
    txtxypoints7.Text = "PressExtent : " + hand.Properties.PressExtent.ToString();
    txtxypoints8.Text = "BodyTimeCounter : " + hand.Properties.BodyTimeCounter.ToString();
}

0 个答案:

没有答案