Creative Gesture Camera in Processing
        Posted  
        
            by 
                user2892963
            
        on Stack Overflow
        
        See other posts from Stack Overflow
        
            or by user2892963
        
        
        
        Published on 2013-10-18T03:49:57Z
        Indexed on 
            2013/10/18
            3:53 UTC
        
        
        Read the original article
        Hit count: 222
        
processing
|perceptual-sdk
I'm trying to use the creative gesture camera in Processing. I started with the Intel Perceptual Computing SDK, and ran into an issue.
I want to get the hand openness, and I am running into some issues - no matter what, the hand.openness returns 0. It otherwise runs quite well...
Some Sample code I'm trying to get to work: If you open your hand it starts printing to the console, close it and it stops.
import intel.pcsdk.*;
PXCUPipeline session;
PXCMGesture.GeoNode hand = new PXCMGesture.GeoNode();
void setup()
{
  session = new PXCUPipeline(this);
  if(!session.Init(PXCUPipeline.GESTURE))
    exit();
}
void draw()
{
  background(0);
  if(session.AcquireFrame(false))
  {
    if(session.QueryGeoNode(PXCMGesture.GeoNode.LABEL_BODY_HAND_PRIMARY|PXCMGesture.GeoNode.LABEL_OPEN, hand)) //Only when primary hand is open
    {
      rect(0, 0, 10, 10);
      println(hand.openness + " : " + frameCount); //Openness should be from 0 to 100
    }
    session.ReleaseFrame();
  }
}
Using the current version of Processing (2.0.3), Perceptual Computing SDK Version 7383.
© Stack Overflow or respective owner