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 details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

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

Uploaded Python 3

File details

Details for the file document_cropper-0.0.1.tar.gz.

File metadata

  • Download URL: document_cropper-0.0.1.tar.gz
  • Upload date:
  • Size: 6.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.4

File hashes

Hashes for document_cropper-0.0.1.tar.gz
Algorithm Hash digest
SHA256 1094dcd61c3dd9015468debc8b8e3f89b39041abf51b55514c892c6d41d94e52
MD5 8b6a6604bda5a75e430dae797348b342
BLAKE2b-256 bcc0f5bc27e9a6527f0e9a2a74a72ef60f4679bda02114a4b10b4f9a67fbc685

See more details on using hashes here.

File details

Details for the file document_cropper-0.0.1-py3-none-any.whl.

File metadata

File hashes

Hashes for document_cropper-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 fccf752fc5024f90a5273c3bd92cafa291d5689b6d214353c9567eed4fd80285
MD5 64eca736cfe0b362f64bac22fc3b62c1
BLAKE2b-256 82bea976b9115f8f92cec5038aaf040bf2c13b0da24bae59520cd4f45bf35b78

See more details on using hashes here.

Supported by

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