enableGesture(); error on Kinect SimpleOpenNI

1.5k views Asked by At

everyone. I'm have a problem and i don't no how to solve it. I try to make some tutorials with Hand click on Processing, and always happened the same error, the function enableGesture(); does not exist. What I can do? Can someone Help me? Thank You

2

There are 2 answers

0
Vaibhav On

i think this is because of the simpleopenni version you are using. try using

SimpleOpenNI context = new SimpleOpenNI(this); 
context.startGesture(SimpleOpenNI.GESTURE_CLICK);
//change constant for other gestures
0
Ethan.B On

whether it's

kinect.enableGesture();

or

context.enableGesture();

it doesn't matter it just depends on the variable your code chose in this line

SimpleOpenNI 'variable name here' = new SimpleOpenNI(this); 

The function enableGesture(); is out of date

All you have to do is change enableGesture(); to startGesture(SimpleOpenNI."gesture");

Where "gesture" can be either GESTURE_CLICK, GESTURE_HAND_RAISE or GESTURE_WAVE

And it is most likely that you will encounter other out of date functions such as:

enableHands(); which is now enableHand();

addGesture(String); which is now startGesture(SimpleOpenNI."gesture");

removeGesture(String); which is now endGesture(SimpleOpenNI."gesture");

startTrackingHands(PVector); which is now startTrackingHand(PVector);

Hope this Helps - E.B.