Docscan is a document scanner. Take a photo of your documents and frame it.
Install it from pypi
pip install docscan
Scan from a remote image
curl -s http://input.png | docscan > output.png
Scan from a local file
docscan path/to/output.png path/to/input.png
In app.py
import sys
from docscan.doc import scan
sys.stdout.buffer.write(scan(sys.stdin.buffer.read()))
Then run
cat input.png | python app.py > out.png
Copyright (c) 2020-present Daniel Gatis
Licensed under MIT License
Liked some of my work? Buy me a coffee (or more likely a beer)