OpenKinect-for-Processing icon indicating copy to clipboard operation
OpenKinect-for-Processing copied to clipboard

Error for DepthThreshold2 example

Open chazevans opened this issue 8 years ago • 6 comments

Getting this error when running DepthThreshold2 example:

The function "startDepth()" does not exist

on line 28: kinect2.startDepth();

Using: 1.0 release Processing 3.1.1 Mac OSX 10.11.5. Kinect v2 model 1520

Thanks in advance for any advice!

chazevans avatar Jun 29 '16 15:06 chazevans

It worked for me when I changed it to kinect2.initDepth();

MatiasConTilde avatar Jul 04 '16 20:07 MatiasConTilde

Thanks for the response!

I changed line 28 to kinect2.initDepth(); and a new error appeared: "The function start() does not exist" on line 29

I tried changing line 29 to kinect2.init();

This got the example to compile without an error message but no depth image appeared when the sketch ran. Any other thoughts or advice you might have is very appreciated. Thanks again.

chazevans avatar Jul 07 '16 20:07 chazevans

Ok, I had the same problem. The way it worked for me was changing the startDepth() for initDepth() and also adding a initDevice() afterwards. Like this:

  kinect2 = new Kinect2(this);
  kinect2.initDepth();
  kinect2.initDevice();

Mac 10.9 Processing 3.0 Kinect v2 1520

SandroMiccoli avatar Jul 22 '16 22:07 SandroMiccoli

Cool! That did the trick. Thanks so much!

chazevans avatar Aug 10 '16 23:08 chazevans

i'm re-opening this as the examples should be fixed if they are not working and also perhaps the API re-examined if there is confusion.

shiffman avatar Aug 12 '16 02:08 shiffman

just running through some of the V2 examples and noticed this bug in the example still, here's what i changed my setup to -- exactly the same as the above fix:

void setup() {
  size(1280, 480);

  kinect2 = new Kinect2(this);
  kinect2.initDepth(); // startDepth(); <-- V1
  // Start all data
  kinect2.initDevice(); // start(); <-- V1

  // Blank image
  depthImg = new PImage(kinect2.depthWidth, kinect2.depthHeight);
}

ps thanks for porting the V2 kinect into processing -- this is pretty awesome

johnbcarpenter avatar May 15 '19 15:05 johnbcarpenter