Skip to content

Pratham00007/Fingerprint-Matching

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Fingerprint Matching using SIFT (Scale-Invariant Feature Transform)

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.


📘 Overview

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.


⚙️ How It Works

  1. Load a sample fingerprint (e.g., an altered image).

  2. Iterate through real fingerprint images in the dataset.

  3. 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.
  4. Compute a similarity score based on the ratio of good matches to total keypoints.

  5. Display the best matching fingerprint and the match visualization.


🧠 Technologies Used

  • Python 3
  • OpenCV (cv2)
  • SIFT Algorithm
  • FLANN-based Matcher

📂 Dataset

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/

🚀 Usage

  1. Clone the repository

    git clone https://github.com/your-username/fingerprint-matching.git
    cd fingerprint-matching
  2. Install dependencies

    pip install opencv-python opencv-contrib-python
  3. Place the dataset

    • Download the dataset from Kaggle.
    • Extract it into the project directory, maintaining the folder structure shown above.
  4. Run the script

    python fingerprint_match.py
  5. View the output

    • The console will display progress and the best matching filename.
    • A window will show the side-by-side match visualization.

🖼️ Sample Image

Sample (Input Fingerprint): alt text


🧩 Output Image

Best Match Visualization: alt text


📊 Future Improvements

  • Support for batch comparison and result export.
  • Integration with deep learning-based feature extraction.
  • Improve accuracy and speed using parallel processing.

🧑‍💻 Author

Developed by Prtham Feel free to reach out for collaboration or suggestions!

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors