Video Module

Classes

struct  RecordingStatus
 Structure containing information about the status of the recording. More...
 
struct  StreamingParameters
 Structure containing the options used to stream with the ZED SDK. More...
 
struct  RecordingParameters
 Structure containing the options used to record. More...
 
struct  DeviceProperties
 Structure containing information about the properties of a camera. More...
 
struct  StreamingProperties
 Structure containing information about the properties of a streaming device. More...
 
class  InitParameters
 Class containing the options used to initialize the sl::Camera object. More...
 
struct  EncodedStreamPacket
 Single encoded video packet retrieved from a Camera source. More...
 
struct  EncodedStreamInfo
 Describes one encoded video source exposed by the Camera. More...
 
struct  RawBufferFd
 Validity-tracked handle to a native DMA buffer (dmabuf) file descriptor from the camera capture pool. More...
 
struct  RawBuffer
 Zero-copy wrapper for native camera capture buffers. More...
 
class  Camera
 This class serves as the primary interface between the camera and the various features provided by the SDK. More...
 
class  InitParametersOne
 Class containing the options used to initialize the sl::CameraOne object. More...
 
class  InputType
 Class defining the input type used in the ZED SDK. More...
 

Enumerations

enum class  SVO_ENCODING_PRESET
 Lists available encoding presets for SVO recording. More...
 
enum class  SIDE
 Lists possible sides on which to get data from. More...
 
enum  FLIP_MODE : int
 Lists possible flip modes of the camera. More...
 
enum class  RESOLUTION
 Lists available resolutions. More...
 
enum class  VIDEO_SETTINGS
 Lists available camera settings for the camera (contrast, hue, saturation, gain, ...). More...
 
enum class  VIEW
 Lists available views. More...
 
enum class  SVO_COMPRESSION_MODE
 Lists available compression modes for SVO recording. More...
 
enum class  RAW_BUFFER_TYPE
 Lists the types of native raw buffers supported by RawBuffer. More...
 
enum class  SENSOR_STATE
 Lists possible sensor states. More...
 
enum class  MODEL
 Lists ZED camera model. More...
 
enum class  INPUT_TYPE
 Lists available input types in the ZED SDK. More...
 
enum class  CAMERA_STATE
 Lists possible camera states. More...
 
enum class  STREAMING_CODEC
 Lists the different encoding types for image streaming. More...
 
enum class  ENCODED_STREAM_SOURCE
 Identifies which of the camera's encoded video paths to read from. More...
 
enum class  BUS_TYPE
 Lists available LIVE input type in the ZED SDK. More...
 
enum class  TIMESTAMP_CLOCK
 Lists available clock sources for SDK timestamps. More...
 
enum class  TIME_REFERENCE
 Lists possible time references for timestamps or data. More...
 

Functions

sl::Resolution getResolution (RESOLUTION resolution)
 Gets the corresponding sl::Resolution from an sl::RESOLUTION. More...
 
unsigned int SL_CORE_EXPORT generateVirtualStereoSerialNumber (unsigned int serial_left, unsigned int serial_right)
 Generate a unique identifier for virtual stereo based on the serial numbers of the two ZED Ones. More...
 
void SL_CORE_EXPORT setTimestampClock (TIMESTAMP_CLOCK clock)
 Sets the clock source used for all SDK timestamps (images and sensors). More...
 
TIMESTAMP_CLOCK SL_CORE_EXPORT getTimestampClock ()
 Returns the clock source currently used for SDK timestamps. More...
 
void SL_CORE_EXPORT setMaxSystemClockStepMs (float limit_ms)
 Sets the maximum system-clock step (in milliseconds) the SDK will follow per sample when the host clock is adjusted backward (NTP/PTP step, manual date change). More...
 
float SL_CORE_EXPORT getMaxSystemClockStepMs ()
 Returns the current system-clock step clamp in milliseconds (see setMaxSystemClockStepMs). More...
 

Enumeration Type Documentation

◆ SVO_ENCODING_PRESET

enum SVO_ENCODING_PRESET
strong

Lists available encoding presets for SVO recording.

The preset controls the speed/quality tradeoff of the hardware encoder.

