Skip to content

v2.0

Choose a tag to compare

@kjanko kjanko released this 25 Oct 21:29
· 3 commits to master since this release

A rewrite seven years on: a proper Python package, and a matching algorithm that actually tells fingers apart.

Two prints of the same finger, with the matches used to align them

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:

  1. Minutiae: ridge endings and bifurcations are found on the thinned ridge map; artefacts at the edge of the print or crowded together are dropped.
  2. 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.
  3. 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-recognition command with --json, --save, --threshold and --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.py and run.sh are gone; use the fingerprint-recognition command. Images no longer have to live in database/.
  • 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.