Skip to main content

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

(back to top)

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

document_cropper-0.0.1.tar.gz (6.5 kB view hashes)

Uploaded Source

Built Distribution

document_cropper-0.0.1-py3-none-any.whl (8.0 kB view hashes)

Uploaded Python 3

Supported by

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