Skip to main content

Augmentation pipeline for rendering synthetic paper printing and scanning processes

Project description

Augraphy

Augmentation pipeline for rendering synthetic paper printing and scanning processes.

Turn an image like this:

Original Image

Into an image like this:

Augmented Image

Installation

Use the package manager pip to install augraphy.

pip install augraphy

Usage

from Augraphy import AugraphyPipeline

img = cv2.imread("test.png")
pipeline = AugraphyPipeline(paper_texture_path="./paper_textures")
crappified, original = pipeline.crappify(img, rotate=False)

paper_texture_path defines where the images used for non-generated paper textures will be loaded from. See the paper_textures folder on Github for examples.

You can also enable debugging mode by setting the debug=True argument.

pipeline = AugraphyPipeline(debug=True)

This will use cv2.imshow for each image transformation or cv2_imshow if running in Google Colab.

Roadmap

  • Ink effects (Bleed/Dusty/Low)
  • Paper textures (Generated/Images)
  • Scanner effects (Scanlines/Brightness Gradients)
  • Improved Configuration capabilities

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

License

MIT

Copyright 2021 Sparkfish LLC

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

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

Augraphy-1.0.4.tar.gz (13.0 kB view details)

Uploaded Source

Built Distribution

Augraphy-1.0.4-py3-none-any.whl (15.6 kB view details)

Uploaded Python 3

File details

Details for the file Augraphy-1.0.4.tar.gz.

File metadata

  • Download URL: Augraphy-1.0.4.tar.gz
  • Upload date:
  • Size: 13.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/3.10.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.9.0

File hashes

Hashes for Augraphy-1.0.4.tar.gz
Algorithm Hash digest
SHA256 a2b21d1f18d5ca8cb822349a987f7f1801f76fa227ac447f0cccbafab680dceb
MD5 4335a1e4a9b528efeee9aa2282ad3f5c
BLAKE2b-256 dba4965009c0a21c7613ea854cc1f81654cbb40721ff616172e56daea575e0d0

See more details on using hashes here.

File details

Details for the file Augraphy-1.0.4-py3-none-any.whl.

File metadata

  • Download URL: Augraphy-1.0.4-py3-none-any.whl
  • Upload date:
  • Size: 15.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/3.10.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.9.0

File hashes

Hashes for Augraphy-1.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 d5eef3a39410c50fbd6ab414ea4c14429c8e8a6bd5c72d020294c28fdc9ecbef
MD5 0b2123642ad31165ecfeeef8ec63cbef
BLAKE2b-256 8c33f2ed3f2408b3c3f8979be8e1202b06cab47b0e4bd8a66abc10ff82c75c74

See more details on using hashes here.

Supported by

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