SIPL (Sensor Input Processing Library) 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>” --o1 <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 | Displays help text. | Display only if an invalid command line argument is found. |
-c <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 switch. |
-v <n> | Sets verbosity level. Supported values are 0 (none) to 4 (maximum verbosity). | 1 (errors) |
-f "<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. |
--frames-to-skip [s] | Skip(s) frames from the beginning of the file. | 0 |
--frames-to-save [n] | Saves [n] frames after skipped frames. | 0 If [n] is not specified, processing saves frames until the end of the input file. |
-i <file> | Specifies the RAW input file to process. | Required switch. |
--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 switch. |
-t "<file>" | Specifies a custom platform configuration JSON file. | - |
-l | Lists platform configurations defined in the file specified by the -t switch. | - |
--o1 <format> | Specifies the output format for processed images through ISP0 Supported formats: yuv420_8b, yuv_420_16b, yuv420_16b_709er, yuv444_8b, yuv_444_16b, yuv444_16b_709er, rgb_srgb_8b, rgb_srgb_16f, and rgb_sensor_16f. | If <format> is not specified, yuv420_8b. |
--o2 <format> | Specifies the output format for processed images through ISP1. See row above for supported formats | If <format> is not specified, yuv420_8b. |
--save-metadata | Saves metadata to file for each pipeline. | - |
--plugin <type> | Plugin used for control algorithm components. Accepts: 0: NVIDIA AE/AWB plugin ‘NV’ 1: Sample plugin ‘SAMPLE’ 2: Custom plugin ‘CUSTOM’ | NV |
--nito <file> | Specifies NVIDIA ISP tuning object to use. | - |
Interactive Menu Options
The following table shows the options provided by the interactive menu.
Option | Description |
q | Quits the application. |
Examples
The following examples show 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" --o1 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" --o1 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 -o1 yuv420_8b -save-metadata -s 6
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