NVIDIA Tegra
NVIDIA DRIVE OS 5.1 Linux SDK

Developer Guide
5.1.9.0 Release


 
RAW Data to CUDA Consumer on dGPU (nvmipp_bayerdgpu)
 
Command Line Switches
Example Commands
The NvMedia dGPU sample application, nvmipp_bayerdgpu, demonstrates how to post RAW data coming from an image sensor to a CUDA consumer running on dGPU. This application is also an NvMedia image producer and CUDA consumer combination, similar to nvm_egldgpu. The data posted by the image producer is the RAW data read from the image sensor. The application uses the NvMedia IPP framework to read the image data, and the NvMediaICP component to get the RAW data from the image sensor.
nvmipp_bayerdgpu runs in single process mode only. One instance of the application can run up to four cameras. There is one image producer and one CUDA consumer corresponding to the output of each camera. Each image producer and CUDA consumer component runs in its own thread. It is possible to enable virtual channels while capturing data from multiple cameras.
The application can write the output of the CUDA consumer to a file. Since the posted images contain RAW data, a simple demosaicing algorithm runs on the CUDA acquired surface and downsamples by 2 in both the horizontal and vertical direction. The format of the CUDA output is in RGBA format, interleaved 4:4:4, 8 bits per pixel. The default output size of the AR0231 sensor is 1920×1208, and the number of embedded lines is 28. The resolution of the CUDA output written to the file is 960×618. You can view the file with any RGBA file viewer (for example, vooya) with the information mentioned above.
Once started, this application continues to stream captured data until you enter the q command to quit the application.
Command Line Switches
The application’s command syntax is:
./nvmipp_bayerdgpu -cf <pathname> -c <setname>] [optional]
Where:
<pathname> specifies the pathname of the application’s configuration file. See the ‑cf switch, described below.
<set> specifies the name of a configuration set defined in the configuration file. See the ‑c switch, described, below, and Configuration Sets Defined in the Configuration File in Image Camera Capture.
optional represents zero or more optional switches. A of the switches in the table below are optional except ‑cf and ‑c.
This table describes the command line switches:
Switch
Description
Default
-h
Prints a help menu for the application.
N/A
-cf <pathname>
Specifies pathname of the application’s configuration file.
The configuration file for nvmipp_bayerdgpu is defined the same way as the one for nvmimg_cap. See Configuration Sets Defined in the Configuration File in the topic Image Camera Capture (nvmimg_cap) for more information.
N/A; required
-c <setname>
Specified name of a configuration set defined in the configuration file.
N/A; required
-v <level>
Specifies logging level. Value may be:
0 = Errors
1 = Warnings
2 = Info
3 = Debug
If the switch is omitted, 0. If the switch specified, but <level> is not specified, 3.
--show-timestamp
Includes timestamp information in logged output. May be used only with the ‑v switch.
Timestamps are not included in logged output.
-f <file>
Specifies the CUDA consumer output filename. The name is suffixed with _cam<idx>.rgba, where <idx> is the index of the camera used.
CUDA consumer acquires the image and releases it back to the producer. No output file is generated.
-lc
Prints the configuration sets available in the capture configuration file specified by the -cf switch.
N/A
--aggregate <n>
Treat captured frames as an aggregated image with <n> siblings.
1
--ext_sync <n>
Enables external synchronization with a duty ratio of <n>, where 0.0 < <n> < 1.0.
If out of range, 0.25.
If not specified, as set by aggregator.
--checkcrc
CRC is computed and compared for posted images on the producer side and acquired images on the consumer side. If there is a mismatch, the application prints an error message when it is terminated by entering q. This works only if the -f switch is specified.
N/A
Example Commands
This topic explains how to perform common tasks with nvmipp_bayerdgpu.
To run the app with one camera and no written output to file
Enter the command:
./nvmipp_bayerdgpu -cf ddpx-a.conf -c SF3324-CSI-A
To run the app with one camera and written output to cuda_cam0.rgba
Enter the command:
./nvmipp_bayerdgpu -cf ddpx-a.conf -c SF3324-CSI-A -f cuda
To run the app with N cameras, where N=4
Enter the command:
./nvmipp_bayerdgpu -cf ddpx-a.conf -c SF3324-CSI-A --aggregate 4 -f cuda