6.1. Core

Core classes for device management including Context, Device, Sensor and related lists.

6.1.1. Classes

6.1.1.1. Context

class pyorbbecsdk.Context

Bases: pybind11_object

__init__(*args, **kwargs)

Overloaded function.

  1. __init__(self: pyorbbecsdk.pyorbbecsdk.Context) -> None

  2. __init__(self: pyorbbecsdk.pyorbbecsdk.Context, arg0: str) -> None

create_net_device(self: pyorbbecsdk.Context, address: str, port: int, access_mode: pyorbbecsdk.OBDeviceAccessMode = <OBDeviceAccessMode.OB_DEVICE_DEFAULT_ACCESS: 4>) pyorbbecsdk.Device

Create net device

enable_multi_device_sync(self: pyorbbecsdk.Context, arg0: int) None

Activates the multi-device synchronization function to synchronize the clock of the created device (the device needs to support this function).repeat_interval: The synchronization time interval (unit: ms; if repeatInterval=0, it means that it will only be synchronized once and will not be executed regularly).

enable_net_device_enumeration(self: pyorbbecsdk.Context, arg0: bool) None
free_idle_memory(self: pyorbbecsdk.Context) None

Free idle memory from the internal frame memory pool

get_gvcp_port_scheme(self: pyorbbecsdk.Context) pyorbbecsdk.OBGvcpPortScheme

Get the current GVCP port scheme

get_timestamp_clock_type(self: pyorbbecsdk.Context) pyorbbecsdk.OBClockType

Get the current host-side timestamp clock type for the context

static log_external_message(arg0: pyorbbecsdk.OBLogLevel, arg1: str, arg2: str, arg3: str, arg4: str, arg5: int) None
ob_force_ip_config(self: pyorbbecsdk.Context, arg0: str, arg1: pyorbbecsdk.OBDeviceIpAddrConfig) bool

Change the IP configuration

query_devices(self: pyorbbecsdk.Context) pyorbbecsdk.DeviceList

Query devices

register_device_changed_callback(self: pyorbbecsdk.Context, arg0: Callable) int
set_device_changed_callback(self: pyorbbecsdk.Context, arg0: Callable) None

Set device changed callback, callback will be called when device changed

static set_extensions_directory(path: str) None

Set the extensions directory for loading extension modules

set_gvcp_port_scheme(self: pyorbbecsdk.Context, arg0: pyorbbecsdk.OBGvcpPortScheme) None

Set the GVCP port scheme used for network device discovery and control

static set_logger_file_name(arg0: str) None

Set logger file name

static set_logger_level(arg0: pyorbbecsdk.OBLogLevel) None
static set_logger_to_callback(arg0: pyorbbecsdk.OBLogLevel, arg1: Callable) None

Set logger to callback

static set_logger_to_console(arg0: pyorbbecsdk.OBLogLevel) None

Set logger to console

static set_logger_to_file(arg0: pyorbbecsdk.OBLogLevel, arg1: str) None

Set logger to file

set_timestamp_clock_type(self: pyorbbecsdk.Context, clock_type: pyorbbecsdk.OBClockType) None

Set the host-side timestamp clock type for the current context

set_uvc_backend_type(self: pyorbbecsdk.Context, type: pyorbbecsdk.OBUvcBackendType) None

Set the UVC backend type (Linux only: LIBUVC or V4L2)

sync_device_hardware_pps_time(self: pyorbbecsdk.Context, hardware_pps_time: int) None

Synchronize the device time (synchronize hardwarePPS time to all created devices)

unregister_device_changed_callback(self: pyorbbecsdk.Context, arg0: int) None

6.1.1.2. Device

class pyorbbecsdk.Device

Bases: pybind11_object

__init__(*args, **kwargs)
clear_license_info(self: pyorbbecsdk.Device) None

Clear license information stored on the device

enable_firmware_log(self: pyorbbecsdk.Device, arg0: bool) None

Enable or disable the device firmware log

enable_global_timestamp(self: pyorbbecsdk.Device, enable: bool) None

