SPRAD86A March   2023  – May 2024 AM62A3 , AM62A3-Q1 , AM62A7 , AM62A7-Q1 , AM68A , AM69A

 

  1.   1
  2.   Abstract
  3.   Trademarks
  4. Introduction
  5. Tuning Overview
  6. Hardware Requirement
  7. Software Requirement
    1. 4.1 Processor SDK Linux
    2. 4.2 TI's Reference Imaging Software
    3. 4.3 ISP Tuning Tool
  8. Sensor Software Integration
    1. 5.1 Overview of Image Pipeline Software Architecture
    2. 5.2 Adding Sensor Driver to SDK
    3. 5.3 Updating TIOVX Modules
      1. 5.3.1 Source Code Change
      2. 5.3.2 Rebuild Modules
    4. 5.4 Update GStreamer Plug-in for VISS
      1. 5.4.1 Update VISS Plug-in Property
      2. 5.4.2 Add Exposure Setting for 2A Algorithm
        1. 5.4.2.1 Gain
        2. 5.4.2.2 Exposure Time
        3. 5.4.2.3 Other Parameters
      3. 5.4.3 Rebuild Plug-ins
      4. 5.4.4 Verify New Sensor in GStreamer Plug-in
  9. Tuning Procedure
    1. 6.1 Verify Functional Operation of Camera Capturing
    2. 6.2 Enable Camera Streaming With Initial VPAC Configuration
      1. 6.2.1 Generate Configuration Files
      2. 6.2.2 Generate DCC Binary Files
      3. 6.2.3 Stream Video With the Initial Configuration
    3. 6.3 Adjust Camera Mounting
  10. Perform Basic Tuning
    1. 7.1 Launch the Tuning Tool and Create a Project
    2. 7.2 Tuning Order
    3. 7.3 Black Level Subtraction
    4. 7.4 Hardware 3A (H3A)
    5. 7.5 PCID
    6. 7.6 Auto White Balance (AWB)
      1. 7.6.1 Capture Raw Images for Different Lighting Conditions
      2. 7.6.2 Tuning AWB
    7. 7.7 Color Correction
  11. Perform Fine Tuning
    1. 8.1 Edge Enhancement (EE)
    2. 8.2 Noise Filter 4 (NSF4)
  12. Live Tuning
    1. 9.1 Requirements
    2. 9.2 Supported Features
      1. 9.2.1 RAW Capture
      2. 9.2.2 YUV Capture
      3. 9.2.3 Live DCC Update
      4. 9.2.4 Exposure Control
      5. 9.2.5 White Balance Control
      6. 9.2.6 Sensor Register Read/Write
  13. 10Summary
  14. 11Revision History

Tuning Overview

The ISP (VPAC) on the AM6xA family SoC is configured through the Dynamic Camera Configuration (DCC) binary files. In Linux® based applications, these binary files are provided to VPAC through the popular GStreamer pipeline. The processing blocks of VPAC are encapsulated by the GStreamer pipeline elements (tiovxisp, tiovxldc, tiovxmultiscaler) while all configurable parameters of VPAC are provided as properties.

For example, the following GStreamer pipeline performs video streaming from an IMX219 camera to an High-Definition Multimedia Interface (HDMI) display, using VPAC to process the raw images before sending them to the display:

gst-launch-1.0 v4l2src device=/dev/video-imx219-cam0 io-mode=dmabuf-import ! \
video/x-bayer, width=1920, height=1080, framerate=30/1, format=rggb10 ! \
tiovxisp sink_0::device=/dev/v4l-imx219-subdev0 \
sensor-name="SENSOR_SONY_IMX219_RPI" \
dcc-isp-file=/opt/imaging/imx219/dcc_viss_10b.bin \
sink_0::dcc-2a-file=/opt/imaging/imx219/dcc_2a_10b.bin format-msb=9 ! \
video/x-raw, format=NV12, width=1920, height=1080, framerate=30/1 ! \
kmssink driver-name=tidss sync=false

In the above pipeline, GStreamer element tiovxisp interfaces VPAC hardware and TI's reference software for imaging algorithms of AE and AWB (2A) and ISP parameter control. The VPAC configurations for IMX219 are provided through the following two binary files which are among the properties of tiovxisp:

  • dcc-isp-file=/opt/imaging/imx219/linear/dcc_viss_10b.bin for tuned ISP parameters
  • dcc-2a-file=/opt/imaging/imx219/linear/dcc_2a_10b.bin for AE and AWB algorithm calibration information

These binary files are the output of the ISP tuning, and are also referred as the Dynamic Camera Configuration (DCC) profiles.

As an overview, the AM6xA ISP tuning procedure includes the following steps (using TI's reference imaging software and tuning tool as an example):

  1. Hardware setup: Prepare and set up all necessary hardware equipment.
  2. Software setup: Download and install all necessary software components.
  3. Sensor software development and integration: Make sure the camera sensor driver is properly integrated with the system and can capture raw images. Add exposure configuration needed by the auto-exposure algorithm. Add support for this sensor to GStreamer plug-ins.
  4. Generating Initial ISP configuration: Run a Python® script to generate an initial (default, or baseline) DCC profile for VPAC configuration. This configuration can enable video streaming with image quality that is good enough to run the next step.
  5. Adjust camera mounting: Run live video streaming using the DCC profile generated in the previous step and adjust camera module mounting to make sure images are captured with good positioning, focus, lighting, and so on.
  6. ISP basic tuning: Capture raw images and perform basic tuning to achieve 70% to 80% of the best image quality under lab conditions.
  7. ISP fine tuning: Run live streaming again with the new DCC profile generated in the previous step. Based on image quality, identify what needs to be improved and perform additional fine tuning if necessary.

This application note uses the AM62A Starter Kit EVM with an IMX219 camera and an OX05B1S camera to demonstrate the above listed tuning steps. The principles and procedure of the tuning apply to any custom board and raw camera.