/// <summary> /// Найти характерные точки жеста /// </summary> /// <returns> Список характерных точек</returns> public List <Point> IdentifyChar() { if (points.Count == 0) { return(null); } var temp = new IdentifyCharacteristicsPoints(points, count); var newListPoints = temp.GetIdentifyCharacteristicsPoints(); points = newListPoints; return(newListPoints); }
public int WhatIsItWithIdealKey() { if (points.Count == 0) { return(-1); } double minDist = Int32.MaxValue; int index = -1; var temp = new IdentifyCharacteristicsPoints(points, count); var newListPoints = temp.GetIdentifyCharacteristicsPoints(); var keyIdealGesture = KeyGestureConstruction.GetKeyForGestureWithIdentifyPoints(newListPoints); for (int i = 0; i < PGC.IdealGestures.Count; i++) { var tempDist = Distance.LevenshteinDistance(PGC.IdealGestures[i].KeyIdeal, keyIdealGesture); if (minDist > tempDist) { index = i; minDist = tempDist; } } return(index); }