Skip to content

Utility for using opencv to detect and reformat page scans, as for OCR

License

Notifications You must be signed in to change notification settings

lizadaly/page-scan-corrector

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Page Scan Corrector

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.

Installation

Prerequisites

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 .

Running from the command-line

process_image input.png outdir

This will write outdir/input.png with the result.

Examples

Input file

Input file

Output file

Output file

References

This was originally forked from doc2text.

About

Utility for using opencv to detect and reformat page scans, as for OCR

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages