A console/terminal demo of fingerprint matching, supporting Windows 11 and Ubuntu Linux 24.04. It is based on kjanko/python-fingerprint-recognition, with the Utkarsh-Deshmukh fingerprint-enhancement library vendored in src/enhance. Each image goes through CLAHE, ridge enhancement, Otsu binarization, skeletonization, Harris-corner keypoints and ORB descriptors; the two images are then matched with a brute-force Hamming matcher, and a mean match distance below the threshold counts as the same finger. Four example fingerprints ship under data/, and the results are saved to model/fingerprint/. No GPU is involved.
[Folder Structure]
- CLAUDE.md / AGENT.md: program specification (identical content).
- CHANGELOG.md: change log.
- copyright.txt: copyright notice.
- data/: 101_1.tif and 101_2.tif (finger 101), plus 102_1.tif and 102_2.tif (finger 102).
- model/fingerprint/: the results, fingerprint.png (the keypoints of both images side by side) and matching.png (the drawn matches); the default pair's examples are included.
- src/enhance/: the vendored ridge-enhancement engine.
- tool/tools.py: shared helpers.
- src/: the demo, launcher scripts and this document.
- venv/: Python virtual environment, created by step 01.
[Prerequisites]
- Operating system: Windows 11 or Ubuntu Linux 24.04.
- Python 3 and pip.
- No GPU required; an ordinary CPU is enough.
[Instructions]
Step 1: Create the virtual environment
Delete the old venv/, create a fresh one and install the packages listed in src/requirements.txt (numpy, opencv-python, scikit-image, scipy, matplotlib). The script aborts loudly if pip fails.
Windows: src\01_venv_create.bat
Linux: bash src/01_venv_create.sh
Step 2: Activate the virtual environment
Activate the venv. On Linux, source the script.
Windows: src\02_venv_activate.bat
Linux: source src/02_venv_activate.sh
Step 3: Run the fingerprint matching demo
Run the demo, which by default matches data/101_1.tif against data/101_2.tif (the same finger). Any extra arguments are forwarded to the program.
Windows: src\03_fingerprint_matching.bat
Linux: bash src/03_fingerprint_matching.sh
Other pairs, for example the two images of finger 102 (the same finger), or two different fingers:
bash src/03_fingerprint_matching.sh --image1 data/102_1.tif --image2 data/102_2.tif
bash src/03_fingerprint_matching.sh --image1 data/101_1.tif --image2 data/102_1.tif
Step 4: Remove the virtual environment
Delete the venv/ folder.
Windows: src\99_venv_clear.bat
Linux: bash src/99_venv_clear.sh
[Python Entry Point]
- src/fingerprint_matching.py: [--image1 IMG] [--image2 IMG] [--score-threshold 33] [--output-dir DIR] [--show]. Defaults to data/101_1.tif versus data/101_2.tif (the same finger). It prints the keypoint counts, the match count, the mean match distance and the verdict, and saves fingerprint.png and matching.png to model/fingerprint/. It runs headless by default; --show opens the plots when a display is available.
[References]
- Fingerprint recognition (the source of this demo): https://github.com/kjanko/python-fingerprint-recognition
- Fingerprint enhancement library (vendored in src/enhance): https://github.com/Utkarsh-Deshmukh/Fingerprint-Enhancement-Python
This SDK is built in AppForAI - AI Dev Tools.
Purchase license separately: USD 600, permanent authorization, single APP authorization, single machine authorization, one-year activation, one-year download, one-year update, one-year email technical support.