Configuring Sensor Settings

The Tegra camera framework creates a Video4Linux device (e.g. /dev/video0) for each camera, which allows raw image acquisiton and configuration of camera settings.

Controls Shared by All Sensor Types

Please note that not every control is available for every camera model. For example, some image sensor’s do not support trigger mode. Other controls might not be available because the camera does not have I/O connectors.

For menu-type controls, not every menu entry is necessarily supported by every camera model.

Control

Identifier

Type

Unit

Values

Exposure

TEGRA_CAMERA_CID_EXPOSURE

integer64

µs

Gain

TEGRA_CAMERA_CID_GAIN

integer64

dB/10

Black Level

TIS_SENSOR_CID_BLACK_LEVEL

integer

Trigger Mode

TIS_SENSOR_CID_TRIGGER_MODE

menu

On, Off

Strobe Mode

TIS_SENSOR_CID_STROBE_MODE

menu

Exposure

Trigger Software

TIS_SENSOR_CID_TRIGGER_SOFTWARE

button

Trigger Source

TIS_SENSOR_CID_TRIGGER_SOURCE

menu

FPD-Link, PicoBlade, GPIO

Trigger In Polarity

TIS_SENSOR_CID_TRIGGER_IN_POLARITY

menu

Default, Inverted

GPOut Mode

TIS_SENSOR_CID_GPOUT_MODE

menu

Open Drain, TTL

GPOut Function

TIS_SENSOR_CID_GPOUT_FUNCTION

menu

Constant Low, Constant High, Strobe, Sync Out

Offset X

TIS_SENSOR_CID_OFFSET_X

integer

Pixels

Offset Y

TIS_SENSOR_CID_OFFSET_Y

integer

Pixels

Offset Auto Center

TIS_SENSOR_CID_OFFSET_AUTO_CENTER

boolean

Sensor Temperature

TIS_SENSOR_CID_SENSOR_TEMPERATURE

integer

m°C

Device Serial Number

TIS_SENSOR_CID_DEVICE_SERIAL_NUMBER

string

Device Model Name

TIS_SENSOR_CID_DEVICE_MODEL_NAME

string

Device Vendor Name

TIS_SENSOR_CID_DEVICE_VENDOR_NAME

string

device_valid

TIS_SENSOR_CID_DEVICE_VALID

boolean

Note

TEGRA_CAMERA_CID_-constants and related structures are defined in tegra-v4l2-camera.h, which is installed in /usr/src on JetPack images. TIS_SENSOR_CID_-constants are defined in tis_sensor_ctrl_ids.h, which is installed in /opt/theimagingsource/include after driver installation.

Standard Camera controls

Exposure Time

The Exposure control configures the exposure time of the sensor.

Control

Exposure Time

Name

Exposure

Identifier

TEGRA_CAMERA_CID_EXPOSURE

Type

V4L2_CTRL_TYPE_INTEGER64

Unit

µs

Minimum

Sensor-specific

Maximum

Sensor-specific

Gain

The Gain control configured both analog and digital image signal amplification done by the sensor.

Control

Gain

Name

Gain

Identifier

TEGRA_CAMERA_CID_GAIN

Type

V4L2_CTRL_TYPE_INTEGER64

Unit

dB / 10

Minimum

Sensor-specific

Maximum

Sensor-specific

Custom Camera controls

Black Level

The Black Level control defines the lowest possible intensity value read from the image sensor.

Control

Gain

Name

Black Level

Identifier

TIS_SENSOR_CID_BLACK_LEVEL

Type

V4L2_CTRL_TYPE_INTEGER

Minimum

Sensor-specific

Maximum

Sensor-specific

Trigger Mode

The Trigger Mode control can be used to put the camera in trigger mode. In trigger mode, the camera waits for an external signal before delivering an image.

Control

Trigger Mode

Name

Trigger Mode

Identifier

TIS_SENSOR_CID_TRIGGER_MODE

Type

V4L2_CTRL_TYPE_BOOLEAN

On

Deliver images on demand

Off

Deliver images continuously

Warning

When enabling trigger mode, LibArgus/nvarguscamerasrc will run into a timeout after no images have been received for very short time. To remedy this, follow the steps described in the Infinite Timeout Support section in the NVIDIA® documentation.

Warning

Because of Jetson Nano platform limitations, the receiving software will run into a timeout very quickly when no images are delivered. Using Trigger Mode is not recommended on Jetson Nano.

Strobe Mode

The Strobe Mode control configures an electric signal that indicates sensor activities to the outside world.

Control

Strobe Mode

Name

Strobe Mode

Identifier

TIS_SENSOR_CID_STROBE_MODE

