https://github.com/FrancescElies/image-to-scan
command line tool that transforms a photo of a document to a scanned document
https://github.com/FrancescElies/image-to-scan
command-line-tool image-manipulation image-processing python
Last synced: over 1 year ago
JSON representation
command line tool that transforms a photo of a document to a scanned document
- Host: GitHub
- URL: https://github.com/FrancescElies/image-to-scan
- Owner: FrancescElies
- License: mpl-2.0
- Fork: true (KMKnation/Four-Point-Invoice-Transform-with-OpenCV)
- Created: 2019-07-21T15:23:06.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2022-12-26T21:36:31.000Z (over 3 years ago)
- Last Synced: 2025-02-22T17:43:58.170Z (over 1 year ago)
- Topics: command-line-tool, image-manipulation, image-processing, python
- Language: Python
- Homepage:
- Size: 4.66 MB
- Stars: 27
- Watchers: 2
- Forks: 1
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# image-to-scan
If you have an image of a document and 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 be for you.
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](https://pipxproject.github.io/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.
- Download an executable for windows, linux or macos from the [release page](https://github.com/FrancescElies/image-to-scan/releases)
`image-to-scan` depends on `opencv` and `numpy` which together will take around `200MiB`
If installed with `pip` or `pipx` you should be able to call `image-to-scan` from the command line.
## Run it ##
Run `image-to-scan tests/samples/02/original.jpg`
Original Image
Output Image
tests/samples/02/original.jpg
tests/samples/02/original-scanned.jpg