Loading...
Logo
Processing Forum
At the Technical University of Eindhoven we are trying to get processing working with kinect. We've tried this example:

// Daniel Shiffman
// Basic Library functionality example

import org.openkinect.*;
import org.openkinect.processing.*;

Kinect kinect;
boolean depth = true;
boolean rgb = false;
boolean ir = false;

float deg = 15; // Start at 15 degrees

void setup() {
  size(1280,520);
  kinect = new Kinect(this);
  kinect.start();
  kinect.enableDepth(depth);
  kinect.enableRGB(rgb);
  kinect.enableIR(ir);
  kinect.tilt(deg);
}


void draw() {
  background(0);

  image(kinect.getVideoImage(),0,0);
  image(kinect.getDepthImage(),640,0);
  fill(255);
  text("RGB/IR FPS: " + (int) kinect.getVideoFPS() + "        Camera tilt: " + (int)deg + " degrees",10,495);
  text("DEPTH FPS: " + (int) kinect.getDepthFPS(),640,495);
  text("Press 'd' to enable/disable depth    Press 'r' to enable/disable rgb image   Press 'i' to enable/disable IR image  UP and DOWN to tilt camera   Framerate: " + frameRate,10,515);
}

void keyPressed() {
  if (key == 'd') {
    depth = !depth;
    kinect.enableDepth(depth);
  } 
  else if (key == 'r') {
    rgb = !rgb;
    if (rgb) ir = false;
    kinect.enableRGB(rgb);
  }
  else if (key == 'i') {
    ir = !ir;
    if (ir) rgb = false;
    kinect.enableIR(ir);
  } 
  else if (key == CODED) {
    if (keyCode == UP) {
      deg++;
    } 
    else if (keyCode == DOWN) {
      deg--;
    }
    deg = constrain(deg,0,30);
    kinect.tilt(deg);
  }
}
void stop() {
  kinect.quit();
  super.stop();
}


The problem is that we keep getting this error:


Exception in thread "Animation Thread" java.lang.UnsatisfiedLinkError: no kinect in java.library.path
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1734)
at java.lang.Runtime.loadLibrary0(Runtime.java:823)
at java.lang.System.loadLibrary(System.java:1028)
at org.openkinect.Context.<clinit>(Context.java:43)
at org.openkinect.processing.Kinect.start(Kinect.java:40)
at RGBDepthTest.setup(RGBDepthTest.java:41)
at processing.core.PApplet.handleDraw(Unknown Source)
at processing.core.PApplet.run(Unknown Source)
at java.lang.Thread.run(Thread.java:662)

does anybody know how to fix it?

Replies(5)

this is the next error we got...

Exception in thread "Animation Thread" java.lang.UnsatisfiedLinkError: C:\Users\Alex\Documents\Processing\libraries\SimpleOpenNI\library\SimpleOpenNI.dll: The specified procedure could not be found
at java.lang.ClassLoader$NativeLibrary.load(Native Method)
at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1803)
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1728)
at java.lang.Runtime.loadLibrary0(Runtime.java:823)
at java.lang.System.loadLibrary(System.java:1028)
at SimpleOpenNI.SimpleOpenNI.<clinit>(SimpleOpenNI.java:33)
at kineticspace.setup(kineticspace.java:439)
at processing.core.PApplet.handleDraw(Unknown Source)
at processing.core.PApplet.run(Unknown Source)
at java.lang.Thread.run(Thread.java:662)
It complains it cannot find a function in the indicated DLL. You probably have discrepancy (wrong version) between the wrapper and the DLL itself.
i do get similar error messages within a different context ...
--->
(... java files or libs are not connecting to processing)
----
am only guessing here (being an absolute freshman when it comes to processing and java) 
but could it be a system-side library or older/other version of java
causing the problem?



Did you get an answer on how to solve  tue_student's question? I am having a similar problem and need help.

 
I downloaded and installled 32 bit drivers on my Windows 7 machine following the directions  found here. 
 
The drivers installed perfectly and work fine.
I then   installed the bridge from OpenNI to Processing, SimpleOpenNI following the very simple set of directions  but get the error below when I try to run this  example:
/* --------------------------------------------------------------------------
* SimpleOpenNI DepthImage 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);

// mirror is by default enabled
context.setMirror(true);

// enable depthMap generation
context.enableDepth();

// enable ir generation
context.enableRGB();
//context.enableRGB(640,480,30);
//context.enableRGB(1280,1024,15);

size(context.depthWidth() + context.rgbWidth() + 10, context.rgbHeight());
}

void draw()
{
// update the cam
context.update();

background(200,0,0);

// draw depthImageMap
image(context.depthImage(),0,0);

// draw irImageMap
image(context.rgbImage(),context.depthWidth() + 10,0);
}

 

Exception in thread "Animation Thread" java.lang.UnsatisfiedLinkError: C:\Program Files (x86)\processing-1.5.1\java\bin\SimpleOpenNI.dll: The specified procedure could not be found
 at java.lang.ClassLoader$NativeLibrary.load(Native Method)
 at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1803)
 at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1720)
 at java.lang.Runtime.loadLibrary0(Runtime.java:823)
 at java.lang.System.loadLibrary(System.java:1028)
 at SimpleOpenNI.SimpleOpenNI.<clinit>(SimpleOpenNI.java:33)
 at DepthImage.setup(DepthImage.java:40)
 at processing.core.PApplet.handleDraw(Unknown Source)
 at processing.core.PApplet.run(Unknown Source)
 at java.lang.Thread.run(Thread.java:662)

Not sure about the Processing IDE, but I was able to use kinect with Processing while working in Eclipse. I had to just link the libraries from the C:\Program Files\OpenNI\bin path and all is fine.

Never used the wrapper for Processing, but my only guess is that you have a 64 bit system. I was getting a similar kind of error for 64 bit system because OpenNI did not write the system variables correctly (I had to write "bin64" instead of just "bin"), so go check your system vars.