You only need OpenCV library installed.
Codes are not mine, I'll be sharing the link down below. I changed things in the code since code owner used Jupyter notebook, and matplotlib
library to display, I used Atom editor so the codes does not have some color format changes or size changes.
Install opencv
library:
pip3 install opencv-python
You're good to go now!
📌 I'll try to do better when I have more free time.