Utility for using opencv to detect and reformat page scans, as for OCR.
The program will attempt to crop an image (PNG, JPG) to only major text sections. Preserves color.
You'll need to install OpenCV on your platform. This does not require a bleeding-edge version, so using a package manager version should work (e.g. brew install opencv
on a Mac).
pipenv install
setup.py install --editable .
process_image input.png outdir
This will write outdir/input.png
with the result.
This was originally forked from doc2text.