NVIDIA Tegra
DRIVE 5.0 Linux Open Source Software

Development Guide
5.0.10.3 Release


 
IPP Sensor Statistics Control (nvmipp_ssc)
 
Architecture
Constructing an IPP Pipeline
Threads
Configuration File Parameters
Command Line Options
Required Options
Other Options
Runtime Options
Example Commands
Parameter Map on Tegra A
Parameter Map on Tegra B
Troubleshooting Video Link Errors
The NvMedia IPP Sensor Statistics Control (SSC) sample application nvmipp_ssc demonstrates how to use NvMedia IPP components to build IPP pipelines and embedded sensor statistics for image sensor control. The application features an NvMedia IPP Control Algorithm Component that utilizes embedded sensor statistics for image sensor control and concurrent frame capture from multiple sensors, as well as image display and recording.
In case of multiple sensors, nvmipp_ssc writes respective frames to individual files and can cycle through the captured frames on display via a runtime command. The display frames are converted from RAW format (in RCCB pixel order) to RGBA. The conversion occurs in the CPU.
nvmipp_ssc is compatible only with the AR0231 RCCB sensor. The application requires user-provided command line input with:
A configuration file
A capture parameter set
The configuration file contains multiple capture parameter sets, one of which is used in the command line. Due to its sole compatibility with the AR0231 RCCB sensor, the only permitted parameter sets are:
dvp-ar0231-rccb-raw12-1920x1208-ab
dvp-ar0231-rccb-raw12-1920x1208-cd
dvp-ar0231-rccb-raw12-1920x1208-ef
Architecture
The following diagram provides an overview of the nvmipp_ssc application process.
 
Constructing an IPP Pipeline
nvmipp_ssc provides an example on how to build IPP pipelines and process raw data from cameras. Each IPP SSC pipeline consists of:
Image Capture Processing (ICP)
Image Sensor Control (ISC)
Control Algorithm
Output
The following diagram shows the system when two IPP pipelines are constructed.
Threads
While only one ICP component is created and attached to all pipelines, each NvMedia IPP component is an individual thread. The exception is the Output component, which runs in the Main thread. In addition to NvMedia IPP threads, the following threads are used:
Main thread
Output image consumer thread (one per pipeline)
Main Thread
The main thread:
Parses command line options
Constructs IPP pipelines
Starts EGL Producer and GL Consumer
After IPP pipelines are started, the main thread processes user input in interactive mode. When the user quits, the main thread does the following:
Stops the pipelines and output consumer threads.
Releases resources.
Configuration File Parameters
The configuration file structure consists of parameters assigned with values, groups of parameters or sections, and comments.
Each configuration file must start with a list of configuration parameters. These parameters are used by the application to determine the capture settings. The required parameters are:
Interface: <type>
Input Format: <format>
Resolution: <resolution>
CSI Lanes: <number of lanes>
I2C Device: <device number>
Sensor Address: <address>
Interface specifies the CSI interface type used. Input Format specifies the format the sensor is capturing images. Resolution specifies the resolution the sensor is capturing. This includes embedded lines. CSI Lanes specifies the number of CSI lanes used. I2C Device specifies the ID of the I2C device that is connected to the aggregator. Sensor address specifies the address of the sensor used for I2C.
You can also provide optional configuration parameters:
Surface Format: <surface format>
Max9286 Address: <address>
Surface Format specifies the CSI surface format. If this is not provided, the application chooses a default surface format based on the input format. The Max9286 address provides additional debug information by dumping the registers of the aggregator.
The following is an example configuration for the p2382 board:
Interface: csi-ab
Input Format: raw12
Resolution: 1920x1208
CSI Lanes: 4
I2C Device: 7
Sensor Address: 0x10
Max9286 Address: 0x6A
Command Line Options
The following shows the command syntax:
./nvmipp_ssc -cf [filename] -c [name] [options]
Required Options
The following table describes the required command line options.
Option
Parameter
Description
-cf
[filename]
Specifies the configuration file.
Co-locate the file with nvmipp_scc.
-c
[name]
Specifies the parameters set name.
In some cases, *.conf files specifies multiple parameter sets. This option identifies the set to use in the `*.conf` file specified with the -cf option.
Other Options
The following table describes the required command line options.
Option
Parameter
Description
Default
-h
N/A
Prints usage and help menu.
N/A
--ext_sync
[duty_ratio]
Enables external syncrhonization. (AR0231 or OV10635 sensors only.)
0.25
-v
[level]
Logging level = 0 (Errors) 1 (Warnings) 2 (Information) 3 (Debug)If no level is provided, defaults to 3.
0
-lc
N/A
Lists the available configuration parameter sets.
N/A
-d
[id]
Enables the display. If provided, uses the display with the specified ID.
 
