NVIDIA Tegra
DRIVE 5.0 Linux Open Source Software

Development Guide
5.0.10.3 Release


 
NvMediaImage from RAW Image Sensor to CUDA Consumer on dGPU (nvmipp_bayerdgpu)
 
Command Line Options
Optional 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 image producer is the RAW data read from the image sensor. NvMedia IPP framework is used to read the image data. NvMediaICP component is used 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 (4) 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 their own thread. It is possible to enable virtual channels while capturing data from multiple cameras.
The output of CUDA consumer can be written to a file. Since the posted images contain RAW data, a simple demosaicing algorithm runs on the CUDA acquired surface and is down samples 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 x 1208 and the number of embedded lines is 28. The resolution of the CUDA output written to file is 960 x 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 the q command is given as input to quit the application.
Command Line Options
The following shows the command syntax:
./nvmipp_bayerdgpu [options]
Optional Options
The following table describes the required command line options.
Option
Parameter
Description
Default
-c
[name]
Parameters set name to be used for capture configuration.
N/A
-cf
[file]
Set configuration file.
configs/default.conf
-h
N/A
Prints usage and help menu.
N/A
--ext_sync
[duty_ratio]
Enables external synchronization. (AR0231 or OV10635 sensors only.)
0.25
-v
[level]
Specifies the logging level.
0 = Errors
1 = Warnings
2 = Info
3 = Debug
If no level is provided, uses 3 (Debug). If the option is not provided, uses 0 (Errors).
Default: 0
If the option is used, but the level is not provided, the default is 3.
-f
[file name]
Specifies the CUDA consumer output file name. The name is appended with _cam<idx>.rgba, where <idx> is the index of the camera used. If not specified, then the CUDA consumer acquires the image and releases it back to the producer and no output file is generated.
N/A
-lc
N/A
Prints the config sets available in the capture configuration file specified by the -cf option.
N/A
--aggregate
N/A
Specifies the number of cameras to use for capturing. This option is optional if reading from a single camera; otherwise, it is mandatory.
Default: 1
--vc_enable
N/A
If the -aggregate option is greater than 1, then virtual channels are used to capture data through CSI. It has no effect if -aggregate is 1. If this option is not specified when capturing from multiple cameras, then aggregated images are used for capturing.
N/A
--checkcrc
N/A
CRC is computed and compared for posted images on the producer side and acquired images on the consumer side. If there is a mismatch, then an error is printed after terminating the app by entering q. This works only when the -f option is specified and with multiple cameras with --vc_enable.
N/A
--show-timestamp
N/A
Show timestamp information. Needs -v option.
 
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:
./nvmipp_bayerdgpu -cf drive-px2-a.conf -c dvp-ar0231-rccb-raw12-1920x1208-ab
To run the app with one camera and written output to cuda_cam0.rgba
1. Enter:
./nvmipp_bayerdgpu -cf drive-px2-a.conf -c dvp-ar0231-rccb-raw12-1920x1208-ab -f cuda
To run the app with N cameras, where N=4
./nvmipp_bayerdgpu -cf drive-px2-a.conf -c dvp-ar0231-rccb-raw12-1920x1208-ab --aggregate 4 -f cuda