Skip to main content

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.

Metadata

Release files for fingerprints-unam-colab 0.22

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for fingerprints-unam-colab 0.22
File Size Uploaded Provenance Actions
fingerprints-unam-colab-0.22.tar.gz 1.5 MB Without provenance Details for fingerprints-unam-colab-0.22.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for fingerprints-unam-colab 0.22
File Interpreter ABI Platform Actions
fingerprints_unam_colab-0.22-py3-none-any.whl Python 3 none any Details for fingerprints_unam_colab-0.22-py3-none-any.whl

Total release size: 3.1 MB

Release files / fingerprints-unam-colab-0.22.tar.gz

Download URL fingerprints-unam-colab-0.22.tar.gz
Size 1.5 MB
Tags Source
SHA-256 checksum
How to use checksums
2e0db287602bce74f6b9b7308d8f3dc3caa5384c2594024880205889b5c511b8
BLAKE2b-256 checksum
How to use checksums
7b066ae3b88e25934ab67a80207cc7a85f3eef9342bdd063ec8f6cca0c532d17
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.8.0 pkginfo/1.8.2 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.9 tqdm/4.63.0 importlib-metadata/4.8.1 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.10.4

Release files / fingerprints_unam_colab-0.22-py3-none-any.whl

Download URL fingerprints_unam_colab-0.22-py3-none-any.whl
Size 1.5 MB
Tags Python 3
SHA-256 checksum
How to use checksums
e4cba9796eab4e3aec96a335a75dbed2d6589ca838abb38752df71cae91b78ff
BLAKE2b-256 checksum
How to use checksums
c158ec303c6fc1cdc52ad33c38bb71592f937ce764f4b5a9b10368185a49eee8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.8.0 pkginfo/1.8.2 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.9 tqdm/4.63.0 importlib-metadata/4.8.1 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.10.4

Security for fingerprints-unam-colab 0.22

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page