Enable or disable global timestamp

enable_heart_beat(self: pyorbbecsdk.Device, arg0: bool) None
export_settings_as_preset_json_data(self: pyorbbecsdk.Device, preset_name: str) bytes

Export current device settings as a preset JSON data blob

export_settings_as_preset_json_file(self: pyorbbecsdk.Device, arg0: str) None
get_available_frame_interleave_list(self: pyorbbecsdk.Device) ob::DeviceFrameInterleaveList

Get the list of available frame interleave modes

get_available_preset_list(self: pyorbbecsdk.Device) pyorbbecsdk.DevicePresetList
get_available_preset_resolution_config_list(self: pyorbbecsdk.Device) pyorbbecsdk.PresetResolutionConfigList
get_baseline(self: pyorbbecsdk.Device) pyorbbecsdk.OBBaselineCalibrationParam
get_bool_property(self: pyorbbecsdk.Device, arg0: OBPropertyID) bool
get_bool_property_range(self: pyorbbecsdk.Device, arg0: OBPropertyID) pyorbbecsdk.OBBoolPropertyRange
get_calibration_camera_param_list(self: pyorbbecsdk.Device) pyorbbecsdk.CameraParamList
get_color_preset_list(self: pyorbbecsdk.Device) pyorbbecsdk.ColorPresetList
get_current_color_preset_name(self: pyorbbecsdk.Device) str
get_current_depth_mode_name(self: pyorbbecsdk.Device) str

Get the current depth work mode name

get_current_frame_interleave_name(self: pyorbbecsdk.Device) str

Get current frame interleave name

get_current_preset_name(self: pyorbbecsdk.Device) str
get_depth_work_mode(self: pyorbbecsdk.Device) pyorbbecsdk.OBDepthWorkMode
get_depth_work_mode_list(self: pyorbbecsdk.Device) pyorbbecsdk.OBDepthWorkModeList
get_device_info(self: pyorbbecsdk.Device) pyorbbecsdk.DeviceInfo
get_device_state(self: pyorbbecsdk.Device) int
get_extension_info(self: pyorbbecsdk.Device, info_key: str) str

Get extension info by key

get_float_property(self: pyorbbecsdk.Device, arg0: OBPropertyID) float
get_float_property_range(self: pyorbbecsdk.Device, arg0: OBPropertyID) pyorbbecsdk.OBFloatPropertyRange
get_int_property(self: pyorbbecsdk.Device, arg0: OBPropertyID) int
get_int_property_range(self: pyorbbecsdk.Device, arg0: OBPropertyID) pyorbbecsdk.OBIntPropertyRange
get_multi_device_sync_config(self: pyorbbecsdk.Device) pyorbbecsdk.OBMultiDeviceSyncConfig
get_sensor(self: pyorbbecsdk.Device, arg0: pyorbbecsdk.OBSensorType) pyorbbecsdk.Sensor
get_sensor_list(self: pyorbbecsdk.Device) pyorbbecsdk.SensorList
get_support_property_count(self: pyorbbecsdk.Device) int
get_supported_multi_device_sync_mode_bitmap(self: pyorbbecsdk.Device) int

Get the supported multi-device sync mode bitmap

get_supported_property(self: pyorbbecsdk.Device, arg0: int) OBPropertyItem
get_temperature(self: pyorbbecsdk.Device) pyorbbecsdk.OBDeviceTemperature
get_timestamp_reset_config(self: pyorbbecsdk.Device) pyorbbecsdk.OBDeviceTimestampResetConfig
isFrameInterleaveSupported(self: pyorbbecsdk.Device) bool
is_color_preset_supported(self: pyorbbecsdk.Device) bool
is_extension_info_exist(self: pyorbbecsdk.Device, info_key: str) bool

Check if extension info exists

is_firmware_log_enabled(self: pyorbbecsdk.Device) bool

Check whether the device firmware log is enabled

is_global_timestamp_supported(self: pyorbbecsdk.Device) bool

Check if global timestamp is supported

