Page 1 of 1

Lua-gestures: effortless recognition of trained single-stroke gestures

Posted: Wed May 05, 2021 9:22 pm
by josip
Hi there. I published this project today:

https://github.com/jmiskovic/lua-gestures

It is a library for training and recognizing single-stroke gestures, based on very efficient "$1 Unistroke Recognizer" algorithm. The library comes with basic set of gestures, and you can dynamically add your own ones.

Image

This could come handy for those games where you conjure magic by drawing runes, or for mobile-based text entry, or for quick mouse/touch shortcuts inside any design tool.

I'm not author of original algorithm or of Lua port. I merely fixed some bugs, adapted the API to fit better with Love and made the simple demo. I hope somebody finds a use for it.

Re: Lua-gestures: effortless recognition of trained single-stroke gestures

Posted: Thu May 06, 2021 6:50 am
by darkfrei
I like it! Can you attach a .love file?

Re: Lua-gestures: effortless recognition of trained single-stroke gestures

Posted: Thu May 06, 2021 6:53 am
by Gunroar:Cannon()
Nice, this seems really useful!

Re: Lua-gestures: effortless recognition of trained single-stroke gestures

Posted: Sun May 09, 2021 11:48 pm
by monolifed
link to the original code for reference:
https://depts.washington.edu/acelab/pro ... index.html

Re: Lua-gestures: effortless recognition of trained single-stroke gestures

Posted: Wed May 12, 2021 6:57 pm
by josip
I've made some more improvements over last days.

Recognizer can now use oriented gestures. This makes it possible to distinguish between larger number of trained gestures, for example '7' and 'L' will be correctly identified.

Another option added to recognizer is ability to work with very thin gestures like 'I' and '-'.

LOVE demo app has now grown into a basic gesture studio. It can browse defined gestures, add new ones and export the collection to console.

The library documentation is improved.

Image

Re: Lua-gestures: effortless recognition of trained single-stroke gestures

Posted: Thu May 13, 2021 1:22 am
by ReFreezed
Nice! I'm having visions of new game projects.

Re: Lua-gestures: effortless recognition of trained single-stroke gestures

Posted: Thu May 13, 2021 2:09 am
by togFox
I can see this being a lot of fun with tablets and mobile devices.

Re: Lua-gestures: effortless recognition of trained single-stroke gestures

Posted: Fri May 14, 2021 11:31 am
by monolifed
* made it use flat arrays for points
* moved functions around (a lot)
* tried to reduce the creation of new (temp) tables
* noticed a typo in recognize score before return ("/" instead of "-")
* probably some other minor optimizations

https://github.com/monolifed/lua-module ... stures.lua