SIPL Reprocess (nvsipl_reprocess)

The NvMedia nvsipl_reprocess is a sample application that:
Reads RAW images from the file system.
Processes the RAW images through the Image Signal Processor (ISP).
Writes the processed images to the file system.

Running the Application

To run the sample on the target
1. Change to the folder that contains the nvsipl_reprocess binary:
samples/nvmedia/nvsipl/test/reprocess/
2. Enter the following command to launch the application:
$ ./nvsipl_reprocess -c "<platform>" --link-enable-masks “<mask>” --out0 <format> -i <input> --nito <file>
Where:
<platform> is the platform configuration name.
<mask> specifies a sensor from a given camera group.
<format> is the ISP output format.
<input> specifies the path of the RAW file to process.
<file> specifies the NVIDIA ISP Tuning Object to use.
The parameters above are required to run nvsipl_reprocess. The NVIDIA ISP Tuning Object (NITO) is a binary file containing ISP settings, tuning, and characterization parameters for a specific camera module. The NITO files are located at:
/opt/nvidia/nvmedia/nit
 
Sensor Module
Corresponding NITO file
SF3324_DPHY_x2
sf3324.nito
SF3324_CPHY_x2
sf3324.nito
SF3324_DPHY_x4
sf3324.nito
SF3324_CPHY_x4
sf3324.nito
SF3325_DPHY_x2
sf3325.nito
SF3325_CPHY_x2
sf3325.nito
SF3325_DPHY_x4
sf3325.nito
SF3325_CPHY_x4
sf3325.nito
 
Other sensor modules use default.nito, but
image quality cannot be guaranteed.

Command Line Switches

The following table shows the nvsipl_reprocess application’s command line switches.
All numeric arguments may be specified in decimal (e.g., 18) or hexadecimal (e.g., 0x12).
Switch
Description
Default Setting
-h or --help
Displays help text.
Display only if an invalid command line argument is found.
-c or --platform-config <name>
Specifies name of the platform configuration that describes the connection of image sensors to Xavier based platforms.
Supported configurations are displayed by the ‑h switch.
Required argument.
-t or --test-config-file <file>
Set custom platform config json file name.
Use default platform config.
-v or --verbosity <n>
Sets verbosity level. Supported values are 0 (none) to 4 (maximum verbosity).
1 (errors)
-f or --filedump-prefix "<prefix>"
Sets a prefix for the output files’ filenames.
The output files contain the processed images.
The names of the files created have the form:
<e>_<p>_cam_<s>.yuv
Where:
<e> is the prefix. It may begin with a pathname.
<p> contains the ISP output index.
<s> is the ID of the sensor that originated the images.
For example, if the prefix is /home/nvidia/test, the path name of the output file from Sensor0 processed by ISP1 is:
/home/nvidia/test_ISP1_cam_0.yuv
No output files are generated.
-s or --frames-to-skip <s>
Skip <s> frames from the beginning of the file.
No frame skipping.
-n or --frames-to-save <n>
Saves <n> frames after skipped frames.
Processing saves frames until the end of the input file.
-i or --input-raw-file <file>
Specifies the RAW input file to process.
Required argument.
-m or --link-enable-masks <m‑AB> <m-CD> <m-EF> <m-GH>
Specifies the position of sensor at the time of raw capture. The application retrieves the configuration of the sensor using the mask.
This application only supports one link at a time.
e.g., ‘0x0000 0x0001 0x0000 0x0000’ specifies link 0 connected to the CSI-CD interface.
Required argument.
--icrop <y+h>
Specifies the cropping at the input in the format <y+h>.
 
-l or --list-configs
List configs from file specified via -t or --test-config-file
 
--out0 <format>
Specifies the output format for processed images through ISP0.
Supported formats: yuv420_8b (BL), yuv420_8b_pl, yuv420_16b_709er (BL), yuv420_16b_709er_pl, yuv444_8b, yuv444_16b_709er, yuv444_8b_bl.
At least one of either --out0 <format> or
--out1 <format> must be present.
--out1 <format>
Specifies the output format for processed images through ISP1.
Supported formats: rgb_sensor_16f.
At least one of either --out0 <format> or
--out1 <format> must be present.
--out0size <wxh>
Specifies the downscale output0 size in the format of <wxh>.
If argument is not given, no downscaling occurs.
--out1size <wxh>
Specifies the downscale output1 size in the format of <wxh>.
If argument is not given, no downscaling occurs.
--out0crop <x+y+wxh>
Specifies the cropping of output0 size after downscaling.
If argument is not given, no cropping occurs.
--out1crop <x+y+wxh>
Specifies the cropping of output1 size after downscaling.
If argument is not given, no cropping occurs.
--save-metadata
Saves metadata to file for each pipeline.
-
--header-skip <s1,s2>
Skips <s1> bytes in the file header and <s2> bytes in each frame header.
If option not specified, <s1> and <s2> are both 0.
--plugin <type>
Plugin used for control algorithm components. Accepts:
NV: NVIDIA AE/AWB plugin
SAMPLE: Sample plugin
CUSTOM: Custom plugin
NV
--nito <file>
Specifies NVIDIA ISP tuning object <file> to use.
Required argument.

Examples of Different Platform Configurations

Platform Configuration: SF3324 Module in Two-Lane DPHY Mode

Example: Use link 0 of group AB with RAW stream
$ nvsipl_reprocess -c "SF3324_DPHY_x2" --link-enable-masks "0x0001 0x0000 0x0000 0x0000" --out0 yuv420_8b -i input.raw --nito sf3324.nito -f “output”
This command specifies SF3324 modules on link 0 of the deserializer on camera group AB.

Platform Configuration: SF3325 Module in Two-Lane DPHY Mode

Example: Use link 1 of group CD with RAW stream
$ nvsipl_reprocess -c "SF3325_DPHY_x2" --link-enable-masks "0x0000 0x0010 0x0000 0x0000" --out0 yuv420_8b -i input.raw --nito sf3325.nito -f “output”
This command specifies SF3325 modules on link 1 of the deserializer on camera group CD.

Saving Metadata to a File

To save metadata to a file, add the --save-metadata argument when running nvsipl_reprocess. The metadata file gets saved in the format <prefix>_<isp>_cam_<id>_meta.txt.
Example: Saving Metadata from a SF3325 Module in two-lane DHPY mode
$ ./nvsipl_reprocess -c "SF3325_DPHY_x2" -m "0000 0000 0000 0001" -i input_file.raw –-out0 yuv420_8b ––save-metadata --nito sf3325.nito -f “output”
Sample metadata output:
Camera ID: 12
Number of exposures: 3
Sensor exposure block valid: TRUE
Exposure Time T1: 0.017088
Exposure Time T2: 0.001034
Exposure Time T3: 0.000067
Sensor gain block valid: TRUE
Sensor Gain T1: 2.900000
Sensor Gain T2: 2.900000
Sensor Gain T3: 2.900000
White balance block valid: TRUE
White Balance Gain T1 for:
R component: 1.500000
Gr component: 1.000000
Gb component: 1.000000
B component: 1.500000
White Balance Gain T2 for:
R component: 1.500000
Gr component: 1.000000
Gb component: 1.000000
B component: 1.500000
White Balance Gain T3 for:
R component: 1.500000
Gr component: 1.000000
Gb component: 1.000000
B component: 1.500000
Sensor PWL block valid: FALSE
CRC block valid: FALSE
Frame Report block valid: FALSE
Temperature block valid: FALSE