is_license_authorization_supported(self: pyorbbecsdk.Device) bool

Check whether the device supports license authorization

is_property_supported(self: pyorbbecsdk.Device, arg0: OBPropertyID, arg1: pyorbbecsdk.OBPermissionType) bool
loadFrameInterleave(self: pyorbbecsdk.Device, arg0: str) None
load_depth_filter_config(self: pyorbbecsdk.Device, arg0: str) None
load_preset(self: pyorbbecsdk.Device, arg0: str) None
load_preset_from_json_data(self: pyorbbecsdk.Device, arg0: str, arg1: str) None
load_preset_from_json_file(self: pyorbbecsdk.Device, arg0: str) None
read_license_info(self: pyorbbecsdk.Device) str

Read signed device license information as SDK license_info JSON string

reboot(*args, **kwargs)

Overloaded function.

  1. reboot(self: pyorbbecsdk.pyorbbecsdk.Device) -> None

  2. reboot(self: pyorbbecsdk.pyorbbecsdk.Device, delay_ms: int = 0) -> None

Reboot the device with optional delay

set_bool_property(self: pyorbbecsdk.Device, arg0: OBPropertyID, arg1: bool) None
set_depth_work_mode(*args, **kwargs)

Overloaded function.

  1. set_depth_work_mode(self: pyorbbecsdk.pyorbbecsdk.Device, arg0: pyorbbecsdk.pyorbbecsdk.OBDepthWorkMode) -> pyorbbecsdk.pyorbbecsdk.OBStatus

  2. set_depth_work_mode(self: pyorbbecsdk.pyorbbecsdk.Device, arg0: str) -> pyorbbecsdk.pyorbbecsdk.OBStatus

set_device_state_changed_callback(self: pyorbbecsdk.Device, arg0: Callable) None
set_float_property(self: pyorbbecsdk.Device, arg0: OBPropertyID, arg1: float) None
set_hdr_config(self: pyorbbecsdk.Device, arg0: pyorbbecsdk.OBHdrConfig) None
set_int_property(self: pyorbbecsdk.Device, arg0: OBPropertyID, arg1: int) None
set_ip_config(*args, **kwargs)

Overloaded function.

  1. set_ip_config(self: pyorbbecsdk.pyorbbecsdk.Device, arg0: pyorbbecsdk.pyorbbecsdk.OBNetIpConfigV2) -> None

  2. set_ip_config(self: pyorbbecsdk.pyorbbecsdk.Device, arg0: pyorbbecsdk.pyorbbecsdk.OBDeviceIpAddrConfig) -> None

set_multi_device_sync_config(self: pyorbbecsdk.Device, arg0: pyorbbecsdk.OBMultiDeviceSyncConfig) None
set_preset_resolution_config(self: pyorbbecsdk.Device, arg0: pyorbbecsdk.OBPresetResolutionConfig) None
set_timestamp_reset_config(self: pyorbbecsdk.Device, arg0: pyorbbecsdk.OBDeviceTimestampResetConfig) None
switch_color_preset(self: pyorbbecsdk.Device, arg0: str) None
sync_hardware_pps_time(self: pyorbbecsdk.Device, hardware_pps_time: int) bool

Synchronize the device time (synchronize hardwarePPS time to device)

timer_reset(self: pyorbbecsdk.Device) None
timer_sync_with_host(self: pyorbbecsdk.Device) None
timestamp_reset(self: pyorbbecsdk.Device) None
trigger_capture(self: pyorbbecsdk.Device) None
update_firmware(self: pyorbbecsdk.Device, file_path: str, callback: Callable, async_update: bool = True) None
update_optional_depth_presets(self: pyorbbecsdk.Device, file_path_list: list, callback: Callable) None
update_optional_depth_presets_from_data(self: pyorbbecsdk.Device, data_list: list, callback: Callable) None

Update the device optional depth presets from preset data blocks loaded in memory (a list of bytes objects)

write_license_info(self: pyorbbecsdk.Device, license_info: str) None

