It's working with OpenCV and Python 2.7
That programm trying on ubuntu 18.04
For starting you should check your python version and install OpenCV for python
I'm using pip for install packages
- run
pip install opencv-python
- run
pip install opencv-contrib-python