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; }
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); }