Note
Only applicable when SVO_COMPRESSION_MODE is H264 or H265 (lossy or lossless).
Enumerator
DEFAULT 

Encoder default.
Maps to NVENC P4 / V4L2 default.

ULTRAFAST 

Fastest encoding, lowest quality.
Maps to NVENC P1 / V4L2 ULTRAFAST.

FAST 

Fast encoding.
Maps to NVENC P2 / V4L2 FAST.

MEDIUM 

Balanced speed/quality.
Maps to NVENC P3 / V4L2 MEDIUM.

SLOW 

Slow encoding, higher quality.
Maps to NVENC P5 / V4L2 SLOW.

◆ SIDE

enum SIDE
strong

Lists possible sides on which to get data from.

Enumerator
LEFT 

Left side only.

RIGHT 

Right side only.

BOTH 

Left and right side.

◆ FLIP_MODE

enum FLIP_MODE : int

Lists possible flip modes of the camera.

Enumerator
OFF 

No flip applied. Default behavior.

ON 

Images and camera sensors' data are flipped useful when your camera is mounted upside down.

AUTO 

In LIVE mode, use the camera orientation (if an IMU is available) to set the flip mode.
In SVO mode, read the state of this enum when recorded.

◆ RESOLUTION

enum RESOLUTION
strong

Lists available resolutions.

Note
The VGA resolution does not respect the 640*480 standard to better fit the camera sensor (672*376 is used).
Warning
All resolutions are not available for every camera.
You can find the available resolutions for each camera in our documentation.
Enumerator
HD4K 

3856x2180 for imx678 mono

QHDPLUS 

3800x1800

HD2K 

2208*1242 (x2)
Available FPS: 15
Only supported with ZED-M / ZED2i

HD1536 

1920*1536 (x2)
Available FPS: 30
Only supported with ZED-X HDR lineup (One/Stereo)

HD1080 

1920*1080 (x2)
Available FPS: 15, 30

HD1200 

1920*1200 (x2)
Available FPS: 15, 30, 60
Only supported with ZED-X lineup (One/Stereo) and ZED-XOne 4K

HD720 

1280*720 (x2)
Available FPS: 15, 30, 60

SVGA 

960*600 (x2)
Available FPS: 15, 30, 60, 120
Only supported with ZED-X lineup (One/Stereo)

VGA 

672*376 (x2)
Available FPS: 15, 30, 60, 100

XVGA 

960x768 (x2)
Available FPS: 30
Only supported with ZED-X HDR lineup (One/Stereo)

TXGA 

640x512 (x2)
Available FPS: 30
Only supported with ZED-X HDR lineup (One/Stereo)

AUTO 

Select the resolution compatible with the camera:

  • ZED X/X Mini: HD1200
  • ZED X Pro/X Pro Mini: HD1536
  • other cameras: HD720

◆ VIDEO_SETTINGS

enum VIDEO_SETTINGS
strong

Lists available camera settings for the camera (contrast, hue, saturation, gain, ...).

Warning
All VIDEO_SETTINGS are not supported for all camera models. You can find the supported VIDEO_SETTINGS for each ZED camera in our documentation.

GAIN and EXPOSURE are linked in auto/default mode (see sl::Camera::setCameraSettings()).
Enumerator
BRIGHTNESS 

Brightness control
Affected value should be between 0 and 8.

Note
Not available for ZED X/X Mini cameras.
CONTRAST 

Contrast control
Affected value should be between 0 and 8.

Note
Not available for ZED X/X Mini cameras.
HUE 

Hue control
Affected value should be between 0 and 11.

Note
Not available for ZED X/X Mini cameras.
SATURATION 

Saturation control
Affected value should be between 0 and 8.

SHARPNESS 

Digital sharpening control
Affected value should be between 0 and 8.

GAMMA 

ISP gamma control
Affected value should be between 1 and 9.

GAIN 

Gain control
Affected value should be between 0 and 100 for manual control.

Note
If EXPOSURE is set to -1 (automatic mode), then GAIN will be automatic as well.
EXPOSURE 

