Abstract: this repo includes a pipeline for green chromakey detection and masking.
The main idea is to use computationally efficient OpenCV methods. (yeah, C++ is so good😎)
Also, in some cases it can be fruitful to use some of YOLOs models in order to bound laptop zone and then to find the chromakey zone.
However, in this case we do not really need as there are no other green zones and it requires more computations.
Additionally, I believe we can compute running average for coordinates to make the masking smoother.
OpenCV library is required.
Installation:
pip install opencv-python
The directory tree should be:
. ├── main.py ├── person │ └── person.jpeg ├── readme.md ├── result │ └── result_video.mp4 ├── utils │ └── utils.py └── video └── green.mp4
Usage example:
python3 main.py