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

https://github.com/elenaches/python-chroma-key-app

A college project in Python using OpenCV, a simple app that takes two images - one with green areas, the other a background image, and outputs an image with the green areas replaced with the background image.
https://github.com/elenaches/python-chroma-key-app

chromakey chromakey-green image-manipulation image-processing opencv opencv-python python

Last synced: 12 days ago
JSON representation

A college project in Python using OpenCV, a simple app that takes two images - one with green areas, the other a background image, and outputs an image with the green areas replaced with the background image.

Awesome Lists containing this project

README

          

# Chroma Key App





A college project in Python using OpenCV.

A simple app that takes two images, one with green areas and one background image, and replaces the green regions with the background.

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 `chromakey`, and place `app.py` inside it.
2. Open the directory in your terminal:

```
cd chromakey
```

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 img_filename bk_filename ofilename
```

Where:

- `img_filename` - path to an image with a green screen.
- `bk_filename` - path to the background image.
- `ofilename` - path to save the edited image. If none is provided, it will be displayed instead.