Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added signature photo to (transparent) png converter script. #71

Merged
merged 1 commit into from
Oct 4, 2019
Merged

Added signature photo to (transparent) png converter script. #71

merged 1 commit into from
Oct 4, 2019

Conversation

RodolfoFerro
Copy link
Contributor

Added signature photo to (transparent) png converter script.

Python signature editor

The present contribution contains a Python script to process signature images, it returns a png image with a transparent background containing only the signature.

Setup

The Python PIL (Python Image Library) package with Python 3 is used in this repo.

To install PIL via pip:

pip install pillow

Contents

The main script is signature.py, which contains a set of utility functions developed so far.

Done so far

  • Binarize your signature
  • Remove background and make it transparent

TODO

  • Smooth image
  • Image orientation
  • Crop to get only signature

Usage

The main script, signature.py requires a set of parameters that are needed in the parser.

$ python signature.py -h
usage: signature.py [-h] -i INPUT [-o OUTPUT] [-th THRESHOLD]

optional arguments:
  -h, --help            show this help message and exit
  -i INPUT, --input INPUT
                        Input image.
  -o OUTPUT, --output OUTPUT
                        Output image.
  -th THRESHOLD, --threshold THRESHOLD

An example to use this script is as follows:

$ python signature.py -i imgs/example.jpg -o imgs/result.png -th 190

Results


Reference to:

https://github.com/RodolfoFerro/Signature

@RodolfoFerro
Copy link
Contributor Author

Reference to #52.

@hastagAB hastagAB self-requested a review October 4, 2019 05:00
Copy link
Owner

@hastagAB hastagAB left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome Work @RodolfoFerro ! 🎉 Really Nice! 👍
Thanks for your contribution.

@hastagAB hastagAB merged commit aa1b918 into hastagAB:master Oct 4, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants