The present repo contains a Python script to process signature images, it returns a png
image with transparent background containing only the signature.
The Python PIL (Python Image Library) package with Python 3.6 is used in this repo.
To install PIL via pip:
pip install pillow
The main script is signature.py
, which contains a set of utility functions developed so far.
- Binarize your signature
- Remove background and make it transparent
- Smooth image
- Image orientation
- Crop to get only signature
The main script, signature.py
requires a set of parameters that are needed in the parser.
An example to use this script is as follows:
python signature.py -i ../imgs/RudolfoAnaya.jpg -o ../imgs/resultado.png -th 190