Write signed device license information (SDK license_info JSON string)

6.1.1.3. DeviceInfo

class pyorbbecsdk.DeviceInfo

Bases: pybind11_object

__init__(*args, **kwargs)
get_asic_name(self: pyorbbecsdk.DeviceInfo) str

Get the ASIC name of the device

get_connection_type(self: pyorbbecsdk.DeviceInfo) str

Get the connection type of the device

get_device_gateway(self: pyorbbecsdk.DeviceInfo) str

Get device gateway

get_device_ip_address(self: pyorbbecsdk.DeviceInfo) str

Get device ip address

get_device_subnet_mask(self: pyorbbecsdk.DeviceInfo) str

Get device subnet mask

get_device_type(self: pyorbbecsdk.DeviceInfo) pyorbbecsdk.OBDeviceType

Get the device type

get_firmware_version(self: pyorbbecsdk.DeviceInfo) str

Get the version number of the firmware

get_hardware_version(self: pyorbbecsdk.DeviceInfo) str

Get the version number of the hardware

get_name(self: pyorbbecsdk.DeviceInfo) str

Get device name

get_pid(self: pyorbbecsdk.DeviceInfo) int

Get device pid

get_serial_number(self: pyorbbecsdk.DeviceInfo) str

Get the serial number of the device

get_supported_min_sdk_version(self: pyorbbecsdk.DeviceInfo) str

Get the minimum version number of the SDK supported by the device

get_uid(self: pyorbbecsdk.DeviceInfo) str

Get system assigned uid for distinguishing between different devices

get_vid(self: pyorbbecsdk.DeviceInfo) int

Get device vid

6.1.1.4. DeviceList

class pyorbbecsdk.DeviceList

Bases: pybind11_object

__init__(*args, **kwargs)
get_count(self: pyorbbecsdk.DeviceList) int
get_device_by_index(self: pyorbbecsdk.DeviceList, index: int, access_mode: pyorbbecsdk.OBDeviceAccessMode = <OBDeviceAccessMode.OB_DEVICE_DEFAULT_ACCESS: 4>) pyorbbecsdk.Device
get_device_by_serial_number(self: pyorbbecsdk.DeviceList, serial_number: str, access_mode: pyorbbecsdk.OBDeviceAccessMode = <OBDeviceAccessMode.OB_DEVICE_DEFAULT_ACCESS: 4>) pyorbbecsdk.Device
get_device_by_uid(self: pyorbbecsdk.DeviceList, uid: str, access_mode: pyorbbecsdk.OBDeviceAccessMode = <OBDeviceAccessMode.OB_DEVICE_DEFAULT_ACCESS: 4>) pyorbbecsdk.Device
get_device_connection_type_by_index(self: pyorbbecsdk.DeviceList, arg0: int) str
get_device_gateway_by_index(self: pyorbbecsdk.DeviceList, arg0: int) str
get_device_ip_address_by_index(self: pyorbbecsdk.DeviceList, arg0: int) str
get_device_name_by_index(self: pyorbbecsdk.DeviceList, arg0: int) str
get_device_pid_by_index(self: pyorbbecsdk.DeviceList, arg0: int) int
get_device_serial_number_by_index(self: pyorbbecsdk.DeviceList, arg0: int) str
get_device_subnet_mask_by_index(self: pyorbbecsdk.DeviceList, arg0: int) str
get_device_uid_by_index(self: pyorbbecsdk.DeviceList, arg0: int) str
get_device_user_name_by_index(self: pyorbbecsdk.DeviceList, arg0: int) str

Get the user-defined name of the device at the specified index

get_device_vid_by_index(self: pyorbbecsdk.DeviceList, arg0: int) int
get_ip_source_type(self: pyorbbecsdk.DeviceList, arg0: int) pyorbbecsdk.OBIpSourceType

Get the current GVCP IP configuration status of the device

get_local_gateway(self: pyorbbecsdk.DeviceList, arg0: int) str

Get the host gateway for the specified device

get_local_ip(self: pyorbbecsdk.DeviceList, arg0: int) str

