[Plugin] : Unistroke Gesture Recognizer

Forum Home Forum Home > Construct 2 Development > Plugins for Construct 2
 Post Reply Post Reply Page  <1234 6>
Author
5,315 Rep
Post Options Post Options   Quote Pode Quote  Post ReplyReply Direct Link To This Post Posted: 02 Feb 2012 at 9:51am
@newt : I saw on IRC you proposed an idea to compare old/new points, but I'm not sure where you want to add that.
If it's an idea to simplify new gestures before adding them to the library, it's not necessary. You can use a bunch of points (even if some of them are overlapping), the lib is doing itself the cleaning (it's a kind of Procruste analysis to simplify the input gesture to compare it against the reference).
Some screenshots from the paper :
1: you can see there's some variability in the input gesture

2: so the gesture is resampled internally to a predefined number of equidistant points

3: the gesture is rotated, always in the same direction, to make it
rotation independent

4: finally some error rate regarding recognition, depending on the number of availble samples to compare against (you see there that 3 is the minimum efficient number) - Rubine is another algorithm from the field, and DTW is Dynamic Time Warping, more powerful, but way more ressources hungry (too much for a quick Javascript, at least)
Back to Top
16,787 Rep
Post Options Post Options   Quote newt Quote  Post ReplyReply Direct Link To This Post Posted: 02 Feb 2012 at 4:12pm
Well the question is, if you can avoid introducing duplicate points, would it make any difference?
Also, just to clarify, when adding variants, should you clear the existing points, when adding a new variant?

Edited by newt - 02 Feb 2012 at 4:12pm
Back to Top
5,315 Rep
Post Options Post Options   Quote Pode Quote  Post ReplyReply Direct Link To This Post Posted: 02 Feb 2012 at 4:38pm
If you can avoid inputting duplicate point, it's going to speed the cleaning of the shape byt the lib (but I don't how much milliseconds are gained, really).
When you add a new variant, you don't need to clear, because clear empty the list from all user input. I need to add that on the original post.
Back to Top
5,315 Rep
Post Options Post Options   Quote Pode Quote  Post ReplyReply Direct Link To This Post Posted: 07 Feb 2012 at 4:50pm
New build ! http://dl.dropbox.com/u/1412774/oneStrokeGestureRecognizerC2Plugin/pode_1StrokeGestureRecognizer0.2.zip
You can now access the Centroid, the Bound Box and the Angle of the last gesture ! (it helps to create little demo like "Crayon Physics Deluxe ;) : http://dl.dropbox.com/u/1412774/oneStrokeGestureRecognizerC2Plugin/c2physicsDeluxe.capx

You can also delete all the gesture given at the start of the library, and something specially for newt : 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
Back to Top
16,787 Rep
Post Options Post Options   Quote newt Quote  Post ReplyReply Direct Link To This Post Posted: 07 Feb 2012 at 7:41pm
Cool.
Really nice plug here Pode. Thanks.
Back to Top
5,315 Rep
Post Options Post Options   Quote Pode Quote  Post ReplyReply Direct Link To This Post Posted: 07 Feb 2012 at 10:23pm
@newt : I'm glad there's a least somebody who likes it (a bit) ! ;)
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
Back to Top
16,787 Rep
Post Options Post Options   Quote newt Quote  Post ReplyReply Direct Link To This Post Posted: 07 Feb 2012 at 10:47pm
Um somethings not working correctly. There's extra files in the zip, and the updated demo isn't working either.
Back to Top
8,793 Rep
Post Options Post Options   Quote delgado Quote  Post ReplyReply Direct Link To This Post Posted: 08 Feb 2012 at 6:55am
Where i can use this things?
Back to Top
5,315 Rep
Post Options Post Options   Quote Pode Quote  Post ReplyReply Direct Link To This Post Posted: 08 Feb 2012 at 7:49am
ànewt : argh ! Sorry, I mixed up two folders. It should be okay now. If there's still something, don't hesitate to say so ! ;)
Back to Top
5,315 Rep
Post Options Post Options   Quote Pode Quote  Post ReplyReply Direct Link To This Post Posted: 08 Feb 2012 at 2:35pm
Ok, I recognize it now, it's my 6 months old daughter who made the release this morning... As you can see, there's stil way to go before being a true programmer ;).
Here's the new release, everything should work, I promise : 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
Back to Top
 Post Reply Post Reply Page  <1234 6>

Forum Jump Forum Permissions View Drop Down