コード例 #1
0
        void Matching(FingerprintTemplate probe, FingerprintTemplate candidate)
        {
            double score = new FingerprintMatcher(probe)
                           .Match(candidate);

            Assert.Greater(score, 40);
        }
コード例 #2
0
        public void DecodeGray()
        {
            double score = new FingerprintMatcher(new FingerprintTemplate(ProbeGray()))
                           .Match(new FingerprintTemplate(MatchingGray()));

            Assert.That(score, Is.GreaterThan(40));
        }
コード例 #3
0
        void Nonmatching(FingerprintTemplate probe, FingerprintTemplate candidate)
        {
            double score = new FingerprintMatcher(probe)
                           .Match(candidate);

            Assert.Less(score, 20);
        }
コード例 #4
0
        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);
        }
コード例 #5
0
 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;
     }));
 }
コード例 #6
0
ファイル: UnitTest1.cs プロジェクト: ProjectoFinal/PS
        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 );
        }
コード例 #7
0
        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);
        }