DriveWorks SDK Reference
4.0.0 Release
For Test and Development only

samples/sensors/camera/camera/README.md
Go to the documentation of this file.
1 # Copyright (c) 2020-2021 NVIDIA CORPORATION. All rights reserved.
2 
3 @page dwx_camera_sample Camera Sample
4 
5 @tableofcontents
6 
7 @section dwx_camera_sample_description Description
8 
9 The Camera sample uses the `dwSAL` and `dwSensorCamera` interface to setup physical GMSL cameras or virtual cameras, and display their data on screen. The sample can also record videos in a processed or RAW format.
10 
11 @subsection dwx_camera_setup Setting Up The Cameras
12 
13 For information regarding the physical location of the ports on NVIDIA DRIVE
14 platforms, please refer to "Camera Setup and Configuration" in the _NVIDIA DRIVE 5.1
15 Development Guide_.
16 
17 The camera parameters located in the rig file are described in section @ref camera_mainsection_camera_creation
18 
19 @section dwx_camera_sample_running Running the Sample
20 
21 To launch the sample by default without parameters, connect an AR0231 SF3324 camera to csi-port A, link 0 on your NVIDIA DRIVE platform.
22 
23 The Camera sample, sample_camera, accepts the following parameters:
24 
25  ./sample_camera --rig=[path/to/rig/file]
26  --write-file=[path/to/output/file]
27 
28 Where:
29 
30  --rig=[path/to/rig/file]
31  Specifies the rig file containing the camera descriptions.
32  Default value: "{data dir}/samples/sensors/camera/camera/rig.json"
33  Note: {data dir}/samples/sensors/camera/camera contains several
34  example rigs for different configurations to experiment with.
35 
36  --write-file=[path/to/output/file]
37  Specifies the output file, where h264, h265, mp4 and RAW formats are supported.
38  If the RAW format is selected, ensure the master camera specified in the rig file
39  has RAW output enabled. RAW recordings are then compatible for replay
40  case (see RigReplay.json).
41  If h264, h265 or mp4 formats are selected, ensure the master camera specified in the rig
42  file has `processed` enabled.
43  If --write-file is not provided, no file is written out on disk.
44  Default value: none
45 
46 The content of the rig reflects the description of protocol usage and parameter setup listed under the Sensor Camera guide.
47 By default the rigs provided setup the `camera.gmsl` protocol, however the sample is designed to handle other camera protocols, such as
48 `camera.virtual` protocol for replay of raw files. Although the rig by default lists only one camera, simply following the rules of rig
49 construction, it's possible to add up to 16 instance of cameras, live or virtual.
50 
51 Since this sample only showcases functionality, only the camera with index 0 is recordable.
52 
53 Additionally, it is possible to screenshot the current window by pressing S and saving each individual camera image as a full resolution .png image
54 by pressing F.