arypbatista / godot-swipe-detector

Detect gestures and swipes in your game
MIT License
124 stars 15 forks source link

Gesture recognition - multiple drawings per pattern to teach it and other questions #16

Open blurymind opened 7 years ago

blurymind commented 7 years ago

Another similar plugin in javascript here: https://www.scirra.com/forum/plugin-unistroke-gesture-recognizer_t66773

is using this popular method: http://depts.washington.edu/madlab/proj/dollar/index.html (link contains implementation in javascript and C#), if you keep scrolling you will find implementations in python

It has the ability to recognize a pattern by scanning through multiple recorded gestures for each pattern. You can improve the detection by giving a pattern a number of draw examples

Looking at the syntax of your recognizer- you can give a pattern only a single example in yours :( .

My question is - is your pattern recognizer based on the same principle? If not - would it be possible to port it over from one the implementations in my link?

Also can you please add the ability to check more than one drawing example per pattern

blurymind commented 7 years ago

A downside to your method is that the gesture wont get recognised if the user hasnt spawned 8 swipe points - doing the swipe too short will result in it's shape not being recognized

blurymind commented 7 years ago

also see multistroke recogniser http://depts.washington.edu/madlab/proj/dollar/ndollar.html

or point cloud, which has python version http://depts.washington.edu/madlab/proj/dollar/pdollar.html https://github.com/sonovice/dollarpy

both are better, because they support more than one stroke

arypbatista commented 5 years ago

@blurymind the pattern recognition algorithm I have implemented is veeeeeeery simple, and it is based on strategies from the image recognition area.

It would be great to have someone to help me adding a more complex algorithm, more precise and flexible. Right now I don't have the time, didn't have the time a year+ ago when you posted!

Thanks for contributing!