Scans documents using your camera :)
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
example
.gitignore
LICENSE
NotoSansCJKsc-Medium.otf
README.md
box_finder.py
closestpair.py
homography.py
main.py
ocr.py
requirements.txt
utils.py

README.md

Scanner

Scans documents using your camera :)

Installation

# install python modules
pip3 install -r requirements.txt
# install tesseract (OCR dependency)
# Example: MacOS
# See https://github.com/tesseract-ocr/tesseract for more details
brew install tesseract --with-all-languages

Run the Scanner

python3 main.py <your_image_file>

The output will be stored in ./result/ directory

Demo

Input Image: input

Boundary Recognition: contour

Transform using homography: transofrm

Recognize text location: text location

Remove text from background: background

Translate and transform the translated text using reverse homography: translated

Merge the text back to the background final