DriveWorks SDK Reference
3.0.4260 Release
For Test and Development only

Camera Sample
Note
SW Release Applicability: This sample is available in both NVIDIA DriveWorks and NVIDIA DRIVE Software releases.

Description

The Camera sample uses the dwSAL and dwSensorCamera interface, to setup physical GMSL cameras or virtual cameras and display on screen. Optionally the sample can also record 1 video in processed or raw

Setting Up The Cameras

For information about the physical location of the ports on NVIDIA DRIVE platforms, see "Camera Setup and Configuration" in NVIDIA DRIVE 5.1 Development Guide.

The camera parameters located in the rig file are described in section Creating and Using Camera

Running the sample

For default launch of the sample without parameters, a AR0231 SF3324 camera must be connected to csi-port A, link 0 of the NVIDIA DRIVE platform.

The sample, accepts the following parameters:

./sample_camera --rig=[path/to/rig/file]
                --write-file=[path/to/output/file]

Where:

--rig=[path/to/rig/file]
    Specifies the rig file which contains the camera descriptions.
    Default value: "{data dir}/samples/sensors/camera/camera/rig.json"
    Note that {data dir}/samples/sensors/camera/camera contains several
    example rigs for different configurations to experiment with

--write-file=[path/to/output/file]
    Specifies the output file. h264, h265, mp4 and raw formats are supported.
    If raw format is selected, then the master camera specified in the rig file
    must have raw output enabled. Raw recordings are then compatible for replay
    case (see RigReplay.json)
    If h264, h265 or mp4 is selected, then the master camera specified in the rig
    file must have processed enabled.
    If --write-file is not provided, no file is written out on disk.
    Default value: none

The content of the rig reflects the description of protocol usage and parameter setup listed under the Sensor Camera guide. By default the rigs provided setup the camera.gmsl protocol, however the sample is designed to handle other camera protocols, such as camera.virtual protocol for replay of raw files. Although the rig by default lists only one camera, simply following the rules of rig construction, it's possible to add up to 16 instance of cameras, live or virtual.

Since this sample only showcases functionality, only the camera with index 0 is recordable

Additionally it is possible to screenshot the current window by pressing S and save each individual camera image as a full resolution ong image by pressing F.