It feels like there should be something out there, but I have been looking for a while, and I can't find one. I found a lot of research papers, and several articles and posts where the authors put together some techniques (Machine learning, Dynamic Time Warping, etc.) to achieve gesture recognition.
However, I haven't found a library that supports, for example, a set of predefined gestures, or that allows defining some new custom gestures. Something that you can readily add to your own app and play with it.
The closest I have found is the Gesture Recognition Toolkit http://www.nickgillian.com/wiki/pmwiki.php/GRT/GestureRecognitionToolkit, but development seems to have stopped for quite some time now.
Any pointers in the right direction (also a pointer to a better place to ask) is welcome!