1

I'm working on an application to control various systems using a Kinect, and I'm having trouble setting up custom gestures. I'm using the Kinect Toolbox library, and I've run into a chicken-and-egg problem with the TemplatedGestureDetector. What I want to do is simple enough:

  • Get the name of the new gesture from the user
  • Record the user making the new gesture
  • Create a TemplatedGestureDetector from the recorded gesture
  • Register a handler for the OnGestureDetected event

It's proving less straightforward than it look, though. My main problem is that the constructor for TemplatedGestureDetector needs a stream to a file containing (as far as I can make out) a serialised path... but I can't see any way of creating such a file, and if I create a new (empty) file and give it a stream to that, then I get an error when it tries to deserialise a path out of it.

To get around this, I've added a separate constructor which takes a List<RecordedPath>, which is what the stream was being deserialised to anyway, and then recorded my own paths to pass to that. This runs without error, but doesn't seem to ever trigger the detection event, making me think that perhaps I've missed something.

Could anyone walk me through the process? I haven't been able to find any useful documentation anywhere; the Kinect Toolbox library is a nice piece of work but the developers' decision to leave the Codeplex documentation page blank is very disappointing.

anaximander
  • 7,083
  • 3
  • 44
  • 62

0 Answers0