DriveWorks SDK Reference
4.0.0 Release
For Test and Development only

samples/sensors/camera/camera_usb/README.md
Go to the documentation of this file.
1 # Copyright (c) 2019-2020, NVIDIA CORPORATION. All rights reserved.
2 
3 @page dwx_camera_usb_sample USB Camera Capture Sample
4 @tableofcontents
5 
6 @section dwx_camera_usb_sample_description Description
7 
8 The USB Camera Capture sample captures video input from USB cameras, and displays the output in an opened window. This sample is compatible with Linux and NVIDIA DRIVE<sup>&trade;</sup> platforms.
9 
10 @section dwx_camera_usb_sample_running Running the Sample
11 
12 A camera must be connected to a USB port.
13 The USB Camera Capture sample, sample_camera_usb, accepts the following parameters:
14 
15  ./sample_camera_usb --device=[integer]
16  --mode=[a|b|integer]
17  --record-file=[path/to/output/file]
18 
19 Where:
20 
21  --device=[integer]
22  Is the device ID of the camera.
23  Default value: 0
24 
25  --mode=[a|b|integer]
26  Applicable for generic camera only. Specifies
27  a method for selecting capture settings:
28  `a`: choose mode with maximum resolution
29  `b`: choose mode with maximum fps
30  integer number: choose mode by index
31  Default value: 0
32 
33  --record-file=[path/to/output/file]
34  Specifies the path to the captured video.
35  This option is only available on x86.
36  Default value: none
37 
38 @subsection dwx_camera_usb_sample_examples Examples
39 
40 #### To test the first camera present on the system
41 
42  ./sample_camera_usb
43 
44 #### To test the third camera present on the system
45 
46  ./sample_camera_usb --device=2
47 
48 @section dwx_camera_usb_sample_output Output
49 
50 The sample opens a window displaying the input from the camera.
51 
52 ![Single consumer-grade USB camera capturing input](sample_camera_usb.png)
53 
54 @section dwx_camera_usb_sample_more Additional information
55 
56 For more details see @ref camera_mainsection.