Tag Archives: Raspberry Pi

Raspberry Pi LESSON 61: Finding and Tracking Faces and Eyes In OpenCV

In this video lesson we show how to use Haar Cascades in OpenCV on the Raspberry Pi to find and track  faces and eyes. We show the intelligent way to find eyes, such that CPU resources are not wasted. Below we show the code for your convenience.


Using a Pan/Tilt Camera Servo to Track an Object of Interest in OpenCV

In this Video Lesson we show an initial control system that allows us to position a camera on a pan/tilt servo system to keep an object of interest in the center of the frame. The pan/tilt servo hat will continuously adjust so that the object we are tracking remains in the center of the frame. In this example we are only tracking in the ‘pan’ direction. It is left as a homework assignment for the student to extend the software to also track in the tilt direction. This should be a straightforward extension to our pan example.


Tracking an Object of Interest in OpenCV using Contours on the Raspberry Pi

In this video lesson we show how to track an object of interest based on color in OpenCV. We show how to create masks, contours, and then how to box the contour of the object of interest. We also show a convenient way to train the system for finding the Object of Interest. For your convenience, the code is included below.


Library for Reading a 16 Button Keypad on the Raspberry Pi

In this lesson we show you how to create a Python Class and Library that allows you to easily get user input on a Raspberry Pi from a 16 button keypad. This will allow very easy interaction with the keypad.

The Library Code which we develop in the video is presented below for your convenience:

To use this code as a library, save it in the same folder as your python programs, and save it as KPLIB.py


This is a simple demo program that calls the library above, to receive input from the keypad.