A college project in Python using OpenCV.
Description: a simple app that takes an photo of a paper, and outputs an edited image with the paper properly aligned as though it was scanned.
- Python 3.7.0
The app could work with different versions, but this is the one that was tested.
- Create a new directory, for example
scanner
, and placeapp.py
inside 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 needed packages:
pip install opencv-contrib-python matplotlib
- Run the app using the following syntax:
python app.py path_input_img path_output_img
While:
path_input_img
- path to your scanned image.path_output_img
- path to save the edited image, if none is provided it'll be displayed instead.