Category Archives: Raspberry Pi

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.

 

Using the Raspberry Pi Camera on Bullseye OS and OpenCV

Then the following code will allow you to grab a frame and show a frame in a window. Looking this sequence creates a live video preview on your Raspberry Pi Screen.

 

Raspberry Pi LESSON 38: Motion Detection Alarm with Multiple Alarms

In this video lesson we show how to create an Alarm System based on a Raspberry Pi, with user input from a keypad, and user prompts on an I2C LCD Display. From the earlier lessons in this series, you must install the LCD1602 Library, and you must install the keypad library. We include the code that we develop in this lesson below for your convenience: