DriveWorks SDK Reference
3.0.4260 Release
For Test and Development only

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


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 platforms.

Running the Sample

A camera must be connected to a USB port. The USB Camera Capture sample, sample_camera_usb, accepts the following parameters:

./sample_camera_usb --device=[integer]


        Is the device ID of the camera.
        Default value: 0

        Applicable for generic camera only. Specifies
        a method for selecting capture settings:
        `a`: choose mode with maximum resolution
        `b`: choose mode with maximum fps
        integer number: choose mode by index
        Default value: 0

        Specifies the path to the captured video.
        This option is only available on x86.
        Default value: none


To test the first camera present on the system


To test the third camera present on the system

./sample_camera_usb --device=2


The sample opens a window displaying the input from the camera.

Single consumer-grade USB camera capturing input

Additional information

For more details see Camera.