Пример #1
0
        public string GetGestureSetNameMatch(PointF[] Points)
        {
            // Update gesture analyzer with latest gestures and get gesture match from current points array
            // Comparison results are sorted descending from highest to lowest probability
            gestureAnalyzer.PointPatternSet = Gestures.ToArray();
            PointPatternMatchResult[] comparisonResults = gestureAnalyzer.GetPointPatternMatchResults(Points);

            // Exit if we didn't find a high probability match
            if (comparisonResults == null || comparisonResults.Where(ppmr => ppmr.Probability >= 75).Count() <= 0)
            {
                return(null);                           // No close enough match. Do nothing with drawn gesture
            }
            // Grab top result from gesture comparison
            return(comparisonResults.First().Name);
        }