color masking with opencv, pretty self explanatory.
Stuff to install:
Python: sudo apt-get python
Pip: curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py python get-pip.py
opencv: pip3 install opencv-python
The above install is not the full install of opencv, if you want the full install install it from source