I’ve had a few inquiries about the score that’s passed to the glyph detection delegate via
-(void)glyphDetected:(WTMGlyph *)glyph withScore:(float)score
in the MultistrokeGestureRecognizer iOS library.
Here are a few key points about the score and the recognizer in general:
detectGlyphwill always return a match!
- The match returned has a score (float) associated with it
- The higher the score, the better
- There’s no absolute scale as to what determines a “good” match
As an example, if your only template glyph is a circle and the user draws a squiggly line, a call to
detectGlyph will still return a match to your only template. The score will most likely be very low since the two gestures don’t resemble each other. Ultimately, it’s up to you and your application to determine what is a good match and whether to accept the input as a match or not.
Behind the scenes, the N Dollar Recognizer is assigning a score to every template, but only the highest score is returned to the delegate.
So, there’s no magical threshold in the score that determines a match. You’ll have to seed your templates and then do some testing, and your particular implementation will have to define score thresholds.