private string IsThereMatch(string template, string query) { Tuple <bool, List <MinutiaPair> > verificationResult; using (var t = EncodeBase64.Base64ToImage(template)) using (var q = EncodeBase64.Base64ToImage(query)) { var isThereError = IsThereError(t, q); if (isThereError.Item1) { return(isThereError.Item2); } MatchingSDK matchingSdk = new MatchingSDK(); var qBmp = new Bitmap(q); var tBmp = new Bitmap(t); var queryMtiaList = matchingSdk.ExtractMinutaeFromPalmprint(qBmp); var templateMtiaList = matchingSdk.ExtractMinutaeFromPalmprint(tBmp); var queryMTripletsFeature = matchingSdk.BuildMtripletsFeature(queryMtiaList); var templateMTripletsFeature = matchingSdk.BuildMtripletsFeature(templateMtiaList); verificationResult = matchingSdk.VerifyPalmprints(queryMTripletsFeature, templateMTripletsFeature); qBmp.Dispose(); tBmp.Dispose(); } var result = CreateOutput(verificationResult); return(result); }
private void VerificarHuellaMil(string template) { //Tuple<double, List<MinutiaPair>> verificationResult; using (var t = EncodeBase64.Base64ToImage(template)) { MatchingSDK matchingSDK = new MatchingSDK(); var tBmp = new Bitmap(t); var queryImg = ImageLoader.LoadImage(@"C:\Users\Mario Prueba\Pictures\F0000001_Query.jpg"); var queryMtiaList = matchingSDK.ExtractMinutaeFromFingerprint(tBmp); var templateMtiaList = matchingSDK.ExtractMinutaeFromFingerprint(queryImg); var queryMTripletsFeature = matchingSDK.BuildMtripletsFeature(queryMtiaList); var templateMTripletsFeature = matchingSDK.BuildMtripletsFeature(templateMtiaList); var verificationResult = matchingSDK.MatchLantentPrint(queryMTripletsFeature, templateMTripletsFeature); Console.WriteLine("Showing the result in a console app"); Console.WriteLine($"Matching similarity: {verificationResult.Item1}\nMatching minutiae count: {verificationResult.Item2.Count}"); } //var result = CreateOutput(verificationResult); //return result; }