A simple document scanner built using OpenCV and imutils
- Clone the repository
git clone https://github.com/VMoskov/DocumentScanner.git
- Install the required packages
pip install -r requirements.txt
- Run the script with the following command
python document_scanner.py --image images/<file_name>.jpg
or just
python document_scanner.py -i images/<file_name>.jpg
- The scanned document will be displayed on the screen
- Press
0
to close the window
Original image:
Image with edges:
Detected document:
Scanned document: