Cleans photographed documents for improved printing
Project description
print-clean
This script helps prepare photographed documents for printing:
Before:
After:
Installation
Install Python 3.9 or higher, then run:
pip install printclean
Usage
printclean path-to-image [path-to-another-image ...] [--level value] [--lang code1 code2 ...]
You can optionally specify the cleanup’s threshold value with --level
. The value must be an integer between 0 and 255, inclusive. Larger values produce images with fewer filled pixels. The default is 10.
You may also provide your document’s language(s) with the --lang
parameter, which may help fix the input image’s perspective. Currently, the script can only perform simple rotations.
You can find available languages and their codes here. You might need to specifically install your required language for the Tesseract OCR engine (Windows, Ubuntu, Mac OS).
The output image will be saved as a PNG file with the suffix -cleaned
.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for printclean-0.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | cc6eb50b552f7b18eed6d07a12621da1dca66a019fb6f1f227162c4676f6f8f6 |
|
MD5 | d8983a400e51d01d2ea5ad2a753de5cc |
|
BLAKE2b-256 | f5707da6d8d9316a436ef03b237d1fb52e815fbf84e7f471a7a1c2ca3b505067 |