/* -------------------------------------------------------------------------- * SimpleOpenNI User Test * -------------------------------------------------------------------------- * Processing Wrapper for the OpenNI/Kinect library * http://code.google.com/p/simple-openni * -------------------------------------------------------------------------- * prog: Max Rheiner / Interaction Design / zhdk / http://iad.zhdk.ch/ * date: 02/16/2011 (m/d/y) * ---------------------------------------------------------------------------- */ import SimpleOpenNI.*; SimpleOpenNI context; boolean autoCalib=true; void setup() { context = new SimpleOpenNI(this); // enable depthMap generation if(context.enableDepth() == false) { println("Can't open the depthMap, maybe the camera is not connected!"); exit(); return; } // enable skeleton generation for all joints context.enableUser(SimpleOpenNI.SKEL_PROFILE_ALL); background(200,0,0); stroke(0,0,255); strokeWeight(3); smooth(); size(context.depthWidth(), context.depthHeight()); } void draw() { // update the cam context.update(); // draw depthImageMap image(context.depthImage(),0,0); // draw the skeleton if it's available int[] userList = context.getUsers(); for(int i=0;i