Exposure control
Affected value should be between 0 and 100 for manual control.
The exposition is mapped linearly in a percentage of the following max values.
Special case for EXPOSURE = 0 that corresponds to 0.17072ms.
The conversion to milliseconds depends on the framerate:

  • 15fps & EXPOSURE = 100 -> 19.97ms
  • 30fps & EXPOSURE = 100 -> 19.97ms
  • 60fps & EXPOSURE = 100 -> 10.84072ms
  • 100fps & EXPOSURE = 100 -> 10.106624ms
AEC_AGC 

Defines if the GAIN and EXPOSURE are in automatic mode or not.
Setting GAIN or EXPOSURE values will automatically set this value to 0.

AEC_AGC_ROI 

Defines the region of interest for automatic exposure/gain computation.
To be used with overloaded setCameraSettings() / getCameraSettings() methods.

WHITEBALANCE_TEMPERATURE 

Color temperature control
Affected value should be between 2800 and 6500 with a step of 100.

Note
Setting a value will automatically set WHITEBALANCE_AUTO to 0.
WHITEBALANCE_AUTO 

Defines if the white balance is in automatic mode or not.

LED_STATUS 

Status of the front LED of the camera.
Set to 0 to disable the light, 1 to enable the light.
Default value is on.

Note
Requires camera firmware 1523 at least.
EXPOSURE_TIME 

Exposure time of the sensor in microseconds.

Note
Only available for GMSL2-based camera (ZED-X, ZED-X Mini, ZED-Xone,...) .
Use this value to get the real exposure time in us.
ANALOG_GAIN 

Analog gain (sensor) control in mDB.

Note
Only available for GMSL2-based camera (ZED-X, ZED-X Mini, ZED-Xone,...) .
Use this value to get the real analog gain in mdB.
DIGITAL_GAIN 

Digital gain (ISP) as a factor.

Note
Only available for GMSL2-based camera (ZED-X, ZED-X Mini, ZED-Xone,...) .
AUTO_EXPOSURE_TIME_RANGE 

Range of exposure auto control in microseconds.
Used with setCameraSettings().
Min/max range between max range defined in DTS.
By default: [28000 - <fps_time> or 19000] us.

Note
Only available for ZED X/X Mini cameras.
AUTO_ANALOG_GAIN_RANGE 

Range of sensor gain in automatic control.
Used with setCameraSettings().
Min/max range between max range defined in DTS.
By default: [1000 - 16000] mdB.

Note
Only available for ZED X/X Mini cameras.
AUTO_DIGITAL_GAIN_RANGE 

Range of digital ISP gain in automatic control.
Used with setCameraSettings().
Min/max range between max range defined in DTS.
By default: [1 - 256].

Note
Only available for ZED X/X Mini cameras.
EXPOSURE_COMPENSATION 

Exposure-target compensation made after auto exposure.
Reduces the overall illumination target by factor of F-stops.
Affected value should be between 0 and 100 (mapped between [-2.0,2.0]).
Default value is 50, i.e. no compensation applied.

Note
Only available for ZED-X / ZED-X Mini / ZED-XOne GS and ZED-XOne UHD cameras.
DENOISING 

Level of denoising applied on both left and right images.
Affected value should be between 0 and 100.
Default value is 50.

Note
Only available for GMSL2-based cameras
SCENE_ILLUMINANCE 

Level of illuminance of the scene calculated by the ISP.
Can be used to determine the level of light in the scene and adjust settings accordingly.

Note
Read-only control.
Available for ZED-X/X mini and ZED-XOne GS or 4K(UHD) cameras only.
Value provided in [0.1x]Lux for ZED-X / ZED-X Mini / ZED-XOne GS and ZED-XOne UHD cameras.
AE_ANTIBANDING 

AE anti-banding mode.
Affected value should be between 0 and 3.
0: OFF, 1: AUTO, 2: 50Hz, 3: 60Hz.
Default value is 1 (AUTO).

Note
Only available for non-HDR GMSL cameras (e.g. ZED X, ZED X Mini, ZED X One GS, etc.).
COLOR_CORRECTION_MATRIX 

Color correction matrix, converting the sensor RGB values to linear sRGB.
Apply a 3x3 matrix with the overloaded setCameraSettings(), and go back to the color correction of the camera with the default value of setCameraSettings().
On a live camera, getCameraSettings() returns 1 while a matrix set by the application is in use, 0 otherwise.

