none
Kinect Interaction C++ SDK 1.8 RRS feed

  • Question

  • Hello I've been trying to recgonize hand gestures using the kinect interaction that SDK provides.

    I'm having trouble when initializing the interaction event (Or I am not sure how to initialize it)

    This is how I wait for the action:


    void Kinect::detection() { if ( WAIT_OBJECT_0 == WaitForSingleObject ( m_hNextInteractionEvent, 0 ) ) { ShowInteraction(); }

    }


    And here is how I initialize the Interaction:

     m_hNextInteractionEvent = CreateEventW ( NULL, TRUE, FALSE, NULL );
    hr = NuiCreateInteractionStream ( sensor, ( INuiInteractionClient * ) &m_nuiIClient, &m_nuiIStream );
    if ( FAILED ( hr ) )
    {
          cout << "Could not open Interation stream video" << endl;
          return hr;
    }
    hr = m_nuiIStream->Enable ( m_hNextInteractionEvent );
    if ( FAILED ( hr ) )
    {
          cout << "Could not open Interation stream video" << endl;
          return hr;
    }

    Here are all the variables I'm using

    INuiSensor* sensor;
        interactionClient m_nuiIClient;
        INuiInteractionStream *m_nuiIStream;
        HANDLE m_hNextInteractionEvent;
    

    Saturday, April 9, 2016 7:50 PM