private static List <Minutiae> TransformMinutiaes(List <Minutiae> m, TranslationVotes o) { List <Minutiae> transformedMinutiae = new List <Minutiae>(); foreach (Minutiae minutiae in m) { transformedMinutiae.Add(new Minutiae(minutiae.X + o.DeltaX, minutiae.Y + o.DeltaY, minutiae.Angle + o.DeltaTheta, minutiae.Type)); } return(transformedMinutiae); }
private void IncrementVotes(int x, int y, double theta) { TranslationVotes translationVotes = Search(x, y, theta); if (translationVotes != null) { translationVotes.Votes++; } else { translation.Add(new TranslationVotes(x, y, theta)); } }
public void Check(int x, int y, double theta) { TranslationVotes translationVotes = Search(x, y, theta); if (translationVotes != null) { translationVotes.Votes++; //translationVotes.Votes++; CheckNeighberhood(x, y, theta); } else { translation.Add(new TranslationVotes(x, y, theta)); } }
public static bool IsIdentical(List <Minutiae> m1, List <Minutiae> m2, TranslationVotes optimalTransform) { int tolerance = Convert.ToInt32(Math.Round(m1.Count * percentTolerance)); int matchedMinutiaes = 0; List <Minutiae> transformed = TransformMinutiaes(m2, optimalTransform); foreach (Minutiae minutiae1 in m1) { foreach (Minutiae minutiae2 in m2) { if (Overlap(minutiae1, minutiae2) && minutiae2.IsMatching == false) { minutiae2.IsMatching = true; matchedMinutiaes++; break; } } } return(matchedMinutiaes >= tolerance); }
public TranslationVotes GetTranslationVotesByMaxVotes() { TranslationVotes translationVotes = translation.OrderByDescending(tv => tv.Votes).First(); return(translationVotes); }