# Raspberry Pi LESSON 59: Improved Pan/Tilt Tracking Control Algorithm

In this Video Lesson we show an improved control algorithm for tracking an Object of Interest in OpenCV. We develop a simple example of Proportional control, where the correction signal is proportional to the error signal. We show this is a much improved algorithm over our earlier one, which simply applied 1 degree corrections independent of the size of the error. The code we develop in this lesson is included below for your convenience.

# Raspberry Pi LESSON 58: Control System for Pan/Tilt Camera Hat for RPi Camera

In this video lesson, we should a simple control algorithm for a pan tilt camera to track an Object of Interest in OpenCV. We train the device to recognize an Object of Interest based on color, and then the camera is adjusted to keep the object in the center of the frame as the device moves. For your convenience, the code developed in the lesson is included belos.

# 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.

# Tracking an Object of Interest Based on Color in OpenCV on Raspberry Pi

In this video lesson we show how you can track an object of interest in OpenCV on the Raspberry Pi. We do this by tracking color in the HSV color space. We dial in our object of interest using trackbars. For your convenience, the code below is what we developed in our video.