void Matching(FingerprintTemplate probe, FingerprintTemplate candidate) { double score = new FingerprintMatcher(probe) .Match(candidate); Assert.Greater(score, 40); }
public void DecodeGray() { double score = new FingerprintMatcher(new FingerprintTemplate(ProbeGray())) .Match(new FingerprintTemplate(MatchingGray())); Assert.That(score, Is.GreaterThan(40)); }
void Nonmatching(FingerprintTemplate probe, FingerprintTemplate candidate) { double score = new FingerprintMatcher(probe) .Match(candidate); Assert.Less(score, 20); }
public AFIS360Webservice.webobj.Match GetMatch(string fingerName, string fingerprintBase64Str, string visitorId, Int32 threshold) { Image fingerprintImage = Converter.Base64ToImage(fingerprintBase64Str); Match match = FingerprintMatcher.getMatch(fingerName, fingerprintImage, "[Unknown]", 60); AFIS360Webservice.webobj.Match webMatch = null; if (match != null) { webMatch = new AFIS360Webservice.webobj.Match(); webMatch.MatchedPerson = match.getMatchedPerson(); webMatch.Probe = match.getprobe(); webMatch.Score = match.getScore(); webMatch.Status = match.getStatus(); } return(webMatch); }
public static double[][] Of(SampleDataset dataset) { return(PersistentCache.Get("scores", dataset.Path, () => { var fingerprints = dataset.Fingerprints; var templates = fingerprints.Select(fp => NativeTemplate.Of(fp)).ToList(); var scores = new double[fingerprints.Count][]; foreach (var probe in fingerprints) { var matcher = new FingerprintMatcher(templates[probe.Id]); scores[probe.Id] = new double[fingerprints.Count]; foreach (var candidate in fingerprints) { scores[probe.Id][candidate.Id] = matcher.Match(templates[candidate.Id]); } } return scores; })); }
public void TestMethod1() { var image = TestUtils.LoadImage(@"D:\ScarIntelFinal\ScarIntel\BD\filipe_dir_pol\filipe_dir_pol_1.bmp"); var image1 = TestUtils.LoadImage(@"D:\ScarIntelFinal\ScarIntel\BD\filipe_dir_pol\filipe_dir_pol_2.bmp"); var image2 = TestUtils.LoadImage(@"D:\ScarIntelFinal\ScarIntel\BD\filipe_dir_pol\filipe_dir_pol_3.bmp"); var imagedif = TestUtils.LoadImage(@"D:\ScarIntelFinal\ScarIntel\BD\nuno_dir_pol\nuno_dir_pol_1.bmp"); var fp = new FingerprintTemplate(image); var fp1 = new FingerprintTemplate(image1); var fp2 = new FingerprintTemplate(image2); var fpdif = new FingerprintTemplate(imagedif); FingerprintMatcher fm = new FingerprintMatcher(fp); double aux= fm.Match(fp); double aux1 = fm.Match(fp1); double aux2 = fm.Match(fp2); double aux3 = fm.Match(fpdif); Assert.AreEqual( aux , aux ); }
public void TestMethod1() { var image = TestUtils.LoadImage(@"D:\ScarIntelFinal\ScarIntel\BD\filipe_dir_pol\filipe_dir_pol_1.bmp"); var image1 = TestUtils.LoadImage(@"D:\ScarIntelFinal\ScarIntel\BD\filipe_dir_pol\filipe_dir_pol_2.bmp"); var image2 = TestUtils.LoadImage(@"D:\ScarIntelFinal\ScarIntel\BD\filipe_dir_pol\filipe_dir_pol_3.bmp"); var imagedif = TestUtils.LoadImage(@"D:\ScarIntelFinal\ScarIntel\BD\nuno_dir_pol\nuno_dir_pol_1.bmp"); var fp = new FingerprintTemplate(image); var fp1 = new FingerprintTemplate(image1); var fp2 = new FingerprintTemplate(image2); var fpdif = new FingerprintTemplate(imagedif); FingerprintMatcher fm = new FingerprintMatcher(fp); double aux = fm.Match(fp); double aux1 = fm.Match(fp1); double aux2 = fm.Match(fp2); double aux3 = fm.Match(fpdif); Assert.AreEqual(aux, aux); }