Kinect=001=basic

Page 1

01

KINECT BASIC


Draw Depth


import SimpleOpenNI.*;

SimpleOpenNI context;

Of course you need to import library

Create a simpleOpenNI object

/////////////////////////////////////////////// void setup(){

} /////////////////////////////////////////////// void draw(){

}


import SimpleOpenNI.*;

SimpleOpenNI context; /////////////////////////////////////////////// void setup(){ context = new SimpleOpenNI (this); context.enableDepth();

Initiate the object

Enable the function will be used. (“DepthMap” here)

size(context.depthWidth(), context.depthHeight()); } /////////////////////////////////////////////// void draw(){

}

Window size from the depthImage


import SimpleOpenNI.*;

SimpleOpenNI context; /////////////////////////////////////////////// void setup(){ context = new SimpleOpenNI (this); context.enableDepth(); size(context.depthWidth(), context.depthHeight()); } /////////////////////////////////////////////// void draw(){ Update the camera context.update(); image(context.depthImage(),0,0); Display the Depth Map }


MY BEST Pic EVER


IDENTIFY


import SimpleOpenNI.*;

SimpleOpenNI context; /////////////////////////////////////////////// void setup(){ context = new SimpleOpenNI (this); context.enableDepth(); context.enableUser(); Add this line size(context.depthWidth(), context.depthHeight()); } /////////////////////////////////////////////// void draw(){ context.update(); image(context.userImage(),0,0); Change “depthImage” to “userImage” }


Now You See Me In Color


Multi Players, Cool!


Initiate?


import SimpleOpenNI.*; SimpleOpenNI context; /////////////////////////////////////////////// void setup(){ context = new SimpleOpenNI (this); context.enableDepth(); context.enableUser(); Add these lines if(context.isInit() == false){ println("Maybe your Kinect is not connected"); exit(); return; } size(context.depthWidth(), context.depthHeight()); } /////////////////////////////////////////////// void draw(){ context.update(); image(context.userImage(),0,0); }


Unplug your Kinect Image: http://insidetheblack.com/2013/03/04/top-5-best-mtv-unplugged-performances/


Once you disconnect your Kinect, it will tell you.


Turn static files into dynamic content formats.

Create a flipbook
Issuu converts static files into: digital portfolios, online yearbooks, online catalogs, digital photo albums and more. Sign up and create your flipbook.