An open API service indexing awesome lists of open source software.

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.

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.