Hi !
I'm having a little problem with SimpleOpenNI's Pointcloud. I'm trying to run the sketch page 115 from the book Making Things See, here's a copy of it :
- import processing.opengl.*;
- import SimpleOpenNI.*;
- SimpleOpenNI kinect;
- void setup(){
- size(1024, 768, OPENGL);
- kinect = new SimpleOpenNI(this);
- kinect.enableDepth();
- }
- void draw(){
- background(0);
- kinect.update();
- translate(width/2, height/2, -1000);
- rotateX(radians(180));
- stroke(255);
- PVector[] depthPoints = kinect.depthMapRealWorld();
- for(int i = 0; i < depthPoints.length; i++){
- PVector currentPoint = depthPoints[i];
- point(currentPoint.x, currentPoint.y, currentPoint.z);
- }
- }
I was supposed to have something like
this (picture taken from the book), but instead I got something like
that, with an incredibly low framerate (something like 2 images per second).
I thought it was a problem with Processing 2.0 and the changes made to P3D/OpenGL, but I created a Snow-Leopart partition on my hard drive and I tried to run the sketch on it with Processing 1.5.1 and I still have the same problem. I also tried to update my graphic card's driver, but it doesn't change anything at all.
Does anyone have an idea of what's going on ?
Note : I'm using Processing 2.0b7 on Mac OS 10.8.2 (Mountain Lion).
Thanks in advance :-) !
PS : I tried to run Dan Shiffman's PointCloud example from his Kinect library and it works fine, with a normal framerate.
1