Skip to content

CLI tool for transforming natural pictures of documents into "scanned" images. Inspired by this blog post but without the DL https://dropbox.tech/machine-learning/fast-and-accurate-document-detection-for-scanning

License

Notifications You must be signed in to change notification settings

TeaUponTweed/JournalScanner

Repository files navigation

Overview

Simple CLI to create scan-like images from pictures of documents. There are currently several issues with the algorithm but it works sometimes. The eventual goal is to implement this in golang and compile to WASM and run locally in the browser and allow for manual quadrilateral inputs when scanning non-isolated images such as a recipe book.

We take in a image like this: example input And ideally output an image like this: example output

Usage

Install by running make install Then run scan path/to/image.jpeg path/to/scan.jpeg

TODO

  • Use color (white-ish -> other) to improve edge detection
  • Track original corner orientation so that document is not flipped
  • More rigorous down-sampling for parts of the algorithm
  • Implement min-cut to remove areas of darkness
  • Can this be a pure DL algorithm? Perhaps using "SmartDoc-QA: A dataset for quality assessment of smartphone captured document images - single and multiple distortions"
  • Typehint / pylint / mypy

About

CLI tool for transforming natural pictures of documents into "scanned" images. Inspired by this blog post but without the DL https://dropbox.tech/machine-learning/fast-and-accurate-document-detection-for-scanning

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published