Type

V4L2_CTRL_TYPE_MENU

Exposure

Generate a signal that indicates the sensor’s light-sensitive period

Software Trigger

The Trigger Software control issues a trigger command if the the camera in trigger mode.

Control

Software Trigger

Name

Trigger Software

Identifier

TIS_SENSOR_CID_TRIGGER_SOFTWARE

Type

V4L2_CTRL_TYPE_BUTTON

Trigger Source

The Trigger Source control can be used to configure which input signal the sensor should listen to in trigger mode.

Control

Trigger Source

Name

Trigger Source

Identifier

TIS_SENSOR_CID_TRIGGER_SOURCE

Type

V4L2_CTRL_TYPE_MENU

FPD-Link

Accept trigger signal via FPD-Link

PicoBlade

Accept trigger signal from the TRIG_IN pins of the camera’s PicoBlade connector

GPIO

Accept trigger signal from the GPIO pin of the camera’s 22-Pin connector

Trigger In Polarity

The Trigger In Polarity control optionally inverts the signal read from the TRIG_IN pins on the camera’s PicoBlade connector.

Control

Trigger In Polarity

Name

Trigger In Polarity

Identifier

TIS_SENSOR_CID_TRIGGER_IN_POLARITY

Type

V4L2_CTRL_TYPE_MENU

Default

Captures the signal as it is

Inverted

Inverts the signal before passing it to the sensor

GPOut Mode

The GPOut Mode control configures the electrical characteristics of the GP_OUT pins of the camera’s PicoBlade connector.

Control

GPOut Mode

Name

GPOut Mode

Identifier

TIS_SENSOR_CID_GPOUT_MODE

Type

V4L2_CTRL_TYPE_MENU

Open Drain

The GP_OUT pins on the camera’s PicoBlade connector work in open drain mode

TTL

The GP_OUT pins on the camera’s PicoBlade connector work in TTL mode

GPOut Function

The GPOut Function control can be used to select which signal is output on the GP_OUT pins of the camera’s PicoBlade connector.

Control

GPOut Function

Name

GPOut Function

Identifier

TIS_SENSOR_CID_GPOUT_FUNCTION

Type

V4L2_CTRL_TYPE_MENU

Constant Low

Output a constant low signal

Constant High

Output a constant high signal

Strobe

Output the sensor status signal configured by the strobe_mode control

Sync Out

Output the sensor sync signal

Offset X

The Offset X control configures the horizontal start position of the readout in partial scan mode.

When setting a value that is larger than possible given the width of the current resolution, the camera will internallyy apply the largest valid value.

Control

Offset X

Name

Offset X

Identifier

TIS_SENSOR_CID_OFFSET_X

Type

V4L2_CTRL_TYPE_INTEGER

Minimum

0

Maximum

Sensor-specific

Step Size

Sensor-specific

Offset Y

The Offset Y control configures the vertical start position of the readout in partial scan mode.

When setting a value that is larger than possible given the height of the current resolution, the camera will internally apply the largest valid value.

Control

Offset Y

Name

Offset Y

Identifier

TIS_SENSOR_CID_OFFSET_Y

Type

V4L2_CTRL_TYPE_INTEGER

Minimum

0

Maximum

Sensor-specific

Step Size

Sensor-specific

Offset Auto Center

The Offset Auto Center control can be used to always read out the center region of the image sensor.

When Offset Auto Center is true, the values of Offset X and Offset Y are ignored.

Control

Offset Auto Center

Name

Offset Auto Center

Identifier

TIS_SENSOR_CID_OFFSET_AUTO_CENTER

Type

V4L2_CTRL_TYPE_BOOLEAN

true

Always read out the center region of the image sensor

false

Read out the region starting at offset_x, offset_y

Sensor Temperature

The Sensor Temperature reports the current temperature of the image sensor chip in millidegree Celsius.

The control value may be invalid when the camera is not streaming.

Control

Sensor Temperature

Name

Sensor Temperature

Identifier

TIS_SENSOR_CID_SENSOR_TEMPERATURE

Type

V4L2_CTRL_TYPE_INTEGER

Unit

m°C

Minimum

Sensor-specific

Maximum

Sensor-specific

Serial Number

The Device Serial Number control allows reading out the camera’s serial number from the sensor board’s EEPROM.

Control

Serial Number

Name

Device Serial Number

Identifier

TIS_SENSOR_CID_SERIAL_NUMBER

Type

V4L2_CTRL_TYPE_STRING

Remarks

Read-Only

Model Name

The Device Model Name control allows reading out the camera’s model name from the sensor board’s EEPROM.

Control

Model Name

Name

