Exemplo n.º 1
0
 public void BuildIndex(Template probe, ProbeIndex index)
 {
     index.Template = probe;
     index.Edges = ParameterSet.ClonePrototype(EdgeTablePrototype);
     index.Edges.Reset(probe);
     index.EdgeHash = new EdgeHash(probe, EdgeLookup);
 }
Exemplo n.º 2
0
 public IEnumerable <MinutiaPair> GetRoots(ProbeIndex probeIndex, Template candidateTemplate)
 {
     LookupCounter = 0;
     HashLookup.Reset(probeIndex.EdgeHash);
     return(GetFilteredRoots(probeIndex, candidateTemplate, shape => shape.Length >= MinEdgeLength)
            .Concat(GetFilteredRoots(probeIndex, candidateTemplate, shape => shape.Length < MinEdgeLength)));
 }
Exemplo n.º 3
0
 public IEnumerable<MinutiaPair> GetRoots(ProbeIndex probeIndex, Template candidateTemplate)
 {
     LookupCounter = 0;
     HashLookup.Reset(probeIndex.EdgeHash);
     return GetFilteredRoots(probeIndex, candidateTemplate, shape => shape.Length >= MinEdgeLength)
         .Concat(GetFilteredRoots(probeIndex, candidateTemplate, shape => shape.Length < MinEdgeLength));
 }
Exemplo n.º 4
0
 public IEnumerable<MinutiaPair> GetFilteredRoots(ProbeIndex probeIndex, Template candidateTemplate, Predicate<EdgeShape> shapeFilter)
 {
     if (LookupCounter >= MaxEdgeLookups)
         yield break;
     var edgeConstructor = new EdgeConstructor();
     for (int step = 1; step < candidateTemplate.Minutiae.Length; ++step)
         for (int pass = 0; pass < step + 1; ++pass)
             for (int candidateReference = pass; candidateReference < candidateTemplate.Minutiae.Length; candidateReference += step + 1)
             {
                 int candidateNeighbor = (candidateReference + step) % candidateTemplate.Minutiae.Length;
                 var candidateEdge = edgeConstructor.Construct(candidateTemplate, candidateReference, candidateNeighbor);
                 if (shapeFilter(candidateEdge))
                 {
                     for (var match = HashLookup.Select(candidateEdge); match != null; match = HashLookup.Next())
                     {
                         var pair = new MinutiaPair(match.Location.Reference, candidateReference);
                         if (Logger.IsActive)
                             Logger.Log(pair);
                         yield return pair;
                         ++LookupCounter;
                         if (LookupCounter >= MaxEdgeLookups)
                             yield break;
                     }
                 }
             }
 }
Exemplo n.º 5
0
 public void BuildIndex(Template probe, ProbeIndex index)
 {
     index.Template = probe;
     index.Edges    = ParameterSet.ClonePrototype(EdgeTablePrototype);
     index.Edges.Reset(probe);
     index.EdgeHash = new EdgeHash(probe, EdgeLookup);
 }
Exemplo n.º 6
0
        public IEnumerable <MinutiaPair> GetFilteredRoots(ProbeIndex probeIndex, Template candidateTemplate, Predicate <EdgeShape> shapeFilter)
        {
            if (LookupCounter >= MaxEdgeLookups)
            {
                yield break;
            }
            var edgeConstructor = new EdgeConstructor();

            for (int step = 1; step < candidateTemplate.Minutiae.Length; ++step)
            {
                for (int pass = 0; pass < step + 1; ++pass)
                {
                    for (int candidateReference = pass; candidateReference < candidateTemplate.Minutiae.Length; candidateReference += step + 1)
                    {
                        int candidateNeighbor = (candidateReference + step) % candidateTemplate.Minutiae.Length;
                        var candidateEdge     = edgeConstructor.Construct(candidateTemplate, candidateReference, candidateNeighbor);
                        if (shapeFilter(candidateEdge))
                        {
                            for (var match = HashLookup.Select(candidateEdge); match != null; match = HashLookup.Next())
                            {
                                var pair = new MinutiaPair(match.Location.Reference, candidateReference);
                                if (Logger.IsActive)
                                {
                                    Logger.Log(pair);
                                }
                                yield return(pair);

                                ++LookupCounter;
                                if (LookupCounter >= MaxEdgeLookups)
                                {
                                    yield break;
                                }
                            }
                        }
                    }
                }
            }
        }
Exemplo n.º 7
0
 public void SelectProbe(ProbeIndex probe)
 {
     Probe = probe;
     Pairing.SelectProbe(probe.Template);
     CandidateEdges = ParameterSet.ClonePrototype(EdgeTablePrototype);
 }
Exemplo n.º 8
0
 public void SelectProbe(ProbeIndex probe)
 {
     Probe = probe;
     Pairing.SelectProbe(probe.Template);
     CandidateEdges = ParameterSet.ClonePrototype(EdgeTablePrototype);
 }