meine
meine 🌒 - A CLI file manager and system utility built with Textual. It combines intuitive command parsing with rich t…
An interactive document scanner built in Python using OpenCV featuring automatic corner detection, image sharpening, an…
git clone https://github.com/andrewdcampbell/OpenCV-Document-Scanner.gitandrewdcampbell/OpenCV-Document-ScannerThe scanner takes a poorly scanned image, finds the corners of the document, applies the perspective transformation to get a top-down view of the document, sharpens the image, and applies an adaptive color threshold to clean up the image.
On my test dataset of 280 images, the program correctly detected the corners of the document 92.8% of the time.
This project makes use of the transform and imutils modules from pyimagesearch (which can be accessed here). The UI code for the interactive mode is adapted from poly_editor.py from here.
You can manually click and drag the corners of the document to be perspective transformed:

The scanner can also process an entire directory of images automatically and save the output in an output directory:

python scan.py (--images <IMG_DIR> | --image <IMG_PATH>) [-i]
-i flag enables interactive mode, where you will be prompted to click and drag the corners of the document. For example, to scan a single image with interactive mode enabled:python scan.py --image sample_images/desk.JPG -i
python scan.py --images sample_images
more like this
meine 🌒 - A CLI file manager and system utility built with Textual. It combines intuitive command parsing with rich t…
Create and add progress bars, Office365 Files and Dropbox Paper papers by labels and link them to your Todoist tasks.
search projects, people, and tags