Note
Only available for non-HDR GMSL cameras (e.g. ZED X, ZED X Mini, ZED X One GS, etc.).

◆ VIEW

enum VIEW
strong

Lists available views.

Enumerator
LEFT 

Left (for stereo or default for monocular camera) BGRA image. Each pixel contains 4 unsigned char (B, G, R, A).
Type: sl::MAT_TYPE::U8_C4

RIGHT 

Right BGRA image. Each pixel contains 4 unsigned char (B, G, R, A).
Type: sl::MAT_TYPE::U8_C4

LEFT_GRAY 

Left gray image. Each pixel contains 1 unsigned char.
Type: sl::MAT_TYPE::U8_C1

RIGHT_GRAY 

Right gray image. Each pixel contains 1 unsigned char.
Type: sl::MAT_TYPE::U8_C1

LEFT_NV12_UNRECTIFIED 

Left NV12 unrectified image.
Type: sl::MAT_TYPE::NV12

RIGHT_NV12_UNRECTIFIED 

Right NV12 unrectified image.
Type: sl::MAT_TYPE::NV12

LEFT_UNRECTIFIED 

Left BGRA unrectified image. Each pixel contains 4 unsigned char (B, G, R, A).
Type: sl::MAT_TYPE::U8_C4

RIGHT_UNRECTIFIED 

Right BGRA unrectified image. Each pixel contains 4 unsigned char (B, G, R, A).
Type: sl::MAT_TYPE::U8_C4

LEFT_UNRECTIFIED_GRAY 

Left gray unrectified image. Each pixel contains 1 unsigned char.
Type: sl::MAT_TYPE::U8_C1

RIGHT_UNRECTIFIED_GRAY 

Right gray unrectified image. Each pixel contains 1 unsigned char.
Type: sl::MAT_TYPE::U8_C1

SIDE_BY_SIDE 

Left and right image (the image width is therefore doubled). Each pixel contains 4 unsigned char (B, G, R, A).
Type: sl::MAT_TYPE::U8_C4

DEPTH 

Color rendering of the depth. Each pixel contains 4 unsigned char (B, G, R, A).
Type: sl::MAT_TYPE::U8_C4

Note
Use MEASURE::DEPTH with Camera::retrieveMeasure() to get depth values.
CONFIDENCE 

Color rendering of the depth confidence. Each pixel contains 4 unsigned char (B, G, R, A).
Type: sl::MAT_TYPE::U8_C4

Note
Use MEASURE::CONFIDENCE with Camera::retrieveMeasure() to get confidence values.
NORMALS 

Color rendering of the normals. Each pixel contains 4 unsigned char (B, G, R, A).
Type: sl::MAT_TYPE::U8_C4

Note
Use MEASURE::NORMALS with Camera::retrieveMeasure() to get normal values.
DEPTH_RIGHT 

Color rendering of the right depth mapped on right sensor. Each pixel contains 4 unsigned char (B, G, R, A).
Type: sl::MAT_TYPE::U8_C4

Note
Use MEASURE::DEPTH_RIGHT with Camera::retrieveMeasure() to get depth right values.
NORMALS_RIGHT 

Color rendering of the normals mapped on right sensor. Each pixel contains 4 unsigned char (B, G, R, A).
Type: sl::MAT_TYPE::U8_C4

Note
Use MEASURE::NORMALS_RIGHT with Camera::retrieveMeasure() to get normal right values.
LEFT_BGRA 

Alias of sl::VIEW::LEFT.
Type: sl::MAT_TYPE::U8_C4

LEFT_BGR 

Left image in BGR pixel format: Type: sl::MAT_TYPE::U8_C3

RIGHT_BGRA 

Alias of sl::VIEW::RIGHT.
Type: sl::MAT_TYPE::U8_C4

RIGHT_BGR 

Right image in BGR pixel format: Type: sl::MAT_TYPE::U8_C3

LEFT_UNRECTIFIED_BGRA 

Alias of sl::VIEW::LEFT_UNRECTIFIED.
Type: sl::MAT_TYPE::U8_C4

LEFT_UNRECTIFIED_BGR 

Left unrectified image in BGR pixel format: Type: sl::MAT_TYPE::U8_C3

