/* -------------------------------------------------------------------------- * SimpleOpenNI IR 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; 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 ir generation if(context.enableIR() == false) { println("Can't open the depthMap, maybe the camera is not connected!"); exit(); return; } background(200,0,0); size(context.depthWidth() + context.irWidth() + 10, context.depthHeight()); } void draw() { // update the cam context.update(); // draw depthImageMap image(context.depthImage(),0,0); // draw irImageMap image(context.irImage(),context.depthWidth() + 10,0); }