Main Content

Camera

Capture video from a USB or CSI camera connected to the NVIDIA target

  • Library:
  • NVIDIA Jetson and NVIDIA DRIVE / Audio and Video

  • NVIDIA Camera block

Description

Capture live video from a USB or CSI camera. The output is in row major format. During simulation, the model outputs a moving colorbar image.

Install the GStreamer library, V4L2 library, and V4L2 utilities on the target. You must also install the development packages for these libraries. For more information, see Install and Setup Prerequisites for NVIDIA Boards

Ports

Output

expand all

This port outputs the red component of each pixel.

Data Types: uint8

This port outputs the green component of each pixel.

Data Types: uint8

This port outputs the blue component of each pixel.

Data Types: uint8

Parameters

expand all

Enter the path and name of the video device.

The Linux® kernel creates a video device file when you connect a supported USB or CSI video camera to the target hardware. To see the list of video device files, open a command line session with the target hardware and enter: ls -al /dev/video*.

Programmatic Use

Block Parameter: CameraName
Type: character vector
Values: valid name|
Default: 'My Camera'

Specify the display resolution of the image to be captured, in pixels.

Programmatic Use

Block Parameter: ImageSize
Type: character vector
Values: [width, height]|
Default: '[320, 240]'

Select the sample time of the video device.

Smaller values require the processor to complete the same number of instructions in less time, which can cause task overruns.

Programmatic Use

Block Parameter: SampleTime
Type: character vector
Values: scalar | vector
Default: '0.1'
Introduced in R2020b