RIGHT_UNRECTIFIED_BGRA 

Alias of sl::VIEW::RIGHT_UNRECTIFIED.
Type: sl::MAT_TYPE::U8_C4

RIGHT_UNRECTIFIED_BGR 

Right unrectified image in BGR pixel format: Type: sl::MAT_TYPE::U8_C3

SIDE_BY_SIDE_BGRA 

Alias of sl::VIEW::SIDE_BY_SIDE.
Type: sl::MAT_TYPE::U8_C4

SIDE_BY_SIDE_BGR 

Side by side image in BGR pixel format: Type: sl::MAT_TYPE::U8_C3

SIDE_BY_SIDE_GRAY 

Side by side image in gray scale: Type: sl::MAT_TYPE::U8_C1

SIDE_BY_SIDE_UNRECTIFIED_BGRA 

Alias of sl::VIEW::SIDE_BY_SIDE_UNRECTIFIED.
Type: sl::MAT_TYPE::U8_C4

SIDE_BY_SIDE_UNRECTIFIED_BGR 

Side by side unrectified image in BGR pixel format: Type: sl::MAT_TYPE::U8_C3

SIDE_BY_SIDE_UNRECTIFIED_GRAY 

Side by side unrectified image in gray scale: Type: sl::MAT_TYPE::U8_C1

DEPTH_BGRA 

Alias of sl::VIEW::DEPTH.
Type: sl::MAT_TYPE::U8_C4

DEPTH_BGR 

Depth image in BGR pixel format: Type: sl::MAT_TYPE::U8_C3

DEPTH_GRAY 

Depth image in gray scale: Type: sl::MAT_TYPE::U8_C1

CONFIDENCE_BGRA 

Alias of sl::VIEW::CONFIDENCE.
Type: sl::MAT_TYPE::U8_C4

CONFIDENCE_BGR 

Confidence image in BGR pixel format: Type: sl::MAT_TYPE::U8_C3

CONFIDENCE_GRAY 

Confidence image in gray scale: Type: sl::MAT_TYPE::U8_C1

NORMALS_BGRA 

Alias of sl::VIEW::NORMALS.
Type: sl::MAT_TYPE::U8_C4

NORMALS_BGR 

Normal image in BGR pixel format: Type: sl::MAT_TYPE::U8_C3

NORMALS_GRAY 

Normal image in gray scale: Type: sl::MAT_TYPE::U8_C1

DEPTH_RIGHT_BGRA 

Alias of sl::VIEW::DEPTH_RIGHT.
Type: sl::MAT_TYPE::U8_C4

DEPTH_RIGHT_BGR 

Depth right image in BGR pixel format: Type: sl::MAT_TYPE::U8_C3

DEPTH_RIGHT_GRAY 

Depth right image in gray scale: Type: sl::MAT_TYPE::U8_C1

NORMALS_RIGHT_BGRA 

Alias of sl::VIEW::NORMALS_RIGHT.
Type: sl::MAT_TYPE::U8_C4

NORMALS_RIGHT_BGR 

Normal right image in BGR pixel format: Type: sl::MAT_TYPE::U8_C3

NORMALS_RIGHT_GRAY 

Normal right image in gray scale: Type: sl::MAT_TYPE::U8_C1

LEFT_NV12 

Left NV12 rectified image (YUV 4:2:0 semi-planar).
Type: sl::MAT_TYPE::NV12, size must be even

RIGHT_NV12 

Right NV12 rectified image (YUV 4:2:0 semi-planar).
Type: sl::MAT_TYPE::NV12, size must be even

◆ SVO_COMPRESSION_MODE

enum SVO_COMPRESSION_MODE
strong

Lists available compression modes for SVO recording.

Note
LOSSLESS is an improvement of previous lossless compression (used in ZED Explorer), even if size may be bigger, compression time is much faster.
Enumerator
LOSSLESS 

PNG/ZSTD (lossless) CPU based compression.
Average size: 42% of RAW

H264 

H264 (AVCHD) GPU based compression.
Average size: 1% of RAW

Note
Requires a NVIDIA GPU.
H265 

H265 (HEVC) GPU based compression.
Average size: 1% of RAW

Note
Requires a NVIDIA GPU.
H264_LOSSLESS 

