A script to extract document from an image and make a scanner like render
Specify a file with a document on it:
# option: --color, --output
python3 scanner.py [option] test/doc_normal.jpg
- Read image
- Transform into grayscale
- Extract the document by apply a threshold
- Find contour and fix the picture perspective
- Render in color or black and white