SPRAD86A March   2023  – May 2024 AM62A3 , AM62A3-Q1 , AM62A7 , AM62A7-Q1 , AM67A , 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

Generate Configuration Files

Go to TI's reference imaging software, imaging/tools/default_DCC_profile_gen/configs, and create a configuration file for default camera properties. Existing configuration files in this folder can be referenced.

Specify the following parameters in this configuration file:

  • Camera sensor information
    • SENSOR_ID: DCC ID of the sensor (this must match the hard coded "dccID" value in tiovx_sensor_module.c, as described in update GStreamer plug-in for VISS)
    • SENSOR_NAME: name of the sensor (this is for information only and not used by the tool)
    • SENSOR_DCC_NAME: corresponding DCC name (this is for information only and not used by the tool)
  • XML output folder
    • PRJ_DIR: folder to store the generated .xml files. This folder must be under imaging/sensor_srv/src, for example, ../../../sensor_drv/src/<sensor name>.
  • Raw image format information
    • SENSOR_WIDTH : sensor image width
    • SENSOR_HEIGHT : sensor image height
    • COLOR_PATTERN : Bayer pattern, where 0=RGGB; 1=GRBG; 2=GBRG; 3=BGGR, 4=MONO, 10=RGGI, 11=GRIG, 12=BGGI, 13=GBIG, 14=GIRG, 15=IGGR, 16=GIBG, 17=IGGB
    • WDR_MODE: sensor mode. 0=linear, 1=wdr
    • BIT_DEPTH : sensor pixel bit depth
    • WDR_BIT_DEPTH: WDR raw sensor image bit depth after decompanding, typically 20 or 24
    • WDR_KNEE_X and WDR_KNEE_Y: WDR decompanding knee points (must be separated by commas and have no spaces in between)
    • BLACK_PRE: Sensor black level to subtract before decompanding
    • BLACK_POST: Sensor black level to subtract after decompanding
    • GAMMA_PRE: GAMMA value for compressing 20-bit and 24-bit WDR raw to 16-bit ISP internal bit width. Typically around 50 (0.5) for 24-bit WDR sensors and 70 (0.7) for 20-bit sensors
    • H3A_INPUT_LSB: LSB location for H3A input bit range (from bit-H3A_INPUT_LSB to bit-H3A_INPUT_LSB+9)
Note: The above configuration information must match the actual sensor format.

Following is a configuration example for IMX219. The WDR related parameters are not used but must be included for the script to run.

SENSOR_ID 219
SENSOR_NAME IMX219
SENSOR_DCC_NAME SENSOR_IMX219_RPI
PRJ_DIR ../../../sensor_drv/src/imx219_output
SENSOR_WIDTH 1920
SENSOR_HEIGHT 1080

COLOR_PATTERN 0
WDR_MODE 0

BIT_DEPTH 10

WDR_BIT_DEPTH 20

WDR_KNEE_X 0,512
WDR_KNEE_Y 0,2048 

BLACK_PRE  0
BLACK_POST  0

GAMMA_PRE 70

H3A_INPUT_LSB 0

Once the configuration file is created, run the ctt_def_xml_gen.py Python script in imaging/tools/default_DCC_profile_gen/scripts as below:

imaging/tools/default_DCC_profile_gen/scripts$ python ctt_def_xml_gen.py ../configs/<configuration file>

The generated xml files are in the folder $PRJ_DIR/dcc_xml. A script file generate_dcc.sh is also generated in the xml folder. For example, below is the content of the xml folder for IMX219 (linear mode):

$PRJ_DIR/dcc_xmls/linear$ ls -l
generate_dcc.sh
imx219_awb_alg_ti3_tuning.xml
imx219_cfa_dcc.xml
imx219_h3a_aewb_dcc.xml
imx219_h3a_mux_luts_dcc.xml
imx219_linear_decompand_dcc.xml
imx219_mesh_ldc_dcc.xml
imx219_rgb2rgb_dcc.xml
imx219_viss_blc.xml
imx219_viss_nsf4.xml