H264 Lossless GPU/Hardware based compression.
Average size: 25% of RAW
Provides a SSIM/PSNR result (vs RAW) >= 99.9%.

Note
Requires a NVIDIA GPU.
H265_LOSSLESS 

H265 Lossless GPU/Hardware based compression.
Average size: 25% of RAW
Provides a SSIM/PSNR result (vs RAW) >= 99.9%.

Note
Requires a NVIDIA GPU.

◆ RAW_BUFFER_TYPE

enum RAW_BUFFER_TYPE
strong

Lists the types of native raw buffers supported by RawBuffer.

Warning
This is an advanced low-level API. Enabled by defining SL_ENABLE_ADVANCED_CAPTURE_API before including this header. Improper use can crash the Argus stack or destabilize the system.
Enumerator
UNKNOWN 

Unknown or uninitialized buffer type.

NVBUFSURFACE 

NvBufSurface (Argus native buffer)

◆ SENSOR_STATE

enum SENSOR_STATE
strong

Lists possible sensor states.

Enumerator
AVAILABLE 

The sensor can be opened by the ZED SDK.

NOT_AVAILABLE 

The sensor is already opened and unavailable.

◆ MODEL

enum MODEL
strong

Lists ZED camera model.

Enumerator
ZED 

ZED camera model

ZED_M 

ZED Mini (ZED M) camera model

ZED2 

ZED 2 camera model

ZED2i 

ZED 2i camera model

ZED_X 

ZED X camera model (120mm baseline) with dual global shutter AR0234 sensor

ZED_XM 

ZED X Mini (50mm baseline) camera model with dual global shutter AR0234 sensor

ZED_X_HDR 

ZED X HDR camera model (120mm baseline) with dual HDR rolling shutter ISX031 sensor

ZED_X_HDR_MINI 

ZED X HDR mini camera model (50mm baseline) with dual HDR rolling shutter ISX031 sensor

ZED_X_HDR_MAX 

ZED X HDR Max camera model (170mm baseline) with dual HDR rolling shutter ISX031 sensor

ZED_X_NANO 

ZED X Nano (18mm baseline) camera model with dual global shutter AR0234 sensor

VIRTUAL_ZED_X 

Virtual ZED-X generated from 2 ZED-XOne (Using ZED Media Server)

ZED_XONE_GS 

ZED X One with global shutter AR0234 sensor

ZED_XONE_UHD 

ZED X One with 4K rolling shutter IMX678 sensor

ZED_XONE_HDR 

ZED X One with HDR rolling shutter ISX031 sensor

ZED_XONE_CORE 

ZED X One Core with global shutter AR0234 sensor, direct MIPI connection

◆ INPUT_TYPE

enum INPUT_TYPE
strong

Lists available input types in the ZED SDK.

Enumerator
USB 

USB input mode

SVO 

SVO file input mode

STREAM 

