KinectPV2

Kinect v2 library for Processing


Version 0.7.8

Library is curretly on develop with the Windows SDK Version 1409 (9/16/2014)

Library for Mac check out the OpenKinect-for-Processing library.


Requirements

Reference and tutorial

Webpage tutorial with a couple of useful examples.

Install for Processing 3.0

For Processing 2.2.1 please use the KinectPV2 0.7.2 version.

Examples

Build

To build the KinectPV2 library from source code, look at the Build_libs folder

Know issues


Todo


Simple Device

To include the library into a processing sketch you just need to import it and initialize it.

import KinectPV2.*;
KinectPV2 kinect;

void setup() {
  kinect = new KinectPV2(this);
  //Start up methods go here
  kinect.init();
}

Images

To obtain the color Image, depth Image, infrared Image, bodyIndex Image and long Exposure Image as a PImage you need to active with the following method

 void enableColorImg(boolean toggle);
 void enableDepthImg(boolean toggle);
 void enableInfraredImg(boolean toggle);
 void enableBodyTrackImg(boolean toggle);
 void enableInfraredLongExposureImg(boolean toggle);

 PImage getColorImage();
 PImage getDepthImage();
 PImage getInfraredImage();
 PImage getBodyTrackImage();
 PImage getInfraredLongExposureImage();

just initialize in the setup()

  kinect = new KinectPV2(this);
  kinect.enableColorImg(true);
  kinect.init();

get the PImage in the draw()

PImage imgC = kinect.getColorImage();
image(imgC, 0, 0);

Raw Data is only available for the color, depth ad bodytrack frames/images. Once the frames are activated just call them.

  //raw Data int valeus from [0 - 4500]
  int [] rawData = kinect.getRawDepthData();

  //values for [0 - 256] strip
  int [] rawData256 = kinect.getRawDepth256Data();

  //raw body data 0-6 users 255 nothing
  int [] rawData = kinect.getRawBodyTrack();

  //unpacket color values
  int [] colorRaw = kinect.getRawColor();

License

MIT License http://en.wikipedia.org/wiki/MIT_License