https://github.com/elenaches/python-image-scanner
A college project in Python using OpenCV, 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.
https://github.com/elenaches/python-image-scanner
image-manipulation image-processing opencv opencv-python python scanner-cam
Last synced: about 1 month ago
JSON representation
A college project in Python using OpenCV, 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.
- Host: GitHub
- URL: https://github.com/elenaches/python-image-scanner
- Owner: ElenaChes
- License: mit
- Created: 2024-03-24T18:48:53.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-05-15T17:00:16.000Z (about 2 years ago)
- Last Synced: 2025-02-01T15:16:02.890Z (over 1 year ago)
- Topics: image-manipulation, image-processing, opencv, opencv-python, python, scanner-cam
- Language: Python
- Homepage:
- Size: 2.93 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Image Scanner
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](https://github.com/ElenaChes/python-image-scanner-standalone).
Content
- [Dependencies](#dependencies)
- [Installation](#installation)
- [Usage](#usage)
# Dependencies
1. Python 3.7.0
The app may work with other versions, but this is the version that was used during development.
# Installation
1. Create a new directory, for example `scanner`, and place `app.py` inside of it.
2. Open the directory in your terminal:
```
cd scanner
```
3. Create a virtual environment:
```
python -m venv opencv-env
```
4. Activate the environment :
```
.\opencv-env\Scripts\activate
```
5. Install required packages:
```
pip install opencv-contrib-python matplotlib
```
# Usage
1. 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.