Repository navigation
v2.0
A rewrite seven years on: a proper Python package, and a matching algorithm that actually tells fingers apart.
New matching algorithm
1.x scored a pair by the mean Hamming distance of ORB matches on Harris corners. That ignored where the matches were, and it accepted two of the four different-finger sample pairs. 2.0 matches on minutiae:
- Minutiae: ridge endings and bifurcations are found on the thinned ridge map; artefacts at the edge of the print or crowded together are dropped.
- Alignment: ORB descriptors at each minutia, rotated to the ridge direction, propose matches. The rotation, shift and scale most of them agree on aligns the prints. Every candidate is tried, so results are deterministic.
- Score: the number of minutiae that coincide in position and ridge direction after alignment. 12 or more is a match.
| 1.x | 2.0 | |
|---|---|---|
| Same finger (sample pairs) | match | 25 and 40 paired minutiae |
| Different fingers | 2 of 4 wrongly matched | all 4 score ≤ 3 |
| Rotated print | fails beyond ~30° | matches at any angle |
| Time per pair | ~4 s | ~0.4 s |
Everything else
- Installable package (
pip install git+https://github.com/kjanko/python-fingerprint-recognition@v2.0.0) with a Python API:compare(),extract_features(),match_features(),enhance(),extract_minutiae() fingerprint-recognitioncommand with--json,--save,--thresholdand--show; exit code 0 on a match, 1 otherwise, 2 for unreadable images- Works on current NumPy, SciPy and OpenCV, on Python 3.10–3.14
- Gabor enhancement vectorised
- Tests and CI on Linux, macOS and Windows; ruff and strict mypy
- Dockerfile updated to Python 3.13
Breaking changes
app.pyandrun.share gone; use thefingerprint-recognitioncommand. Images no longer have to live indatabase/.- The score is now a count of paired minutiae (higher is more similar), and the default threshold is 12 instead of a mean distance below 33.
- matplotlib is optional; it's only needed for
--show.
The default threshold has only been checked on the bundled sample images. Measure it on your own data before relying on it.
