logicaroma / processing-openkinect

Processing library for OpenKinect

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

OpenKinect library for Processing

Currently OSX only, please feel free to help remove that dependency.

Gimme the binary already! (Updated 19 Dec 2010)

If you don't care for building from source, there are a couple of downloads available.

10.6 - Snow leopard: http://nrocy.github.com/files/kinect20101222.zip

10.5 - Leopard: http://nrocy.github.com/files/kinect20101222_leopard.zip

Screenshot Porn

Screenshot

Methods available:

NativeKinect.init() - initialize the Kinect
NativeKinect.setVideoIR() - output RGB video (default)
NativeKinect.setVideoIR() - output IR video
NativeKinect.start() - tell the Kinect to start streaming data to the library
NativeKinect.getVideo() - pull the latest video frame
NativeKinect.getDepthMap() - pull the latest depthMap frame
NativeKinect.setLed(int) - change the Kinect LED colour (0-6)

Example:

import king.kinect.*;

PImage img, depth;

void setup()
{
	size(1280, 480);
	
	img = createImage(640,480,RGB);
	depth = createImage(640,480,RGB);
	
	NativeKinect.init();
	NativeKinect.start();
}

void draw()
{
	img.pixels = NativeKinect.getVideo();
	img.updatePixels();

	depth.pixels = NativeKinect.getDepthMap();
	depth.updatePixels();

	image(img,0,0,640,480);
	image(depth,640,0,640,480);
}

Build Requirements:

Prebuilt 32-bit libraries are included, so no external deps.

  • Xcode

Build Instructions:

Coming soon.

TODO:

  • More error checking
  • Implement motor control methods
  • Implement accelerometer methods
  • Remove OSX/XCode specific dependencies

About

Processing library for OpenKinect