Tag Archives: gstreamer

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

 

AI on the Jetson Nano LESSON 51: Improving NVIDIA Jetson Inference Library for RPi Camera


 

Here are the lines of code I used in the video to fix the gstreamer command. You can copy them below. copy all the code, including the trailing colon

 

 

Jetson Xavier NX Lesson 5: Improving Raspberry Pi Camera Image Quality in Gstreamer

In this video we show you the keys to radically improving the image quality from the Raspberry Pi Camera. We show how to set Gstreamer caps and props in OpenCV to get stunning image ‘pop’ from this inexpensive camera. If you follow this lesson you will be able to get better image quality from your Raspberry Pi cameras.

The code below has the improved camSet string we developed in this lesson. I have noticed that there can be variation between different Raspberry Pi cameras. Hence, you can adjust the parameters to get the best quality image from your particular camera. Also, results will depend on lighting conditions. You can adjust the wbmode to match your lighting situation, and you can tweak the contrast, brightness and saturation to dial in the perfect picture quality.

 

Jetson Xavier NX Lesson 4: Understanding and Using Gstreamer for Absolute Beginners

In this lesson we show you how to understand the great mystery known as Gstreamer.  Most folks using the NVIDIA Jetson Nano or the NVIDIA Jetson Exavier NX just copy and past the launch string they found on the internet, but do not have a clue how Gstreamer actually works. In this video we will take you through it step-by-step, and show you how to actually understand what you are doing, and how to design your own pipes for maximum performance and image quality. Below are all the commands we used in the video lesson

Jetson Xavier NX Lesson 3: Using a WEB cam or Raspberry Pi camera in OpenCV with Gstreamer

In this video lesson we learn how to launch the Raspberry Pi Camera or a simple WEB cam on the Jetson Xavier NX using openCV and a Gstreamer command. This simple code shows you how to set up the camera, and then how to grab a frame and show a frame to create live video from the cameras.