Tag Archives: Artificial intelligence

Jetson Xavier NX Lesson 11: Independently Tracking Different Objects in Different Cameras

In this video lesson we show how two Raspberry Pi cameras can independently track to different objects of interest. As a demonstration, we track on two different colors, with pan/tilt servo systems adjusting to keep the object of interest in the center of the field of view.

In this project we are using the Jetson Xavier NX, which you can pick up HERE. You will also need to of the bracket/servo kits, which you can get HERE, and then two Raspberry Pi Version two cameras, available HERE.

 

AI on the Jetson Nano LESSON 52: Improving Picture Quality of the Raspberry Pi Camera with Gstreamer

In this lesson we want to pause and work on improving the image quality of the video stream coming from the Raspberry Pi camera. Right now, we are using a boilerplate Gstreamer string to launch the Raspberry Pi camera. In the video above we show how image quality can be drastically improved by tweaking the Gstreamer launch string.

Based on the Video above, we develop a greatly improved image quality by adjusting the Gstreamer launch string. Below, for you enjoyment is the code that will optimize picture quality.

First, this is the key line that results in excellent video quality:

And here is the overall code for running and displaying from the camera with the enhanced quality:

 

Now, once we have optimized the Gstreamer launch stream, we need to consider what path to move forward. In lesson #50 we saw that we could either control the camera using the NVIDIA Jetson Utilities, or we could control the camera normally from OpenCV. The advantage of our old OpenCV method is that it gives us more control of the camera. The advantage of the Jetson Utility method is that it appears to run faster, and for the rPi camera, have less latency. Below are two code examples for the two methods above. In the video lesson above, we will figure out the best strategy by tweaking the parameters in these two programas.

OPTION #1: Launch the cameras using OpenCV

OPTION # 2: Control Camera with NVIDIA Jetson Utilities Library

 

Jetson Xavier NX Lesson 10: Tracking Multiple Objects of Interest with Servos in OpenCV


In this lesson we learn how to use OpenCV on the Jetson Xavier NX to track an object of interest in with two cameras on two Pan/Tilt servo brackets. The system tracks based on HSV color space, but the same basic setup could be used with other object detection algorithms. In this project we are using the Jetson Xavier NX, which you can pick up HERE. You will also need to of the bracket/servo kits, which you can get HERE, and then two Raspberry Pi Version two cameras, available HERE.

 

Jetson Xavier NX Lesson 7: Connecting and Controlling Servos

In this lesson we show you how to control a pan/tilt camera bracket with the NVIDIA Jetson Xavier NX. We go through the physical build of the bracket, how to connect the circuit, and then how to program the servos. We use the Adafruit circuitpython library, and show how to download and use the library. If you want to play along at home, you can pick the pan/tilt bracket and servos up HERE, and you can grab a couple of Raspberry Pi cameras HERE.

Below is the simple code for moving the servo using the Jetson Xavier NX:

 

Jetson Xavier NX Lesson 6: Camera Gear and Setup for Future Lessons

In this lesson we discuss the future direction of this series, and the gear needed to move forward.

Moving forward, I will be running two pan/tilt servos for the raspberry pi cameras. I suggest buying the same gear HERE. I suggest purchasing two units.

Then, we also need two Version two raspberry pi cameras. I like the following ones, because they include a neat little acrylic case, and the long cable, which makes it work much better on the pan/tilt bracket. You can get the cameras HERE.