for Java and .NET

SourceAFIS is an algorithm recognizing human fingerprints. It can compare two fingerprints 1:1 or search large database 1:N for matching fingerprint. It takes fingerprint images on input and produces similarity score on output. Similarity score is then compared to customizable match threshold.

SourceAFIS algorithm has two nearly identical opensource implementations in pure Java and pure .NET. SourceAFIS API is designed for maximum simplicity and ease of use by application developers. Accuracy and speed of matching support small applications handling up to 10,000 fingerprints.


SourceAFIS algorithm is the result of independent algorithm design. It doesn't just copy some textbook algorithm. It does however borrow heavily from other opensource fingerprint matchers. It delivers decent accuracy and suprisingly high matching speed.

SourceAFIS, being opensource, provides a very rare feature of algorithm transparency that exposes intermediary data structures computed by the algorithm during fingerprint matching, which opens door to interesting applications that were previously impossible with commercial matchers.

Opensource implementation of the algorithm combined with permissive license can be exploited for development of interesting custom modifications to the algorithm by anyone with some time to spare. Changes to the algorithm can be also implemented by the author of SourceAFIS as an affordable custom development project.


SourceAFIS for Java is a complete implementation of SourceAFIS algorithm in pure Java. It is the reference implementation, from which other language ports are derived.

Tutorial: SourceAFIS for Java

byte[] probeImage = Files.readAllBytes(Paths.get("probe.jpeg"));
byte[] candidateImage = Files.readAllBytes(Paths.get("candidate.jpeg"));
FingerprintTemplate probe = new FingerprintTemplate()
FingerprintTemplate candidate = new FingerprintTemplate()
double score = new FingerprintMatcher()
boolean matches = score >= 40;


While SourceAFIS 3.x for .NET is in development, it is not yet ready for everyday use. There is however an older SourceAFIS 1.7 for .NET.

More: SourceAFIS for .NET

Sample fingerprints

If you would like to test SourceAFIS, but you don't have any fingerprint reader nor fingerprint images at hand, you can download sample fingerprints from several sources:


SourceAFIS was initially developed as a toy project where ideas could come to life. Over time, the motivation shifted to non-profit mindset, because biometrics, used properly, is a common good.

Fingerprints and biometrics in general are a hopeful alternative to passwords. Computers shouldn't just blindly trust whoever gains access to the password nor should they reject people just because they are being human and forget things. Computers should just know who is their owner and resist all attempts at impersonation. We are not there yet, but fingerprints are a part of the solution and opensource library like SourceAFIS increases adoption and removes objections.

Fingerprint matching libraries, like all security software, should be opensource and transparent in every way. Security software needs to be free of market pressure in order to keep focus on quality. It should be open about its nature and effectiveness, not covered by layers of marketing sweet talk.

And finally, fingerprint recognition technology is used today for many noble causes, for example to enable fair elections in countries without universal ID cards, to distribute aid reliably and fairly in the poorest parts of the world, or just to lower crime and fraud rates wherever it is deployed.


SourceAFIS was written by Robert Važan and contributors. If you would like to change something, you can report an issue (Java) or submit a pull request via Bitbucket (Java) or GitHub (Java). Usage and general questions can be raised on the forum. You can reach the author via email .