# Gesture recognition

**URL:** <https://discourse.processing.org/t/gesture-recognition/8211>\
**Category:** Libraries\
**Created:** [February 8, 2019, 8:09am UTC](https://discourse.processing.org/t/gesture-recognition/8211 "2019-02-08T08:09:24Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![matheplica](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/matheplica/32/21035_2.png) [@matheplica](https://discourse.processing.org/u/matheplica)\
**Post date:** [February 8, 2019, 8:09am UTC](https://discourse.processing.org/t/gesture-recognition/8211/1 "2019-02-08T08:09:24Z")

</div>

Hi, there is way to recognize gesture ?  
I would like to know when the mouse make lines, infinite, circle (his speed and direction : clockwise or not), …  
There is a old library but doesn’t work with current processing.

---

<div class="post-metadata">

**Author:** ![jeremydouglass](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/jeremydouglass/32/20_2.png) [@jeremydouglass](https://discourse.processing.org/u/jeremydouglass)\
**Post date:** [February 10, 2019, 12:46am UTC](https://discourse.processing.org/t/gesture-recognition/8211/2 "2019-02-10T00:46:09Z")

</div>

Is your goal for this to work with Processing 3 (Java)?

Is your final goal the mouse, or are you hoping to later do gesture through webcam / Kinect / LeapMotion / etc.?

By “infinite” gesture do you mean: ∞ ?

By the old library,do you mean ezGestures? [http://www.silentlycrashing.net/ezgestures/](http://www.silentlycrashing.net/ezgestures/)

I’m not sure, honestly – one approach would be to use a standard Java gesture library and pass it mouse events. Another other would be to update the old ezGestures library – or just write your own by studying the code [https://github.com/prisonerjohn/ezjlibs/tree/master/dev/src/net/silentlycrashing/gestures](https://github.com/prisonerjohn/ezjlibs/tree/master/dev/src/net/silentlycrashing/gestures)

---

<div class="post-metadata">

**Author:** ![solub](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/solub/32/333_2.png) [@solub](https://discourse.processing.org/u/solub)\
**Post date:** [February 10, 2019, 2:19am UTC](https://discourse.processing.org/t/gesture-recognition/8211/3 "2019-02-10T02:19:48Z")

</div>

Hi @matheplica,

For gesture analysis you might be interested by [Wekinator](http://www.wekinator.org). I don’t know if it works with the mouse input but it is probably worth trying.

> [@How do i make my webcam detect a pose I make?](https://discourse.processing.org/t/how-do-i-make-my-webcam-detect-a-pose-i-make/990/2):
>
> Hi @WindJammer, Just brainstorming here but have you considered using [Wekinator](http://www.wekinator.org/) for your project ? It’s a user-friendly and open-source software for creative applications (including gesture analysis) that uses machine learning. They have a [bunch of examples](http://www.wekinator.org/examples/#Processing_animation_audio) you can run within Processing. Basically all you would have to do is to train a classifier via your webcam input in order to recognize a specific pose or gesture ([demo](https://www.youtube.com/watch?v=NKyyBAKrQgE)). I haven’t used it yet so can’t say much but I think it could be appro…

EDIT: [Example code | Wekinator](http://www.wekinator.org/examples/#Processing_animation_screen-based_input)

[![](https://img.youtube.com/vi/J4viXTThDTE/maxresdefault.jpg "Dynamic time warping in Wekinator with mouse") ](https://www.youtube.com/watch?v=J4viXTThDTE)

---

<div class="post-metadata">

**Author:** ![jeremydouglass](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/jeremydouglass/32/20_2.png) [@jeremydouglass](https://discourse.processing.org/u/jeremydouglass)\
**Post date:** [February 10, 2019, 5:06pm UTC](https://discourse.processing.org/t/gesture-recognition/8211/4 "2019-02-10T17:06:17Z")

</div>

Great solution. It looks like, for Wekinator, DTW\_Mouse\_Explorer is a 2D mouse gesture system that already has a pre-made recording app for training, and then for recovering the trained data from Wekinator.

[http://www.wekinator.org/examples/](http://www.wekinator.org/examples/)

---

<div class="post-metadata">

**Author:** ![matheplica](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/matheplica/32/21035_2.png) [@matheplica](https://discourse.processing.org/u/matheplica)\
**Post date:** [February 12, 2019, 12:35pm UTC](https://discourse.processing.org/t/gesture-recognition/8211/5 "2019-02-12T12:35:22Z")

</div>

Thanks, actually I have already try wekinator but I’m working with Sonic-Pi and P5  
with ps3eye on raspberry and with wekinator it’s a little bit cpu demanding.  
I look to source but it’s a very big project. I will try the source of ezGesture.  
Thanks for the tips.

---

<div class="post-metadata">

**Author:** ![matheplica](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/matheplica/32/21035_2.png) [@matheplica](https://discourse.processing.org/u/matheplica)\
**Post date:** [February 12, 2019, 12:51pm UTC](https://discourse.processing.org/t/gesture-recognition/8211/6 "2019-02-12T12:51:28Z")

</div>

Ok, I was to optimistic the source is also wide and complicated.  
There is a way to make it compatible with current Processing version ?
