Question

I have a processing sketch which worked with a microsoft Kinect and which I am now attempting to get to work with an Asus Xtion RGB+D camera. I am getting the attached error. This is my code:

// Daniel Shiffman
// Kinect Point Cloud example
// http://www.shiffman.net
// https://github.com/shiffman/libfreenect/tree/master/wrappers/java/processing

import org.openkinect.*;
import org.openkinect.processing.*;
import muehlseife.*; //<- import library
import java.io.*;
import processing.opengl.*;

octaneRenderer oct; //<- setup variable
boolean exportObj = false;


// Kinect Library object
Kinect kinect;

float a = 0;

// Size of kinect image
int w = 640;
int h = 480;

// writing state indicator
boolean write = false;

// threshold filter initial value
int fltValue = 950;


// "recording" object. each vector element holds a coordinate map vector
Vector <Object> recording = new Vector<Object>(); 


// We'll use a lookup table so that we don't have to repeat the math over and over
float[] depthLookUp = new float[2048];

void setup() {
  //size(800,600,P3D);
  size(800,600,OPENGL);
  kinect = new Kinect(this);
  kinect.start();
  kinect.enableDepth(true);
  // We don't need the grayscale image in this example
  // so this makes it more efficient
  kinect.processDepthImage(false);

...

Any idea of how to get the xtion to work?enter image description here

Was it helpful?

Solution

AFAIK Daniel Shiffman's Kinect wrapper is for OpenKinect/libfreenect which has a driver only for Xbox Kinect (not for Kinect for Windows/Asus Xtion/Primesense Sensor)

You might need to use OpenNI and the PrimeSense Drivers. Since you're using Processing I recommend using the SimpleOpenNI wrapper. The only catch is OpenNI 2 was released recently but SimpleOpenNI isn't updated for that so it will only work with the older (1.5.x) SDK. Luckily the SimpleOpenNI downloads also includes the installers you need.

Try this first:

  1. Use the hardware/middleware/etc. installer provided by SimpleOpenNI
  2. Install the Processing library
  3. Run a simple sample to see if it works)

Hopefully it should all be fine.

If not you might need to install OpenNI/NITE/Sensor (not SensorKinect) manually one by one in this order. You should be able to download the individual installers from the official OpenNI site. Before you move to Processing, you should be run one of the OpenNI samples (like SimpleNiViewer) to check if everything is fine up to this stage.

I've seen Everyware's updated Pink Cloud app running in Processing and they were using Asus Xtion sensors so hopefully you'll be using the Xtion sensor with Processing soon. Everyware Pink Cloud installation

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top