A college project in Python using OpenCV.
A simple app that takes a photo of a paper and outputs an edited image with the paper properly aligned as though it was scanned.
Note
For a standalone version that doesn't require installing dependencies or using the command line, check out my Image Scanner - Standalone.
- Python 3.7.0
The app may work with other versions, but this is the version that was used during development.
- Create a new directory, for example
scanner, and placeapp.pyinside of it. - Open the directory in your terminal:
cd scanner
- Create a virtual environment:
python -m venv opencv-env
- Activate the environment :
.\opencv-env\Scripts\activate
- Install required packages:
pip install opencv-contrib-python matplotlib
- Run the app using the following syntax:
python app.py path_input_img path_output_img
Where:
path_input_img- path to your input image.path_output_img- path to save the edited image. If none is provided, it will be displayed instead.