To optimize fingerprint matching speed in SourceAFIS, you need to target how the library handles memory, image extraction, and parallel execution. While SourceAFIS is built for speed—matching roughly 16,000 fingerprints per second per core—poor architectural implementation can severely slow down system performance.
Here is the comprehensive strategy to maximize matching speed in SourceAFIS. 1. Architectural and Code Implementations
Separate Extraction from Matching: Never extract a template from a raw image during a 1:N matching loop. Extract templates once during registration, then save the output byte array.
Cache Serialized Templates: Store the serialized JSON template byte array (toByteArray()) in your database or in-memory cache. Deserializing a pre-built template is over 100x faster than extracting it from an image.
Reuse the FingerprintMatcher Object: The FingerprintMatcher constructor allocates heavy in-memory search structures. Instantiate it once per probe fingerprint using the index(probe) method, and reuse that same matcher instance to loop through all candidate templates.
Implement Parallel Multi-Threading: SourceAFIS’s match() method is completely thread-safe. Partition your template database into batches across a custom thread pool using parallel streams or asynchronous pipelines like Java’s CompletableFuture. 2. Pre-Filtering and Search Space Reduction
Pre-Filter by Metadata: Avoid running a full biometric scan against your entire database. Reduce your search space first using standard SQL or database indices on metadata filters like gender, age group, or hand/finger position.
Deploy Two-Stage Matching (Cascading): Implement a lightweight, fast, but less accurate indexing or feature-vector mechanism (like a quick minutiae count or ridge frequency check) to quickly discard 90% of obvious non-matches before feeding the remaining candidates into SourceAFIS. 3. Data and Image Quality Control sourceafis-net/SourceAFIS/FingerprintMatcher.cs at master
Leave a Reply