[Plugin] : Unistroke Gesture Recognizer

Post your completed addons to share with the community

Post » Tue Jan 31, 2012 5:26 pm

Edit : Update 08 - february - 2012
New build !http://dl.dropbox.com/u/1412774/oneStrokeGestureRecognizerC2Plugin/pode_1StrokeGestureRecognizer.0.3.zip
Demo : http://dl.dropbox.com/u/1412774/oneStrokeGestureRecognizerC2Plugin/index.html
To appologize, there's a new functionnality : remove a specific gesture, by name

Edit : Update 07 - february - 2012
New build ! http://dl.dropbox.com/u/1412774/oneStrokeGestureRecognizerC2Plugin/pode_1StrokeGestureRecognizer0.2.zip
- Centroid, Bounding Box, Angle
- delete all gesture from the lib (even those given at the start)
- add a custom list of points ! (provided as "X1,Y1|X2,Y2|...|XnYn)

The demo is updated, by the way : http://dl.dropbox.com/u/1412774/oneStrokeGestureRecognizerC2Plugin/index.html

Edit2 : I also added a Custom Gesture Creator : http://dl.dropbox.com/u/1412774/CustomGestureCreator/index.html
http://dl.dropbox.com/u/1412774/CustomGestureCreator/GestureCreator.capx. It's easier for the creation of custom gesture's pointlists...

____________________

I remembered using a library to work with wiimote, helping to recognize gestures made with the gamepad.
That lib is there : http://depts.washington.edu/aimgroup/proj/dollar/
So I made a plugin for C2 today, that helps to recognize gestures made by the user, which uses that lib.
You can get that plugin there : http://dl.dropbox.com/u/1412774/oneStrokeGestureRecognizerC2Plugin/pode_1StrokeGestureRecognizer.zip
I also made a quick demo app, mimicking the one from the original link :


http://dl.dropbox.com/u/1412774/oneStrokeGestureRecognizerC2Plugin/index.html
And a demo capx : http://dl.dropbox.com/u/1412774/oneStrokeGestureRecognizerC2Plugin/oneStrokeGestureRecognizerC2PluginDemo.capx

One thing to know : in the original algorithm, the recognition works when there's more than 10 points defined for a gesture.

In a future rev., I'm going to add the possibility to give directly to the plugin a list of points (for example, if you already determined a predefined gesture), and the possibility to load that from a file.

When I have more time, I'm going to integrate the N strokes (multistrokes) Javascript lib from the same team...

Edit : it's up to you to set a level (score) under which the gesture isn't recognized, because the lib will try its best to recognize something anyway. I usually go for something between 75 (it let pass a few bad detection) to 90 (pretty strict detection).

Edit2 : In the original paper, to have a good recognition when you add new gestures, you need to add at least 3 variants of that gesture. So if you want to detect a new gesture, to forget to draw it 3 times and add it 3 times ! :)

Edit3 : the action "Clear Point List" empties any user defined gesture, not gesture pre-packaged with the lib !Pode2012-02-08 14:36:49
B
33
S
9
G
6
Posts: 709
Reputation: 6,704

Post » Tue Jan 31, 2012 5:32 pm

I am grinning like your avatar right now.
Image Image
B
161
S
48
G
91
Posts: 7,358
Reputation: 67,271

Post » Tue Jan 31, 2012 5:52 pm

Wow, Cannot think of a place of where i'll use this in my game, But none the less, Great Plugin!! will look nice in my list of 3rd party plugins
B
29
S
12
G
7
Posts: 740
Reputation: 7,849

Post » Tue Jan 31, 2012 5:57 pm

I just added two things to the original post I'm just remembering now...
B
33
S
9
G
6
Posts: 709
Reputation: 6,704

Post » Tue Jan 31, 2012 6:19 pm

Pode, that is a great plugin !
B
44
S
12
G
13
Posts: 628
Reputation: 10,471

Post » Wed Feb 01, 2012 2:02 am

I figured out how to parse a string and add it via events, only thing is, the default gestures cause a false positive sometimes. Is there any way to take the defaults out?newt2012-02-01 02:03:09
Image Image
B
161
S
48
G
91
Posts: 7,358
Reputation: 67,271

Post » Wed Feb 01, 2012 2:53 am

Very cool and powerful!rexrainbow2012-02-01 03:11:18
B
97
S
22
G
178
Posts: 4,122
Reputation: 104,051

Post » Wed Feb 01, 2012 10:02 am

excellent!!!!!!!!!
B
159
S
38
G
11
Posts: 229
Reputation: 17,361

Post » Wed Feb 01, 2012 1:22 pm

@newt : I'm not really sure what you mean by "the default gestures cause a false positive sometimes. Is there any way to take the defaults out?"
If, when you draw something that's not looking something you aleardy have in the library of gesture, the lib will try to match it anyway (but it will get a very bad score). So you can filter false positives with a high score. Is it helping you ?

@all : I didn't think about that in the beginning, but with that lib, you can do a "swipe gesture" detection on mobile ;).

I also edited the original post to add something : to have a good recognition when you add new gestures, you need to add at least 3 variants of that gesture.
B
33
S
9
G
6
Posts: 709
Reputation: 6,704

Post » Wed Feb 01, 2012 3:01 pm

Ahh, ok the variants, and checking the score should help.
That does make me wonder about adding gestures from externals. I guess you would have to make variants for that as well.
Image Image
B
161
S
48
G
91
Posts: 7,358
Reputation: 67,271

Next

Return to Completed Addons

Who is online

Users browsing this forum: No registered users and 1 guest