Display is disabled.
If ID is not provided, the sample uses the first display available.
--aggregate
[n]
Specifies the number of aggregated images.
Default: n = 1
-f
[filename]
Writes frames from each sensor to a separate file named from the provided file prefix.
Default: Image writing is disabled.
-w
[n]
Set display window ID [0-2].
Default: 0
-z
[n]
Set display window depth [0-255].
Default: 0
--show-timestamp
N/A
Shows timestamp information. Requires -v option.
N/A
Runtime Options
While nvmipp_ssc is running, it accepts the following commands:
Command
Default
h
Prints the available commands.
q
Quits the application.
c
Cycles the sensor image on display.
Example Commands
This topic explains how to perform commonly performed tasks that use a multiple cameras.
To run the sample and display the results
Enter the command that you obtain from Parameter Map on Tegra A or Parameter Map on Tegra B (follows), depending on the Tegra where you enter the command. For example:
./nvmipp_ssc -cf drive-px2-a.conf -c dvp-ar0231-rccb-raw12-1920x1208-ab -d 0 -w 1 --aggregate 1
Parameter Map on Tegra A
The following table show the parameters map to the Camera CSI physical group on the DRIVE PX 2 for Tegra A for the supported camera types.
Camera Group
Camera Type
Number of Cameras
Command Set
A
AR0231 RCCB
(Module name:
SS3322)
1
./nvmipp_ssc -cf drive-px2-a.conf -c dvp-ss3322-rccb-raw12-1920x1208-ab -d 0 --aggregate 1 -w 1
4
./nvmipp_ssc -cf drive-px2-a.conf -c dvp-ss3322-rccb-raw12-1920x1208-ab -d 0 --aggregate 4 -w 1
AR0231 RCCB
(Module name:
SS3323)
1
./nvmipp_ssc -cf drive-px2-a.conf -c dvp-ss3323-rccb-raw12-1920x1208-ab -d 0 --aggregate 1 -w 1
4
./nvmipp_ssc -cf drive-px2-a.conf -c dvp-ss3323-rccb-raw12-1920x1208-ab -d 0 --aggregate 4 -w 1
Continental OV10640 (Module name: SVC210)
1
./nvmipp_ssc -cf drive-px2-a.conf -c dvp-svc210-raw12-1280x1080-ab -d 0 --aggregate 1 -w 1
4
./nvmipp_ssc -cf drive-px2-a.conf -c dvp-svc210-raw12-1280x1080-ab -d 0 --aggregate 4 -w 1
Continental OV10640 (Module name: SVC212)
1
./nvmipp_ssc -cf drive-px2-a.conf -c dvp-svc212-raw12-1280x1080-ab -d 0 --aggregate 1 -w 1
4
./nvmipp_ssc -cf drive-px2-a.conf -c dvp-svc212-raw12-1280x1080-ab -d 0 --aggregate 4 -w 1
B
AR0231 RCCB
(Module name:
SS3322)
1
./nvmipp_ssc -cf drive-px2-a.conf -c dvp-ss3322-rccb-raw12-1920x1208-ab -d 0 --aggregate 1 -w 1
4
./nvmipp_ssc -cf drive-px2-a.conf -c dvp-ss3322-rccb-raw12-1920x1208-ab -d 0 --aggregate 4 -w 1
AR0231 RCCB
(Module name:
SS3323)
1
./nvmipp_ssc -cf drive-px2-a.conf -c dvp-ss3323-rccb-raw12-1920x1208-ab -d 0 --aggregate 1 -w 1
4
./nvmipp_ssc -cf drive-px2-a.conf -c dvp-ss3323-rccb-raw12-1920x1208-ab -d 0 --aggregate 4 -w 1
Continental OV10640 (Module name: SVC210)
1
./nvmipp_ssc -cf drive-px2-a.conf -c dvp-svc210-raw12-1280x1080-ab -d 0 --aggregate 1 -w 1
4
./nvmipp_ssc -cf drive-px2-a.conf -c dvp-svc210-raw12-1280x1080-ab -d 0 --aggregate 4 -w 1
Continental OV10640 (Module name: SVC212)
1
./nvmipp_ssc -cf drive-px2-a.conf -c dvp-svc212-raw12-1280x1080-ab -d 0 --aggregate 1 -w 1
4
./nvmipp_ssc -cf drive-px2-a.conf -c dvp-svc212-raw12-1280x1080-ab -d 0 --aggregate 4 -w 1
C
AR0231 RCCB
(Module name:
SS3322)
1
./nvmipp_ssc -cf drive-px2-a.conf -c dvp-ss3322-rccb-raw12-1920x1208-ab -d 0 --aggregate 1 -w 1
4
./nvmipp_ssc -cf drive-px2-a.conf -c dvp-ss3322-rccb-raw12-1920x1208-ab -d 0 --aggregate 4 -w 1
AR0231 RCCB
(Module name:
SS3323)
1
./nvmipp_ssc -cf drive-px2-a.conf -c dvp-ss3323-rccb-raw12-1920x1208-ab -d 0 --aggregate 1 -w 1
4
./nvmipp_ssc -cf drive-px2-a.conf -c dvp-ss3323-rccb-raw12-1920x1208-ab -d 0 --aggregate 4 -w 1
Continental OV10640 (Module name: SVC210)
1
./nvmipp_ssc -cf drive-px2-a.conf -c dvp-svc210-raw12-1280x1080-ab -d 0 --aggregate 1 -w 1
4
./nvmipp_ssc -cf drive-px2-a.conf -c dvp-svc210-raw12-1280x1080-ab -d 0 --aggregate 4 -w 1
Continental OV10640 (Module name: SVC212)
1
./nvmipp_ssc -cf drive-px2-a.conf -c dvp-svc212-raw12-1280x1080-ab -d 0 --aggregate 1 -w 1
4
./nvmipp_ssc -cf drive-px2-a.conf -c dvp-svc212-raw12-1280x1080-ab -d 0 --aggregate 4 -w 1
Parameter Map on Tegra B
The following table show the parameters map to the Camera CSI physical group on the DRIVE PX 2 for Tegra B for the supported camera types.
Camera Group
Camera Type
Number of Cameras
Command Set
A
AR0231 RCCB
(Module name:
SS3322)
1
./nvmipp_ssc -cf drive-px2-b.conf -c dvp-ss3322-rccb-raw12-1920x1208-ab -d 0 --aggregate 1 -w 1
4
./nvmipp_ssc -cf drive-px2-b.conf -c dvp-ss3322-rccb-raw12-1920x1208-ab -d 0 --aggregate 4 -w 1
AR0231 RCCB
(Module name:
SS3323)
1
./nvmipp_ssc -cf drive-px2-b.conf -c dvp-ss3323-rccb-raw12-1920x1208-ab -d 0 --aggregate 1 -w 1
4
./nvmipp_ssc -cf drive-px2-b.conf -c dvp-ss3323-rccb-raw12-1920x1208-ab -d 0 --aggregate 4 -w 1
Continental OV10640 (Module name: SVC210)
1
./nvmipp_ssc -cf drive-px2-b.conf -c dvp-svc210-raw12-1280x1080-ab -d 0 --aggregate 1 -w 1
4
./nvmipp_ssc -cf drive-px2-b.conf -c dvp-svc210-raw12-1280x1080-ab -d 0 --aggregate 4 -w 1
Continental OV10640 (Module name: SVC212)
1
./nvmipp_ssc -cf drive-px2-b.conf -c dvp-svc212-raw12-1280x1080-ab -d 0 --aggregate 1 -w 1
4
./nvmipp_ssc -cf drive-px2-b.conf -c dvp-svc212-raw12-1280x1080-ab -d 0 --aggregate 4 -w 1
B
AR0231 RCCB
(Module name:
SS3322)
1
./nvmipp_ssc -cf drive-px2-b.conf -c dvp-ss3322-rccb-raw12-1920x1208-ab -d 0 --aggregate 1 -w 1
4
./nvmipp_ssc -cf drive-px2-b.conf -c dvp-ss3322-rccb-raw12-1920x1208-ab -d 0 --aggregate 4 -w 1
AR0231 RCCB
(Module name:
SS3323)
1
./nvmipp_ssc -cf drive-px2-b.conf -c dvp-ss3323-rccb-raw12-1920x1208-ab -d 0 --aggregate 1 -w 1
4
./nvmipp_ssc -cf drive-px2-b.conf -c dvp-ss3323-rccb-raw12-1920x1208-ab -d 0 --aggregate 4 -w 1
Continental OV10640 (Module name: SVC210)
1
./nvmipp_ssc -cf drive-px2-b.conf -c dvp-svc210-raw12-1280x1080-ab -d 0 --aggregate 1 -w 1
4
./nvmipp_ssc -cf drive-px2-b.conf -c dvp-svc210-raw12-1280x1080-ab -d 0 --aggregate 4 -w 1
Continental OV10640 (Module name: SVC212)
1
./nvmipp_ssc -cf drive-px2-b.conf -c dvp-svc212-raw12-1280x1080-ab -d 0 --aggregate 1 -w 1
4
./nvmipp_ssc -cf drive-px2-b.conf -c dvp-svc212-raw12-1280x1080-ab -d 0 --aggregate 4 -w 1
C
AR0231 RCCB
(Module name:
SS3322)
1
./nvmipp_ssc -cf drive-px2-b.conf -c dvp-ss3322-rccb-raw12-1920x1208-ab -d 0 --aggregate 1 -w 1
4
./nvmipp_ssc -cf drive-px2-b.conf -c dvp-ss3322-rccb-raw12-1920x1208-ab -d 0 --aggregate 4 -w 1
AR0231 RCCB
(Module name:
SS3323)
1
./nvmipp_ssc -cf drive-px2-b.conf -c dvp-ss3323-rccb-raw12-1920x1208-ab -d 0 --aggregate 1 -w 1
4
./nvmipp_ssc -cf drive-px2-b.conf -c dvp-ss3323-rccb-raw12-1920x1208-ab -d 0 --aggregate 4 -w 1
Continental OV10640 (Module name: SVC210)
1
./nvmipp_ssc -cf drive-px2-b.conf -c dvp-svc210-raw12-1280x1080-ab -d 0 --aggregate 1 -w 1
4
./nvmipp_ssc -cf drive-px2-b.conf -c dvp-svc210-raw12-1280x1080-ab -d 0 --aggregate 4 -w 1
Continental OV10640 (Module name: SVC212)
1
./nvmipp_ssc -cf drive-px2-b.conf -c dvp-svc212-raw12-1280x1080-ab -d 0 --aggregate 1 -w 1
4
./nvmipp_ssc -cf drive-px2-b.conf -c dvp-svc212-raw12-1280x1080-ab -d 0 --aggregate 4 -w 1
 
Troubleshooting Video Link Errors
This topic explains how to troubleshoot video-link errors.
Several situations can cause generic video link errors.
Test Command:
./nvmipp_ssc -cf drive-px2-b.conf -c dvp-ar0231-rccb-raw12-1920x1208-ef -d 0 -w 1 --aggregate 4
Error Messages:
nvmedia: ERROR: SetupVideoLink: Can't detect config link(0)
nvmedia: ERROR: Init: Failed to setup video link
nvmedia: ERROR: main: Failed to initialize ISC device
Possible Causes
Possible causes include the following:
One or more cameras are not connected to the right CSI port or not started at port numbered 0. The number of cameras connected must match the number specified in the --aggregate option.
The type of sensor connected and the configuration parameter specified in the command line conflict.
One of the cameras failed to start or is not functioning.