Skip to main content

Convert photos of documents made with a camera to a 'scanned' documents. It will take documents' contour and apply a four point transformation

Project description

image-to-scan: cli tool that transforms a photo of a document to a scanned document

If you have an image of a document maybe you would like to crop everything outside the document and correct the angle from which the photo was taken, in that case this command line tool might help.

Notes
Originally forked from KMKnation/Four-Point-Invoice-Transform-with-OpenCV

This code is inspired from 4 Point OpenCV getPerspective Transform Example

Installation

  • Via pipx pipx install image_to_scan if you want to install inside an isolated environment.
  • Via pip pip install image_to_scan to an enviroment of your choice.

After installing it an entry point image-to-scan will be added.

Run it

Run image-to-scan tests/samples/02/original.jpg

Original Image Output Image
original Warped

Run image-to-scan tests/samples/03/original.jpg

Original Image Output Image
original Warped

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

image-to-scan-0.0.5.tar.gz (841.2 kB view hashes)

Uploaded Source

Built Distribution

image_to_scan-0.0.5-py3-none-any.whl (12.4 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