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 hashes)

Uploaded Source

Built Distribution

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

Uploaded Python 3

Supported by

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