NVIDIA ISP Guide

This guide provides instructions on how to utilize the NVIDIA® ISP (Image Signal Processor) for camera configuration and settings. The NVIDIA® ISP is responsible for processing the image data captured by the camera and applying various enhancements and corrections. ​

Modifying and Reloading the ISP #

To modify the ISP settings and apply them to your camera, follow these steps:

  1. Locate the ISP file: /var/nvidia/nvcam/settings/zedx_ar02340.isp
  2. Open the ISP file in a text editor (you need to be in sudo mode) and make the necessary changes to the settings. Refer to the documentation or specific camera model guides for details on available parameters.
  3. Save the modified ISP file.
  4. Run the following script to apply the new ISP settings and reload the ISP:​
#!/bin/bash
sudo systemctl restart nvargus-daemon.service
sudo rmmod sl_zedx
sudo rmmod max96712
sleep 1
if [[ ! $(lsmod | grep max96712) ]]; then
    sudo insmod /usr/lib/modules/5.10.104-tegra/kernel/drivers/stereolabs/max96712/max96712.ko
    if [[ ! $? ]]; then
        echo "Error while inserting the module"
        exit
    fi
fi
if [[ $(lsmod | grep sl_zedx) ]]; then
    sudo rmmod sl_zedx
fi
sudo insmod /usr/lib/modules/5.10.104-tegra/kernel/drivers/stereolabs/zedx/sl_zedx.ko

Exposure/Gain Settings #

​ The NVIDIA® ISP allows you to adjust exposure and gain settings for optimal image capture. Here’s how you can modify these settings:

  1. Open the ISP file in a text editor.
  2. Locate the exposure/gain setting line, which typically looks like this:
ae.ExposureTuningTable.Preview[0] = {2.4, 0.01666, 3.0, 1.0};
ae.ExposureTuningTable.Preview[1] = {2.4, 0.03333, 3.0, 1.0};
ae.ExposureTuningTable.Preview[2] = {2.4, 0.03333, 3.0, 1.0};
ae.ExposureTuningTable.Preview[3] = {2.4, 0.03333, 3.0, 1.0};
ae.ExposureTuningTable.Preview[4] = {2.4, 0.03333, 3.0, 1.0};
ae.ExposureTuningTable.Preview[5] = {2.4, 0.06666, 3.0, 1.0};
ae.ExposureTuningTable.Preview[6] = {2.4, 0.06666, 3.0, 1.0};
ae.ExposureTuningTable.Preview[7] = {2.4, 0.06666, 3.0, 1.0};

​ 3. Adjusting Exposure and Gain Settings ​ When modifying the values, it’s essential to understand their significance:

  • The first value (2.4) corresponds to the camera aperture. The ZedX camera has a fixed aperture, eliminating the need for changes. ​
  • The second value (0.01666) represents the exposure time. This value indicates the exposure interval where the parameters are applied. To clarify:
    • 0.01666 signifies an exposure interval of [0-16ms].
    • 0.03333 indicates an exposure interval of [16ms-33ms]. ​
  • The third and fourth values (1.0, 1.0) represent the analog gain (AG) and digital gain (DG), respectively. Adjust the AG value to control the gain relative to exposure. ​ We do not modify the DG because it makes the auto-exposure unstable. ​ For a specific illumination scenario, consider the following examples: ​
  • AG = 1.0: Exposure = 16,000ms / Gain = 900
  • AG = 3.0: Exposure = 13,113ms / Gain = 1300
  • AG = 5.0: Exposure = 8,397ms / Gain = 2200
  • AG = 7.0: Exposure = 6,751ms / Gain = 2900
  • AG = 9.0: Exposure = 5,676ms / Gain = 3500
  1. Save the ISP file with the updated exposure/gain settings.

Enabling Lens Shading Correction #

​ The NVIDIA® ISP supports lens shading correction to compensate for lens imperfections. To enable lens shading correction, follow these steps:

  1. Open the ISP file in a text editor.
  2. Locate the lines that set the image resolution for lens shading correction:
lensShading.imageHeight        = 1200;
lensShading.imageWidth         = 1920;
  1. Adjust the imageHeight and imageWidth values to match your desired resolution for lens shading correction. Note that you can only use one resolution if you enable the lens shading correction and it is the one set with imageHeight and imageWidth.

If you try to open the camera with another resolution it will crash and you will have to restart the deamon.

  1. Enable the lens shading correction by turning the following parameter to true :
ap15Function.lensShading = FALSE; -->  TRUE;
  1. Save the ISP file with the updated lens shading correction settings.

📌 Note: Ensure that the resolution set for lens shading correction matches the resolution you intend to use; otherwise, it may cause issues. ​