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 -o path/to/output.png path/to/input.png
Scan from all images in a folder
docscan -p path/to/inputs
Start the server
docscan-server
Open your browser to
http://localhost:5000?url=http://image.png
Also you can send the file as a FormData (multipart/form-data):
<form action="http://localhost:5000" method="post" enctype="multipart/form-data">
<input type="file" name="file"/>
<input type="submi"t value="upload"/>
</form>
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)