This project demonstrates fingerprint matching using the SIFT (Scale-Invariant Feature Transform) algorithm and FLANN-based feature matching in OpenCV. It compares a given fingerprint image (sample) with a dataset of real fingerprints to find the best match based on feature similarity.
The goal of this project is to identify the most similar fingerprint image from a dataset when compared with a given altered fingerprint image. This can be useful for applications such as biometric verification, forensics, and image-based identification systems.
-
Load a sample fingerprint (e.g., an altered image).
-
Iterate through real fingerprint images in the dataset.
-
For each comparison:
- Detect keypoints and compute descriptors using SIFT.
- Match features using the FLANN-based matcher.
- Apply a ratio test (Loweβs test) to filter good matches.
-
Compute a similarity score based on the ratio of good matches to total keypoints.
-
Display the best matching fingerprint and the match visualization.
- Python 3
- OpenCV (cv2)
- SIFT Algorithm
- FLANN-based Matcher
I am using the SOCOFing (Sokoto Coventry Fingerprint Dataset) downloaded from Kaggle. Due to its large size, it cannot be uploaded to GitHub. You can download it using the link below:
π SOCOFing Dataset on Kaggle
Dataset Structure (simplified):
SOCOFing/
β
βββ Real/
β βββ 1__M_Left_index_finger.BMP
β βββ 2__M_Right_thumb_finger.BMP
β βββ ...
β
βββ Altered/
βββ Altered-Easy/
βββ Altered-Medium/
βββ Altered-Hard/
-
Clone the repository
git clone https://github.com/your-username/fingerprint-matching.git cd fingerprint-matching -
Install dependencies
pip install opencv-python opencv-contrib-python
-
Place the dataset
- Download the dataset from Kaggle.
- Extract it into the project directory, maintaining the folder structure shown above.
-
Run the script
python fingerprint_match.py
-
View the output
- The console will display progress and the best matching filename.
- A window will show the side-by-side match visualization.
- Support for batch comparison and result export.
- Integration with deep learning-based feature extraction.
- Improve accuracy and speed using parallel processing.
Developed by Prtham Feel free to reach out for collaboration or suggestions!

