In this repo I develop a simple code to track faces with a webcam, an arduino and a small servo.
We need to install a few dependencies:
- the Arduino idle. check it out here
- OpenCV. Installing the latest version usually requires compiling from source and it is a bit cumbersome, for our purposes, in Ubuntu 18.04, it is enough to install it from the apt-get repo:
$ sudo apt-get install python3-opencv
- Python
serial
library:
sudo apt-get install python3-serial
First you need to upload the arduino code into the arduino. You can check if it works using the code in myservo.py
Using the servo SG90
the scheme for the connections is pretty straight forward
Then you can just run
$ python track_face.py