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: about 2 months 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.
- Host: GitHub
- URL: https://github.com/elenaches/python-chroma-key-app
- Owner: ElenaChes
- License: mit
- Created: 2024-03-24T18:30:16.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2024-05-15T16:50:45.000Z (about 1 year ago)
- Last Synced: 2025-02-01T15:16:02.856Z (4 months ago)
- Topics: chromakey, chromakey-green, image-manipulation, image-processing, opencv, opencv-python, python
- Language: Python
- Homepage:
- Size: 4.88 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Chroma key App
A college project in Python using OpenCV.
Description: 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.
Content
- [Dependencies](#dependencies)
- [Installation](#installation)
- [Usage](#usage)
# Dependencies
1. Python 3.7.0
The app could work with different versions, but this is the one that was tested.
# Installation
1. Create a new directory, for example `chromakey`, and place `app.py` inside of 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 needed packages:
```
pip install opencv-contrib-python matplotlib
```# Usage
1. Run the app using the following syntax:
```
python app.py img_filename bk_filename ofilename
```While:
- `img_filename` - path to an image with a 'green screen'.
- `bk_filename` - path to the background.
- `ofilename` - path to save the edited image, if none is provided it'll be displayed instead.