node-openni
OpenNI bindings in Node.js.
Supports multiple users.
Install
Install libusb and OpenNI following the platform-specific instructions at https://github.com/OpenNI/OpenNI.
(If you're having trouble with this installation, some users have reported that the simple-openni package installs these dependencies successfully: https://code.google.com/p/simple-openni/wiki/Installation )
Then you will have to fork this repo:
$ cd node-openni$ node-gyp configure build
Test
Plug in your kinect.
Run:
$ node test/base
Stay in the surrender position in front of the camera, a couple of meters away. After you're synced you should see
Use
Create Context
var OpenNI = ; var context = ;
Register for user events:
'newuser' 'userexit' 'lostuser' 'posedetected' 'calibrationstart' 'calibrationsucceed' 'calibrationfail';
Register for joint events
"head" "neck" "torso" "waist" "left_collar" "left_shoulder" "left_elbow" "left_wrist" "left_hand" "left_fingertip" "right_collar" "right_shoulder" "right_elbow" "right_wrist" "right_hand" "right_fingertip" "left_hip" "left_knee" "left_ankle" "left_foot" "right_hip" "right_knee" "right_ankle" "right_foot";
Close Context
// Close the context to exit process;
Specify Joints
You can specify exactly which joints you want to be tracked:
context;
Gestures
Two gestures added: Wave and Click.
Gesture Callbacks
context; context
Licence
MIT