예제 #1
0
// Define hand & gesture recognition callbacks
void XN_CALLBACK_TYPE Gesture_Recognized(
    xn::GestureGenerator& generator,
    const XnChar* strGesture,
    const XnPoint3D* pIDPosition,
    const XnPoint3D* pEndPosition,
    void* pCookie)
{
  gesture_generator.RemoveGesture(strGesture);
  hands_generator.StartTracking(*pEndPosition);
}
void XN_CALLBACK_TYPE 
Gesture_Recognized(xn::GestureGenerator& generator,
                   const XnChar* strGesture,
                   const XnPoint3D* pIDPosition,
                   const XnPoint3D* pEndPosition, void* pCookie)
{
    printf("Gesture recognized: %s\n", strGesture);
    //g_GestureGenerator.RemoveGesture(strGesture);
    g_HandsGenerator.StartTracking(*pEndPosition);
}
/* Start tracking the hand once a gesture is recognized */
void XN_CALLBACK_TYPE Gesture_Recognized(xn::GestureGenerator &generator,
                                         const XnChar *gesture,
                                         const XnPoint3D *startPosition,
                                         const XnPoint3D *endPosition,
                                         void *cookie) {
        printf("Gesture recognized: %s\n", gesture);

                // Only start tracking a hand if we're not already tracking one.
       if(!trackingMove || !trackingLook) {
		g_HandsGenerator.StartTracking(*endPosition);
	}
}
//gesture callbacks
void XN_CALLBACK_TYPE Gesture_Recognized(xn::GestureGenerator& generator, const XnChar* strGesture, const XnPoint3D* pIDPosition, const XnPoint3D* pEndPosition, void* pCookie) {
	printf("{\"gesture\":{\"type\":\"%s\"}, \"elapsed\":%.3f}}\n", strGesture, clockAsFloat(last));
	gestureGenerator.RemoveGesture(strGesture);
	handsGenerator.StartTracking(*pEndPosition);
}
예제 #5
0
void HandsGenerator_StartTracking_wrapped(xn::HandsGenerator& self, BP::list point) {
    check( self.StartTracking(convertToVec3D((boost::python::list) point)) );
}