Socket
Socket
Sign inDemoInstall

fingerprints-unam-colab

Package Overview
Dependencies
9
Maintainers
1
Alerts
File Explorer

Install Socket

Detect and block malicious and high-risk dependencies

Install

    fingerprints-unam-colab

Extraction of fingerprint and palm data from grayscale images.


Maintainers
1

Readme

Fingerprint and Handprint Extractor

This project uses simple image processing operations to extract finger and hand impressions from white paper sheets. It's intended to be used as an auxiliary tool for forensics research at UNAM.

Getting Started

The latest stable version can be downloaded from the PyPI. A development and a (relatively) stable version are available (latest release). A simple wxPython GUI is currently available (demo). High-level analysis on the extracted fingerprints is currently in the works.

Prerequisites

The code is written in Python 3, and it relies on OpenCV, SciPy and scikit-image:

Dependencies are automatically managed by pip.

Important (Linux users): wxPython can take a while to compile. It may be best to install wxPython system-wide before calling pip.

Installing

To download, you can simply create a virtualenv and install the project with pip:

pip install fingerprints-unam-colab

Command-line execution

The fingerprint extraction script can be executed with the following command:

extract_fp path_to_input_image path_to_output_folder

where:

  • path_to_input_image is the path to the image file containing the fingerprints to be extracted.
  • path_to_output_folder is the path to the folder where the results will be stored (may be empty or not).

GUI execution

The wxPython GUI can be executed with the following command:

fp_unam

A configuration file will be created in the user's home folder after the initial execution.

How it works

The extraction algorithm works as follows:

  1. The script reads the input image in grayscale
  2. The grayscale image is normalized.
  3. A smoothing filter is applied (median Blur with a 7x7 window).
  4. The filtered image is binarized through local thresholding (to account for the expected high contrast between the black hand/finger prints and the white background).
  5. The binary image is inverted (we are interested in the black regions).
  6. Long vertical and horizontal lines are removed with a morphological filter (to discard scan borders).
  7. Felzenszwalb's superpixel method is used to detect potential ROIs.
  8. Potential ROIs are segmented into independent connected components (8x8 neighborhood).
  9. Components below 10000 pixels are discarded (too small).
  10. A dilation operation is applied (10x with 8x8 structuring element) to connect contiguous regions.
  11. An erosion operation is performed (5x with 8x8 structuring element) to avoid over segmentation.
  12. The obtained components are classified as follows:
    • Components are classified as fingerprints if:
      • They approximate a square.
      • They are no larger than 500px and no smaller than 150px (to remove artifacts).
      • They have a low average distance with respect to all other candidates (to remove outliers).
    • Components are classified as hand-prints if:
      • They are not fingerprints.
      • They are not in the border of the image (100px border).
  13. The classified components are cropped, rotated (based on their minimum bounding box) and saved as independent images.

Note: Most of the logic to manage connected components as independent regions is enconded in a Region class (in regions.py).

Authors

  • Arturo Curiel - Initial work - website

See also the list of contributors who participated in this project.

License

This project is licensed under the GNU/GPL3 License - see the LICENSE.md file for details

Acknowledgments

  • Idk, my cat I guess.

FAQs


Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc