Face tracking camera for engineering labs

Connor L

Software Engineer
OpenCV
Python
Rebuilding First Nations Governance
In 2020 I assisted Carleton in rolling out a new course by coding a Python project that used a Raspberry Pi with a camera to track faces. A Pi Camera was mounted on two servos which were controlled by the GPIO pins on the Pi. Using OpenCV the program I wrote would detect a face on screen and measure how many pixels were between the centre of the face and the centre of the image and the difference would be handed off to a PID controller which would control the servos to pan and tilt the camera until the face was in the center of the screen. A well-tuned PID controller was here crucial for determining how fast the camera began to turn when a subject moved to avoid overshooting or undershooting keeping them in the centre. With the ground-work laid we were left with a half-baked project and in this case, that was the goal.
It was agreed upon that we would leave a few key issues for the students to solve, and opportunities for them to add features. We would leave it completely untuned for the students to fix, and we purposefully did not account for the case of if 2 faces were in frame so that the students could expand upon the existing code to adapt to that scenario. The students would also be given the chance to expand upon the product with their own ideas to get a feel for developing new features for an existing project.
Partner With Connor
View Services

More Projects by Connor