Edward Ly 27 October 2016 CS 488 Senior Capstone Project Design for the initial stages of the driver program Design is based on the template for using the XKin library found at https://github.com/fpeder/XKin/blob/master/doc/presentation/pabl-12-acmmm.pdf and on the source code for the demo program "demogesture" found at https://github.com/fpeder/XKin/blob/master/demo/demogesture.c (some important functions to call are in parentheses) /////////////////////////////////////////////////// open .yml file, read list of gestures to recognize initialize OpenCV GUI note: the OpenCV API allows for a callback function to redraw the window & provides support for OpenGL drawing functions if necessary initialize PortAudio - for initial audio output testing main loop: while (true) { get RGB and depth image through freenect (freenect_sync_get_rgb_cv, freenect_sync_get_depth_cv) isolate body from image (body_detection) isolate hand from body (hand_detection) get current hand position (get_hand_contour_basic) update and draw current position in window get current gesture, if any (cvhmm_get_gesture_sequence) else restart loop, try again with new image recognize current gesture and get gesture id, if any (cvhmm_classify_gesture) switch(gesture id) { case(gesture 0): // some action example: play 220 Hz sawtooth wave break; case(gesture 1): // some action example: play 440 Hz sawtooth wave break; . . . etc. // default: // no gesture, so do nothing } if window is closed or "quit" key is pressed break out of loop - proceed to close program } stop freenect (freenect_sync_stop) free memory wherever necessary (cvDestroyAllWindows, etc.) exit