Device Model Name

Identifier

TIS_SENSOR_CID_MODEL_NAME

Type

V4L2_CTRL_TYPE_STRING

Remarks

Read-Only

Manufacturer Name

The Device Vendor Name control allows reading out the camera’s model name from the sensor board’s EEPROM.

Control

Manufacturer Name

Name

Device Vendor Name

Identifier

TIS_SENSOR_CID_MANUFACTURER_NAME

Type

V4L2_CTRL_TYPE_STRING

Remarks

Read-Only

Device Valid

The device_valid control indicates whether a camera is present for the given video device node.

Video device nodes are created for every device declared in the device tree, regardless whether they are actually connected.

Control

Device Valid

Name

device_valid

Identifier

TIS_SENSOR_CID_DEVICE_VALID

Type

V4L2_CTRL_TYPE_BOOLEAN

true

A camera is connected as described by the device tree

false

The camera identified by this device node is not found

Sensor-Specific Controls: IMX390

Control

Identifier

Type

Unit

Values

Sensor Output Select

TIS_SENSOR_CID_IMX390_SENSOR_OUTPUT_SELECT

menu

HDR, SP1_HCG, SP1_LCG, SP2

Exposure Ratio

TIS_SENSOR_CID_IMX390_EXPOSURE_RATIO

integer

Percent

Gain Offset

TIS_SENSOR_CID_IMX390_GAIN_OFFSET

integer

dB/10

subtract_smpg_height

TIS_SENSOR_CID_IMX390_SUBTRACT_SMPG_HEIGHT

boolean

Output Selector

The Sensor Output Select controls selects which of the images the IMX390 sensor internally generates is sent.

Control

Output Selector

Name

Sensor Output Select

Identifier

TIS_SENSOR_CID_IMX390_OUTPUT_SEL

Type

V4L2_CTRL_TYPE_MENU

HDR

Merged HDR image

SP1_HCG

Image with SP1 (long) exposure time, HCG (high) gain

SP1_LCG

Image with SP1 (long) exposure time, LCG (low) gain

SP2

Image widht SP2 (short) exposure time, LCG

Exposure Ratio

The Exposure Ratio control specifies the relation between the long (SP1) exposure time and the short (SP2) exposure time. The long exposure time is controlled by Exposure.

Control

Exposure Ratio

Name

Exposure Ratio

Identifier

TIS_SENSOR_CID_IMX390_EXPOSURE_RATIO

Type

V4L2_CTRL_TYPE_INTEGER

Unit

Percent

Minimum

1

Maximum

100

Gain Offset

The Gain Offset control specifies the relation between the high (HCG) gain and the low (LCG) gain. The high gain is controlled by gain.

Control

Gain Offset

Name

Gain Offset

Identifier

TIS_SENSOR_CID_IMX390_GAIN_OFFSET

Type

V4L2_CTRL_TYPE_INTEGER

Unit

dB/10

Minimum

-270

Maximum

0

Subtract SMPG Height

The subtract_smpg_height control has to be enabled when streaming raw image data via V4l2, otherwise disabled.

When this control is not configured correctly when streaming with LibArgus/nvarguscamerasrc, the bottom lines will contain invalid data.

When it is not configured correctly when streaming raw data via V4L2, there will be no images delivered.

Please note that when streaming through V4L2, the image will contain invalid data in the bottom lines. It is recommended to remove them by reducing the declared image height when passing the data on.

Control

Subtract SMPG Height

Name

subtract_smpg_height

Identifier

TIS_SENSOR_CID_IMX390_SUBTRACT_SMPG_HEIGHT

Type

V4L2_CTRL_TYPE_BOOLEAN

True

Streaming raw data via V4L2

False

Streaming via LibArgus

Sensor-Specific Controls: IMX290, IMX462

Gain Mode

The Gain Mode control configures the sensor’s internal analog gain behavior.

Control

Gain Mode

Name

Gain Mode

Identifier

TIS_SENSOR_CID_GAIN_MODE

Type

V4L2_CTRL_TYPE_MENU

Low Conversion Gain

Default behavior

High Conversion Gain

Increase sensitivity

Sensor-Specific Controls: IMX415

External Synchronization

The External Synchronization control allows the sensor to act as master or slave in synchronization setups.

The available menu entries depend on the actual camera and system configuration; for example a FPD-Link camera has to be designated as possible master in the device tree.

Control

External Synchronization

Name

External Synchronization

Identifier

TIS_SENSOR_CID_EXT_SYNC

Type

V4L2_CTRL_TYPE_MENU

Off

Free-running

Master

Free-running with sync signal output

Slave

Running synchronized to sync signal input