Developer Guide Release

RAW Data to CUDA Consumer on dGPU (nvmipp_bayerdgpu)
Command Line Options
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 Options
The application’s command syntax is:
./nvmipp_bayerdgpu -cf <pathname> -c <setname>] [optional]
<pathname> specifies the pathname of the application’s configuration file. See the ‑cf option, described below.
<set> specifies the name of a configuration set defined in the configuration file. See the ‑c option, described, below, and Configuration Sets Defined in the Configuration File in Image Camera Capture.
Optional are zero or more optional command line parameters described in the second table below.
This table describes the command line options:
Prints a help menu for the application.
-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 option is omitted, 0. If the option used, but <level> is not specified, 3.
Includes timestamp information in logged output. May be used only with the ‑v option.
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.
Prints the configuration sets available in the capture configuration file specified by the -cf option.
Specifies the number of cameras to use for capturing.
If the ‑-aggregate option is greater than 1, virtual channels are used to capture data through CSI. The parameter has no effect if ‑-aggregate is 1.
When capturing from multiple cameras, aggregated images are used for capturing.
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 option is specified and with multiple cameras with --vc_enable.
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