STREAM input mode (requires to use enableStreaming() / disableStreaming()" on the "sender" side)

GMSL 

GMSL input mode (only on NVIDIA Jetson)

MIPI 

MIPI input mode, for a camera connected directly to a MIPI capture card (only on NVIDIA Jetson)

HOLOSCAN 

Holoscan Camera-over-Ethernet input mode, through a Holoscan sensor bridge (only on NVIDIA Jetson)

◆ CAMERA_STATE

enum CAMERA_STATE
strong

Lists possible camera states.

Enumerator
AVAILABLE 

The camera can be opened by the ZED SDK.

NOT_AVAILABLE 

The camera is already opened and unavailable.

◆ STREAMING_CODEC

enum STREAMING_CODEC
strong

Lists the different encoding types for image streaming.

Enumerator
H264 

AVCHD/H264 encoding

H265 

HEVC/H265 encoding

◆ ENCODED_STREAM_SOURCE

enum ENCODED_STREAM_SOURCE
strong

Identifies which of the camera's encoded video paths to read from.

A single Camera can produce up to three concurrent encoded H264/H265 bitstreams: the incoming stream when the camera is opened from a network sender (ENCODED_STREAM_SOURCE::RECEIVING), the outgoing stream when Camera::enableStreaming() is active (ENCODED_STREAM_SOURCE::SENDING), and the SVO encoder output when Camera::enableRecording() is active with a video compression mode (ENCODED_STREAM_SOURCE::RECORDING). Each source has its own codec, bitrate and key-frame schedule.

Enumerator
RECEIVING 

Incoming stream packets (Camera opened with INPUT_TYPE::STREAM).

SENDING 

Outgoing stream packets (enableStreaming() is active).

RECORDING 

SVO encoder output (enableRecording() with H264 / H265 compression mode).

LAST 

Sentinel.

◆ BUS_TYPE

enum BUS_TYPE
strong

Lists available LIVE input type in the ZED SDK.

Enumerator
USB 

USB input mode

GMSL 

GMSL input mode

Note
Only on NVIDIA Jetson.
AUTO 

Automatically select the input type.
Trying first for available USB cameras, then the cameras connected to the host.

MIPI 

MIPI input mode, for a camera connected directly to a MIPI capture card.

Note
Only on NVIDIA Jetson.
HOLOSCAN 

Holoscan Camera-over-Ethernet input mode, for a camera behind a Holoscan sensor bridge.

Note
Only on NVIDIA Jetson.

◆ TIMESTAMP_CLOCK

enum TIMESTAMP_CLOCK
strong

Lists available clock sources for SDK timestamps.

Selects the clock used internally by the SDK to timestamp images and sensor data. Both image and IMU timestamps always use the same selected clock, ensuring coherent results.

Note
This is a process-wide setting. Use sl::setTimestampClock() before opening any camera.
Enumerator
SYSTEM_CLOCK 

Timestamps use the system (wall-clock) time via std::chrono::system_clock.
Timestamps represent nanoseconds since Unix epoch.

Warning
These timestamps are affected by system clock adjustments (NTP/PTP).
MONOTONIC_CLOCK 

Timestamps use a monotonic clock (CLOCK_MONOTONIC on Linux, via std::chrono::steady_clock).
Timestamps represent nanoseconds since an unspecified origin (typically system boot).
Never jumps on system clock step adjustments, but its rate is still disciplined by NTP/PTP frequency slewing (adjtimex): it stays aligned with real time over the long run, at the cost of a slightly non-constant tick rate. Use TIMESTAMP_CLOCK::MONOTONIC_RAW_CLOCK to also avoid the slewing.

Note
On ZED X cameras, full end-to-end immunity also requires ZED X driver version 1.4.2 or later. With older drivers the IMU itself can pause briefly when the system time is set backward; the SDK emits a warning at camera open and resumes IMU delivery automatically. Other cameras are unaffected.
MONOTONIC_RAW_CLOCK 

Timestamps use the raw monotonic clock (CLOCK_MONOTONIC_RAW on Linux).
Like TIMESTAMP_CLOCK::MONOTONIC_CLOCK it never jumps, but it is driven directly by the underlying hardware counter and subject to neither NTP/PTP steps nor frequency slewing (adjtimex). The tick rate is the raw hardware oscillator, so timestamps can slowly drift relative to wall-clock time. Useful for correlating SDK timestamps with free-running hardware counters or other devices that are not time-disciplined by the host.
Same caveat as TIMESTAMP_CLOCK::MONOTONIC_CLOCK applies to the ZED X driver (>= 1.4.2 recommended).

◆ TIME_REFERENCE

enum TIME_REFERENCE
strong

Lists possible time references for timestamps or data.

Enumerator
IMAGE 

The requested timestamp or data will be at the time of the frame extraction.

CURRENT 

The requested timestamp or data will be at the time of the function call.

IMAGE_CENTER_OF_EXPOSURE 

The middle of the frame's integration window: the instant the "average photon" of the frame reached the sensor.

IMAGE is anchored at the start of the sensor readout, which is the moment the frame's integration ends*; this reference therefore sits half an exposure earlier** than IMAGE. Use it to align frames with other sensors (LiDAR, IMU, robot joints) that are timestamped at the instant they measure.

Note
Only meaningful for Camera::getTimestamp() / CameraOne::getTimestamp(). It is rejected by Camera::getSensorsData() / CameraOne::getSensorsData().
Requires a per-frame exposure, so it is available on ZED X, ZED X Mini, ZED X One GS and ZED X One 4K. Returns 0 on every other input: USB cameras, the HDR camera family (ZED X HDR / HDR Mini / HDR Max, ZED X One HDR), and any SVO or network stream carrying no per-frame sensor metadata. Always check for 0 before using the value.
Exact on global-shutter sensors (ZED X, ZED X Mini, ZED X One GS), where the whole array integrates at once. On the rolling-shutter ZED X One 4K it is the center of exposure of the first* row; later rows integrate progressively later, by up to the sensor readout time.

Function Documentation

◆ getResolution()

sl::Resolution sl::getResolution ( RESOLUTION  resolution)

Gets the corresponding sl::Resolution from an sl::RESOLUTION.

Parameters
resolution: The wanted sl::RESOLUTION.
Returns
The sl::Resolution corresponding to sl::RESOLUTION given as argument.

◆ generateVirtualStereoSerialNumber()

unsigned int SL_CORE_EXPORT sl::generateVirtualStereoSerialNumber ( unsigned int  serial_left,
unsigned int  serial_right 
)

Generate a unique identifier for virtual stereo based on the serial numbers of the two ZED Ones.

Parameters
serial_left: Serial number of the left camera.
serial_right: Serial number of the right camera.
Returns
A unique hash for the given pair of serial numbers, or 0 if an error occurred (e.g: same serial number).

◆ setTimestampClock()

void SL_CORE_EXPORT sl::setTimestampClock ( TIMESTAMP_CLOCK  clock)

Sets the clock source used for all SDK timestamps (images and sensors).

Parameters
clock: The desired TIMESTAMP_CLOCK.
Note
This is a process-wide setting. Call this before opening any camera.

◆ getTimestampClock()

TIMESTAMP_CLOCK SL_CORE_EXPORT sl::getTimestampClock ( )

Returns the clock source currently used for SDK timestamps.

Returns
The active TIMESTAMP_CLOCK.

◆ setMaxSystemClockStepMs()

void SL_CORE_EXPORT sl::setMaxSystemClockStepMs ( float  limit_ms)

Sets the maximum system-clock step (in milliseconds) the SDK will follow per sample when the host clock is adjusted backward (NTP/PTP step, manual date change).

Only meaningful in TIMESTAMP_CLOCK::SYSTEM_CLOCK mode; it has no effect in TIMESTAMP_CLOCK::MONOTONIC_CLOCK or TIMESTAMP_CLOCK::MONOTONIC_RAW_CLOCK mode where timestamps are monotonic by construction. Forward clock movement always passes through unchanged.

Parameters
limit_ms: Clamp threshold in milliseconds.
  • default (setter not called) → 4 ms: walks to the new offset at 4 ms per IMU sample (~0.8 s of real time to absorb a 1 s step). Safe for slew-only NTP/PTP setups.
  • any positive value → custom threshold. Higher = follow the host faster, risk briefly decoupling IMU and frame timestamps. Lower = more conservative.
  • 0.0f → freeze the offset captured on first use; subsequent host-clock movement is ignored.
  • any negative value → disable clamping. Raw offset propagates instantly on every call. Use for PTP setups that rely on step corrections landing immediately in reported timestamps.

Cheat sheet:**

Setup Recommended value
Desktop with systemd-timesyncd (slew-only) default
PTP with ptp4l --step_threshold=0 (slew-only) default
PTP with step corrections expected -1.0f
Deterministic timestamps, ignore the host clock entirely use TIMESTAMP_CLOCK::MONOTONIC_CLOCK instead
Same as above, also immune to NTP/PTP frequency slewing use TIMESTAMP_CLOCK::MONOTONIC_RAW_CLOCK instead
Note
Process-wide setting. The environment variable ZED_SDK_MAX_SYSTEM_CLOCK_STEP_MS, when set, always wins over this setter, an ops-side override for incident debugging. The setter logs a warning the first time it is called while the env var is forcing a different value. Call before opening any camera for the setting to apply from the first sample.

◆ getMaxSystemClockStepMs()

float SL_CORE_EXPORT sl::getMaxSystemClockStepMs ( )

Returns the current system-clock step clamp in milliseconds (see setMaxSystemClockStepMs).