public static float Match(List<List<Vector2f>> input, List<StrokeTemplate> template, out List<StrokeMatch> match)
 {
     match = null;
     if (input.Count != template.Count)
         return float.PositiveInfinity;
     KanjiMatcher matcher = new KanjiMatcher();
     matcher.Input = input.Select(stroke => stroke.ToList()).ToList();//Deep copy input
     matcher.Template = template;
     matcher.Resize();
     matcher.MatchStrokes();
     float cost = matcher.TotalCost();
     match = matcher.BestMatch;
     return cost;
 }
示例#2
0
        public static float Match(List <List <Vector2f> > input, List <StrokeTemplate> template, out List <StrokeMatch> match)
        {
            match = null;
            if (input.Count != template.Count)
            {
                return(float.PositiveInfinity);
            }
            KanjiMatcher matcher = new KanjiMatcher();

            matcher.Input    = input.Select(stroke => stroke.ToList()).ToList();         //Deep copy input
            matcher.Template = template;
            matcher.Resize();
            matcher.MatchStrokes();
            float cost = matcher.TotalCost();

            match = matcher.BestMatch;
            return(cost);
        }