Toolkit for document image processing
Project description
Contextualization
In progress toolkit for document image pre processing.
Aimed for images to be OCRed.
Available methods
-
Auto rotate image
Uses left margin of a document to calculate the angle of rotation present, and correct it accordingly.
Can be given the rotation direction (clocwise or counter_clockwise), or in auto mode tries to determine the side to which the document is tilted (can be none, in which case image won't be rotated).
-
Calculate rotation direction
Calculates rotation direction of an image by finding the biggest sets of the first black pixels appearances (with outliers removed) in the image for each direction: clockwise, counter_clockwise and none.
For none direction, the set is created based on pixels with same 'x' coordinate that with less than a 5% height difference, relative to the image's height.
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 document_image_utils-0.1.5.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 724b036232e21368720298b385c4afebbd2cdbad73d8c7d3083ba717f492f26b |
|
MD5 | abcdbcb295f9f70a9f8d37013def6bf5 |
|
BLAKE2b-256 | 824233f4d3472d7c78d237f74b70b6eb85b0cdf55a27a5fbc6dd3b58a845ec2e |
Hashes for document_image_utils-0.1.5-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1d48e3fc9cd01273a4f27e28f6858fdd55cb3c5d2122fa8834260844b7270b5b |
|
MD5 | 36e4a65c81bcf72c5b58125a06cb8b30 |
|
BLAKE2b-256 | d07568716f7601f82e2c5b0ef3086e03ef77bba6f0ef2e22b9acb9a806b711cb |