public void setup() { context = new SimpleOpenNI(this); // mirror is by default enabled context.setMirror(true); // enable depthMap generation context.enableDepth(); // enable the hands + gesture context.enableGesture(); context.enableHands(); // setup NITE sessionManager = context.createSessionManager("Click,Wave", "RaiseHand"); pointDrawer = new PointDrawer(); flowRouter = new XnVFlowRouter(); flowRouter.SetActive(pointDrawer); sessionManager.AddListener(flowRouter); size(context.depthWidth(), context.depthHeight()); smooth(); }
public void setupContext() { // setup onenNI context context = new SimpleOpenNI(this); // enable depthMap generation context.enableDepth(); // enable camera image generation context.enableRGB(); context.setMirror(true); // enable skeleton generation for all joints context.enableUser(SimpleOpenNI.SKEL_PROFILE_ALL); stroke(255, 255, 255); smooth(); }