I'm working on a game for Android that uses gestures as input. I've got a working demo, but the gesture recognition seems a bit too liberal (e.g. there are many false positives), and as I'm considering a gesture library of 30 or so, this will be more of a problem as I add in new gestures.
The official documentation is here:
http://developer.android.com/resources/articles/gestures.html
It says:
In this example, the first prediction is taken into account only if it's score is greater than 1.0. The threshold you use is entirely up to you but know that scores lower than 1.0 are typically poor matches.
Okay, that's great, but what is the range of values for prediction.score? Neither this page nor the javadocs appears to provide a range of values. Does anyone here know? I will have to tweak the values anyway, but it would be nice to have some baseline for my guesses, and this seems like a weird oversight of the documentation.
There is no upper limit to the range of prediction.score. A good way to match a gesture is usually to sort the predictions by decreasing score, and if the first gesture has a score > 1, you have a good match.
I ran into a similar challenge recently and wrote up my experience and conclusions in this question. For me, it boiled down to experimenting with SEQUENCE_SENSITIVE and ORIENTATION_INVARIANT. Hope it helps.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With