none
How to use two hand cursors simultaneously using Kinect Interactions

Answers

All replies

  • The core Kinect Interaction stream for C++/.Net supports 2 hands for the 2 tracked skeletons, as demonstrated in their other tutorial:

    http://dotneteers.net/blogs/vbandi/archive/2013/05/03/kinect-interactions-with-wpf-part-iii-demystifying-the-interaction-stream.aspx

    Unfortunately, the Toolkit controls(Kinect Region), which the sample uses only supports 1 hand. Since you have the code for the controls, you would need to modify the KinectRegion way of handling the UserInfo data to support 2 hands. Depending on your level of experience may not be trivial.

    To get you started, you need to look at the InteractionFrameReady event handler.

    Monday, June 24, 2013 6:36 PM
    Owner
  • Click Start > Kinect for Windows SDK 1.7.0 > Kinect for Windows Toolkit v1.7.0 (run).

    Under Components tab find Microsoft.Kinect.Toolkit.Controls and click on Install buton. This will ask for destination folder, where you want to put the sources. I recommend selecting your project solution directory. After that you can remove Microsoft.Kinect.Toolkit.Controls.dll reference from your project and add a project reference instead (that is Microsoft.Kinect.Toolkit.Controls.csproj from destination selected above).

    Now it will first build Microsoft.Kinect.Toolkit.Controls as referenced project in the solution and then your main project.

    Open KinectRegion.cs and comment line 1000:

    //IsPrimaryHandOfUser = handPointer.IsPrimaryForUser,

    Insert this on the line above:

    IsPrimaryHandOfUser = true,

    After running the project, both hands will show cursors and receive events as both of them will be tracked as a primary hand of user ;-). Yes, it's a kind of a quick hack, but it works nicely. You could add some property for KinectRegion to enable or disable this behaviour.

    Regards,

    Lukas Satin

    Wednesday, August 28, 2013 7:21 PM