Skip to main content

Extraction of fingerprint and palm data from grayscale images.

Project description

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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

fingerprints-unam-colab-0.22.tar.gz (1.5 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

fingerprints_unam_colab-0.22-py3-none-any.whl (1.5 MB view details)

Uploaded Python 3

File details

Details for the file fingerprints-unam-colab-0.22.tar.gz.

File metadata

  • Download URL: fingerprints-unam-colab-0.22.tar.gz
  • Upload date:
  • Size: 1.5 MB
  • Tags: Source
  • Uploaded using 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

File hashes

Hashes for fingerprints-unam-colab-0.22.tar.gz
Algorithm Hash digest
SHA256 2e0db287602bce74f6b9b7308d8f3dc3caa5384c2594024880205889b5c511b8
MD5 01131013c3f38cdda913d92d89f87e9c
BLAKE2b-256 7b066ae3b88e25934ab67a80207cc7a85f3eef9342bdd063ec8f6cca0c532d17

See more details on using hashes here.

File details

Details for the file fingerprints_unam_colab-0.22-py3-none-any.whl.

File metadata

  • Download URL: fingerprints_unam_colab-0.22-py3-none-any.whl
  • Upload date:
  • Size: 1.5 MB
  • Tags: Python 3
  • Uploaded using 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

File hashes

Hashes for fingerprints_unam_colab-0.22-py3-none-any.whl
Algorithm Hash digest
SHA256 e4cba9796eab4e3aec96a335a75dbed2d6589ca838abb38752df71cae91b78ff
MD5 52b6eac49588b781b1212b655a26393b
BLAKE2b-256 c158ec303c6fc1cdc52ad33c38bb71592f937ce764f4b5a9b10368185a49eee8

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page