{HELP!!!} Kinect enableGesture() not exist

edited October 2013 in Kinect

Hi all! I install kinect, drivers, and simle-openni, then i add simple-openni library to processing, but when i try to use any example with tracking hands i get error: "function enableGesture not exist". Please, help me((((

Answers

  • Buddy I think old forum was good at least some people were trying to answer some difficult questions ..but here only easy peasy get taken ...

    I have faced same problem with Kinect sdk v1.x and SimpleOpenNI 1.96 .. here I found something in my thread

    plus Take a look here google code

  • edited October 2013

    SimpleopenNI 2.0 in google docs a example have given see if it is helpful for you....

    but I can help you this much ...here is the latest code for gesture enabling size(1024,768,OPENGL);

                //context = new SimpleOpenNI(this);
                context = new SimpleOpenNI(this);
                if(context.isInit() == false)
                {
                   println("Can't init SimpleOpenNI, maybe the camera is not connected!"); 
                   exit();
                   return;  
                }
    
                // disable mirror
                context.setMirror(false);
    
                // enable depthMap generation 
                context.enableDepth();
    
                // enable hands + gesture generation
                context.enableHand();
                context.startGesture(SimpleOpenNI.GESTURE_WAVE);
    
                // set how smooth the hand capturing should be
                //context.setSmoothingHands(.5);
    
                stroke(255,255,255);
                smooth(); 
    
  • edited November 2013

    i got a same problem. The function enableGesture() and enableHand() don't exist. here is my code:

        import SimpleOpenNI.*;
        import processing.serial.*;
        SimpleOpenNI kinect;
        Serial myPort;
    
        PVector handVec = new PVector();
        PVector mapHandVec = new PVector();
        color handPointCol = color(255,0,0);
    
        void setup() {
        kinect = new SimpleOpenNI(this);
        // enable mirror
        kinect.setMirror(true);
        // enable depthMap generation, hands and gestures
        kinect.enableDepth();
        kinect.enableGesture();
        kinect.enableHands();
        // add focus gesture to initialise tracking
        kinect.addGesture("Wave");
        size(kinect.depthWidth(),kinect.depthHeight());
        String portName = Serial.list()[0]; // This gets the first port on your computer.
        myPort = new Serial(this, portName, 9600);
        }
    
        void onRecognizeGesture(String strGesture, PVector idPosition, PVector endPosition)
        {
        kinect.removeGesture(strGesture);
        kinect.startTrackingHands(endPosition);
        }
    
        void onCreateHands(int handId, PVector pos, float time)
        {
        handVec = pos;
        handPointCol = color(0, 255, 0);
        }
    
        void draw() {
        kinect.update();
        kinect.convertRealWorldToProjective(handVec,mapHandVec);
    
        image(kinect.depthImage(), 0, 0);
        strokeWeight(10);
        stroke(handPointCol);
        point(mapHandVec.x, mapHandVec.y);
    
        // Send a marker to indicate the beginning of the communication
        myPort.write('S');
        // Send the value of the mouse's x-position
        myPort.write(int(255*mapHandVec.x/width));
        // Send the value of the mouse's y-position
        myPort.write(int(255*mapHandVec.y/height));
        }
    

    Thanks for your attention

  • Please format code using Ctrl +k and in the first post I have posted a link of my old thread try reading that .

  • edited November 2013

    Thanks for your suggestion. Could you help me (The function enableGesture() and enableHand() don't exist) ?

  • I found the same errors trying to follow the "Arduino and kinect projects" book I bought, turns out the version of Simple-openNI was too new, when you run the code it says the version in the console I was using 1.96, which I got the error messages, but the book says to use version 0.27, which those functions do work on.

  • edited December 2013

    1 got replied message from arduino-and-kinect-projects@googlegroups.com. Here's the message.

    Hi all,

    We've been having many comments about Simple-OpenNI and Processing being updated and not working with the examples in the book.

    To properly work with the examples, please download SimpleOpenNI version 0.27 and Processing 1.5.1 from the following links:

    I have followed this sugestion, but I got a new error on this program.

    Here's the capture:

    Kinect Controlled LED

    could you help me ?

  • Processing + kinect is a mess right now. Super frustrating.

  • I'm looking for a hand tracking module that works with current versions of simpleopenni and processing. This finger tracking module is the closest thing that works well.

  • Hi faiz_djufri,

    Again try out the library example by write the code by yourself , and not by copy paste...

    Actually , I got the same problem, but library examples worked well and openProcessing sketches gave me the same error as you got, that's y I have tried this way & it works fine.

    Although , there are methods exists in the older version , but they are not work very well , you need to have new version of the library and check its example... m sure it will work out...

Sign In or Register to comment.