ESP icon indicating copy to clipboard operation
ESP copied to clipboard

Add input stream for the Kinect.

Open damellis opened this issue 8 years ago • 7 comments

damellis avatar Mar 10 '16 01:03 damellis

We need to address:

  1. Find a Kinect.
  2. Kinect on Mac or Openframeworks for Windows.

And the priority is low, I assume?

nebgnahz avatar Mar 14 '16 06:03 nebgnahz

Accidentally closed it...

nebgnahz avatar Mar 14 '16 06:03 nebgnahz

I think the Kinect in particular is not a high priority, although I think we need a third sensor source to go with the color sensor and accelerometer... A reliable audio example would be good.

damellis avatar Mar 15 '16 18:03 damellis

Some notes. I was able to get skeleton from a Kinect (model no. 1414) using ofxOpenNI which is a (largely unmaintained and undocumented) openFrameworks wrapper around an old version of OpenNI.

This required:

  • Placing ofxOpenNI in third-party/openFrameworks/addons.
  • Renaming ofGetGLTypeFromPixelFormat to ofGetGLFormatFromPixelFormat as the function has been renamed in recent versions of openFrameworks.
  • Adding the ofxOpenNI source files to the ESP Xcode project.
  • Adding the sub-directories of ofxOpenNI/include to the Xcode target's header search path.
  • Copying the lib directory from ofxOpenNI/mac/copy_to_data_openni_path to Xcode/ESP/bin/data/openni/ directory, adding the latter directory to the project's/target's library search path, and adding the contained .dylib files to the Xcode project.
  • Copying the config directory from ofxOpenNI/examples/openNI-SimpleExamples/bin/data/openni to Xcode/ESP/bin/data/openni/.

To make the Kinect data actually useable, we'd probably want to:

  • draw the Kinect camera image / depth map (e.g. so you can see whether or not you're in the frame)
  • support depth thresholding
  • support selection of joints and coordinates space for them (e.g. world vs. body)
  • find a way of recording training samples that doesn't require the user to have their hands on the keyboard. (Note that it can take a while for OpenNI to find the user's skeleton, so even a fixed delay at the start of a gesture may not work.)
  • have a way to draw joint data as a skeleton / wire-frame

Alternatively, some of this is taken care of by Synapse, and there's even a Synapse example for the GRT. This seems kind of silly, since Synapse is built on ofxOpenNI but it might be easier than using ofxOpeNI directly.

damellis avatar Aug 04 '16 21:08 damellis

Also, ofxKinectFeatures looks useful.

damellis avatar Aug 04 '16 21:08 damellis

If we use Synapse, we don't need to show the depth / RGB image ourselves.

We can rely on the user to trim each training sample. We'll need a way to toggle recording of training samples, rather than pressing and holding a key while recording.

damellis avatar Aug 05 '16 23:08 damellis

Use Nick's OSC receiving code.

damellis avatar Aug 06 '16 00:08 damellis