Get the host Ip address for the specified device

get_local_mac_address(self: pyorbbecsdk.DeviceList, arg0: int) str

Get the host Mac address for the specified device

get_local_net_interface_name(self: pyorbbecsdk.DeviceList, arg0: int) str

Get the name of the host network interface corresponding to the device

get_local_subnet_length(self: pyorbbecsdk.DeviceList, arg0: int) int

Get the host subnet length for the specified device

query_device_access_state(self: pyorbbecsdk.DeviceList, index: int) pyorbbecsdk.OBDeviceAccessState

Query the current device access state (GVCP CCP) without opening the device. Blocks on the network; prefer calling off the UI thread

query_device_access_state_by_serial_number(self: pyorbbecsdk.DeviceList, serial_number: str) pyorbbecsdk.OBDeviceAccessState

Query the current device access state (GVCP CCP) by serial number without opening the device. Blocks on the network; prefer calling off the UI thread

6.1.1.5. DevicePresetList

class pyorbbecsdk.DevicePresetList

Bases: pybind11_object

__init__(*args, **kwargs)
get_count(self: pyorbbecsdk.DevicePresetList) int
get_name_by_index(self: pyorbbecsdk.DevicePresetList, arg0: int) str
has_preset(self: pyorbbecsdk.DevicePresetList, arg0: str) bool

6.1.1.6. Sensor

class pyorbbecsdk.Sensor

Bases: pybind11_object

__init__(*args, **kwargs)
get_stream_profile_list(self: pyorbbecsdk.Sensor) pyorbbecsdk.StreamProfileList
get_type(self: pyorbbecsdk.Sensor) pyorbbecsdk.OBSensorType
start(self: pyorbbecsdk.Sensor, arg0: pyorbbecsdk.StreamProfile, arg1: Callable) None
stop(self: pyorbbecsdk.Sensor) None
switch_profile(self: pyorbbecsdk.Sensor, arg0: pyorbbecsdk.StreamProfile) None

6.1.1.7. SensorList

class pyorbbecsdk.SensorList

Bases: pybind11_object

__init__(*args, **kwargs)
get_count(self: pyorbbecsdk.SensorList) int
get_sensor_by_index(self: pyorbbecsdk.SensorList, arg0: int) pyorbbecsdk.Sensor
get_sensor_by_type(self: pyorbbecsdk.SensorList, arg0: pyorbbecsdk.OBSensorType) pyorbbecsdk.Sensor
get_type_by_index(self: pyorbbecsdk.SensorList, arg0: int) pyorbbecsdk.OBSensorType

6.1.1.8. CameraParamList

class pyorbbecsdk.CameraParamList

Bases: pybind11_object

__init__(*args, **kwargs)
get_camera_param(self: pyorbbecsdk.CameraParamList, arg0: int) pyorbbecsdk.OBCameraParam

Get the camera parameters for the specified index

get_count(self: pyorbbecsdk.CameraParamList) int

Get the number of devices in the list

6.1.1.9. PresetResolutionConfigList

class pyorbbecsdk.PresetResolutionConfigList

Bases: pybind11_object

__init__(*args, **kwargs)
get_count(self: pyorbbecsdk.PresetResolutionConfigList) int

Get the number of device preset resolution ratio in the list

get_preset_resolution_ratio_config(self: pyorbbecsdk.PresetResolutionConfigList, arg0: int) pyorbbecsdk.OBPresetResolutionConfig

Get the device preset resolution ratio at the specified index

6.1.1.10. OBDepthWorkModeList

class pyorbbecsdk.OBDepthWorkModeList

Bases: pybind11_object

__init__(*args, **kwargs)
get_count(self: pyorbbecsdk.OBDepthWorkModeList) int

Get the number of OBDepthWorkMode objects in the list

get_depth_work_mode_by_index(self: pyorbbecsdk.OBDepthWorkModeList, arg0: int) pyorbbecsdk.OBDepthWorkMode

Get the OBDepthWorkMode object at the specified index