For cropping documents from images
Project description
Document-Cropper
Python document cropper which can be applied to images.
About The Project
There are a several articles and GitHub repos dedicated to document segmentation; however, I didn't find one that worked right out of the box, so I created this one. It can be used for preprocessing document images for further text recognition on them or for saving them in proper format.
Built With
Installation
This project can be easily installed via pip
pip install document-cropper
Usage
import document_cropper as dc
To crop image you should use:
dc.crop_image("path_to_example.jpg", "name_for_the_result.jpg")
If you want to see all stages of processing you can use:
# Save the stages as image
dc.crop_image_pipeline("path_to_example.jpg", "name_for_the_result.jpg")
# Show the stages as matplotlib figure
dc.crop_image_pipeline("path_to_example.jpg")
For more examples, please refer to the Documentation
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
document_cropper-0.0.1.tar.gz
(6.5 kB
view hashes)
Built Distribution
Close
Hashes for document_cropper-0.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | fccf752fc5024f90a5273c3bd92cafa291d5689b6d214353c9567eed4fd80285 |
|
MD5 | 64eca736cfe0b362f64bac22fc3b62c1 |
|
BLAKE2b-256 | 82bea976b9115f8f92cec5038aaf040bf2c13b0da24bae59520cd4f45bf35b78 |