Tag Archives: AI

AI ON THE JETSON NANO LESSON 28: Tracking Objects in OpenCV using Contours

 

In Lesson 27 we learned how to isolate an object of interest by masking it, and separating it from the background. In this lesson we learn how to track the object of interest by creating OpenCV contours, and then drawing a con tour or box around the object of interest in the original frame. This allows us to track objects of interest in real time on live videos. The video above takes you through the lesson step-by-step, and below is the demo code we developed during the lesson

 

AI ON THE JETSON NANO LESSON 29: Gear to Create a Pan Tilt Camera Platform for Real Time Tracking

Now that we are able to isolate and track objects using the Jetson Nano and OpenCV, now we can create a pan tilt platform for the camera, so the camera can actually track and follow the object of interest in the scene.  We will do this be using two servos and then some mounting brackets. Below, I show the gear you will need to order to continue.

First we will need to be able to mount our camera on the pan/tilt bracket. If you have the Logitech WEB cam, then it can be affixed to the bracket in any number of different ways. I you are using the Raspberry Pi camera, you will need to either pick up the Logitech WEB cam, or you will need a longer cable for the Raspberry Pi Camera. For this project, I prefer the logitech WEB cam. But if price is a barrier, the simplest solution is to order the set of longer cables. You can get this gear from these links:

Logitech WEB cam

Raspberry Pi Long Camera Cable Set

Now you will need a couple of good servos to drive the pan tilt brackets. I found this set works well, and the price is good, and you will end up with a couple of spares, which is always useful.

Servo Set

You will also need a pan/tilt bracket for the servos and cameras, and the one below is the set I am using in this project.

Pan/Tilt Camera Bracket Set

And Finally you will need an PCA9685 I2C Servo Control Board. You can pick up what you need here:

Servo Control Board

The link above is for a pair of the boards,  and you only need one. I suggest getting the pair so you have a spare if needed, or it can be used for other projects. And that is all you will need!

AI on the Jetson Nano LESSON 27: Tracking Objects in OpenCV Using HSV Color Space

In this lesson we show how to track items in OpenCV based on color using the HSV color space. Below is the code we developed in this lesson.