Java API Reference

namespace com::orbbec::obsensor
AccelFrame : public com.orbbec.obsensor.Frame

Acceleration streaming data frame

Public Functions

inline float[] getAccelData ()

Get acceleration frame data

Returns

float[3]{x,y,z} returns acceleration frame data

inline float getTemperature()

Get the temperature when the frame is sampled

Returns

temperature at frame sampling

enum AccelFullScaleRange

Accelerometer range enumeration

Public Functions

inline AccelFullScaleRange(int value)
inline int value()

Get the index corresponding to the accelerometer range

Returns

index value

Public Members

FS_2g   =(1)

1x the acceleration of gravity

FS_4g   =(2)

4 times the acceleration of gravity

FS_8g   =(3)

8 times the acceleration of gravity

FS_16g   =(4)

16 times the acceleration of gravity

Public Static Functions

static inline AccelFullScaleRange get(int value)

Get the range enumeration value corresponding to the specified index

Parameters

value – index value

Returns

Accelerometer range enumeration value

Private Members

final int mValue
AccelStreamProfile : public com.orbbec.obsensor.StreamProfile

Accelerometer Profile

Public Functions

inline AccelFullScaleRange getAccelFullScaleRange()

Get the range of the accelerometer configuration

Returns

Accelerometer range AccelFullScaleRange

inline SampleRate getAccelSampleRate()

Get the sampling frequency of the accelerometer stream configuration

Returns

Accelerometer sampling frequency SampleRate

enum AlignMode

D2C Status

Public Functions

inline AlignMode(int value)
inline int value()

Get the index corresponding to the data stream format

Returns

index value

Public Members

ALIGN_D2C_DISABLE   =(0)

Close D2C

ALIGN_D2C_HW_ENABLE   =(1)

Enable hardware D2C

ALIGN_D2C_SW_ENABLE   =(2)

Enable software D2C

Public Static Functions

static inline AlignMode get(int value)

Get the data stream format corresponding to the specified index

Parameters

value – index value

Returns

data stream format

Private Members

final int mValue
class CameraParam

Camera parameters

Public Functions

inline CameraIntrinsic getDepthIntrinsic()

Get depth camera internal parameters

Returns

Returns the depth camera intrinsic parameter CameraIntrinsic

inline CameraIntrinsic getColorIntrinsic()

Get color camera internal parameters

Returns

Returns the color camera intrinsic parameter CameraIntrinsic

inline CameraDistortion getDepthDistortion()

Get depth camera distortion parameters

Returns

Returns the depth camera distortion parameter CameraDistortion

inline CameraDistortion getColorDistortion()

Get color camera dewarping parameters

Returns

Returns the color camera dewarping parameter Distortion

inline D2CTransform getD2CTransform()

Get rotation/transformation matrix

Returns

Rotation/Transformation matrix D2CTransform

inline boolean isMirrored()

Whether the image frame corresponding to this group of parameters is mirrored

Returns

Whether the image frame corresponding to this group of parameters is mirrored

CameraParamList : public com.orbbec.obsensor.LobClass

Camera parameter list

Public Functions

inline int getCameraParamCount()

Get the number of camera parameters

Returns

The number of camera parameters

inline CameraParam getCameraParam(int index)

Obtain camera parameters according to the specified index in the camera parameter list

Parameters

index – index value

Returns

Camera parameter CameraParam

inline void close()

resource release

ColorFrame : public com.orbbec.obsensor.VideoFrame

Color stream data frame

Config : public com.orbbec.obsensor.LobClass

Used to configure Pipeline data flow status

Public Functions

inline Config()

Create a new pipeline configuration to configure the resolution and frame rate of the data stream and data stream that needs to be opened through the Pipeline

inline void enableStream(StreamProfile streamProfile)

Start the data stream of the specified configuration

See

Pipeline::getStreamProfileList(SensorType)

Parameters

streamProfile – Data flow configurationStreamProfile

inline void disableStream(StreamType streamType)

Close the data stream of the specified configuration, through this interface, you can configure which data stream needs to be closed

Parameters

streamType – Data stream configurationStreamType

inline void setAlignMode(AlignMode mode)

Set the alignment mode

Parameters

modeAlignModeAlignMode

inline void close()

Release Config object resources

class DataType

Data type base class, used to represent the type of Native structure mapped to Java

Subclassed by com.orbbec.obsensor.datatype.CameraDistortion, com.orbbec.obsensor.datatype.CameraIntrinsic, com.orbbec.obsensor.datatype.D2CTransform, com.orbbec.obsensor.datatype.DeviceTemperature, com.orbbec.obsensor.datatype.ExposureThresholdControl, com.orbbec.obsensor.datatype.MultiDeviceSyncConfig, com.orbbec.obsensor.datatype.OBRect

Public Functions

abstract int BYTES ()

Get the number of bytes occupied by the Native structure

Returns

The number of bytes occupied by the Native structure

inline boolean checkInitialized()

Check whether the corresponding Java class is initialized successfully

Returns

Whether the Java class is initialized, false: failure, true: success

class DataUtilities

data processing tools

Public Static Functions

static inline byte[] subBytes (byte[] bytes, int offset, int length)

Intercept byte array

Parameters
  • bytes – array to be intercepted

  • offset – start position of interception

  • length – intercepted length

Returns

Return the truncated array

static inline void appendBytes (byte[] src, byte[] dst, int offset, int length)

byte array concatenation

Parameters
  • src – array to be concatenated

  • dst – concatenated array

  • offset – splicing start position

  • length – splice length

static inline byte[] shortToBytes (short s)

Convert short data to byte array

Parameters

s – data to be converted

Returns

Converted byte array

static inline byte[] shortsToBytes (short[] ss)

Convert short array to byte array

Parameters

ss – array of shorts to convert

Returns

Converted byte array

static inline short bytesToShort (byte[] bytes)

Convert byte array to short data

Parameters

bytes – The byte array to be converted

Returns

converted short data

static inline short[] bytesToShorts (byte[] bytes, int count)

Convert byte array to short array

Parameters
  • bytes – The byte array to be converted

  • count – the length of the short array

Returns

converted array of shorts

static inline byte[] intToBytes (int i)

Convert int type data to byte array

Parameters

i – int data to be converted

Returns

converted byte array

static inline byte[] intsToBytes (int[] is)

Convert int array to byte array

Parameters

the – array of ints to convert

Returns

converted byte array

static inline int bytesToInt (byte[] bytes)

Convert byte array to int data

Parameters

bytes – The byte array to be converted

Returns

converted int type data

static inline int[] bytesToInts (byte[] bytes, int count)

Convert byte array to int array

Parameters
  • bytes – The byte array to be converted

  • count – the length of the converted int array

Returns

converted int array

static inline byte[] floatToBytes (float f)

Convert float data type to byte array

Parameters

f – float data type to convert

Returns

converted byte array

static inline byte[] floatsToBytes (float[] fs)

Convert float array to byte array

Parameters

fs – array of floats to convert

Returns

converted byte array

static inline float bytesToFloat (byte[] bytes)

Convert byte array to float array

Parameters

bytes – The byte array to be converted

Returns

the length of the converted float array

static inline float[] bytesToFloats (byte[] bytes, int count)

Convert byte array to float array

Parameters
  • bytes – The byte array to be converted

  • count – the length of the converted float array

Returns

converted float array

static inline byte[] stringToBytes (String s)

Convert String to byte array

Parameters

s – String to convert

Returns

converted byte array

static inline String bytesToString (byte[] bytes)

Convert byte array to String

Parameters

bytes – The byte array to be converted

Returns

converted string

static inline String floatsToString (float[] floats)

Convert float array to string

Parameters

floats – array of floats to convert

Returns

converted string

static inline String intsToString (int[] ints)

int array converted to string

Parameters

ints – array of ints to convert

Returns

converted string

DepthFrame : public com.orbbec.obsensor.VideoFrame

Depth Streaming DataFrame

Public Functions

inline float getValueScale()

Get the value scale of the depth frame, the unit is mm/step, such as valueScale=0.1, the pixel value of a certain coordinate is pixelValue=10000, it means the depth value, value = pixelValue*valueScale = 10000*0.1=1000mm。

Returns

A scale value of depth frame

enum DepthPrecisionLevel

depth precision level

The depth precision level does not completely determine the depth unit and real precision, and the influence of the data packaging format needs to be considered. The specific unit can be obtained through getValueScale() of DepthFrame

See

DepthFrame::getValueScale()

Public Functions

inline DepthPrecisionLevel(int value)
inline int value()

Get the index corresponding to the depth precision level

Returns

index value

Public Members

OB_PRECISION_1MM   =(0)

1mm

OB_PRECISION_0MM25   =(1)

0.5mm

OB_PRECISION_0MM5   =(2)

0.25mm

OB_PRECISION_0MM1   =(3)

0.1mm

OB_PRECISION_COUNT   =(4)

Public Static Functions

static inline DepthPrecisionLevel get(int value)

Get the depth precision level corresponding to the specified index

Parameters

value – index value

Returns

depth precision level

Private Members

final int mValue
Device : public com.orbbec.obsensor.LobClass

Expose orbbec device functions

Public Functions

inline List<Sensor> querySensors()

Query the list of sensors contained in the device

Returns

Sensor list

inline List<DevicePropertyInfo> getSupportedPropertyList()

Get the list of property information supported by the device

Returns

List of property information supported by the device List<DevicePropertyInfo>

inline boolean isPropertySupported(DeviceProperty property, PermissionType permissionType)

Query whether the device supports setting the specified device property

Parameters
Returns

true supports, false does not support

inline void setPropertyValueB(DeviceProperty property, boolean value)

Set the value of the boolean type device property

Parameters
  • property – device property DeviceProperty

  • value – Set the value of the device property, boolean type

inline void setPropertyValueI(DeviceProperty property, int value)

Set the value of the int type device property

Parameters
  • property – device property DeviceProperty

  • value – Set the value of the device property, int type

inline void setPropertyValueF(DeviceProperty property, float value)

Set the value of the float type device property

Parameters
  • property – device property DeviceProperty

  • value – set the value of the device property, float type

inline void setPropertyValueDataType(DeviceProperty property, DataType dataType)

Set the data structure of the corresponding device properties

Parameters
Throws

OBException – When there is an error in the encapsulation of the data structure to be set

inline boolean getPropertyValueB(DeviceProperty property)

Get the value of the boolean type device property

Parameters

property – device property DeviceProperty

Returns

The value of the device property, boolean type

inline int getPropertyValueI(DeviceProperty property)

Get the value of the int type device property

Parameters

property – device property DeviceProperty

Returns

The value of the device property, int type

inline float getPropertyValueF(DeviceProperty property)

Get the value of the float type device property

Parameters

property – device property DeviceProperty

Returns

The value of the device property, float type

inline void getPropertyValueDataType(DeviceProperty property, DataType dataType)

Get the data structure of the corresponding device properties

Parameters
Throws

OBException – When there is an error in parsing the obtained data structure

inline int getMinRangeI(DeviceProperty property)

Get the minimum value supported by the int type device property

Parameters

property – device property DeviceProperty

Returns

The minimum value supported by the device property, int type

inline float getMinRangeF(DeviceProperty property)

Get the minimum value supported by the float type device property

Parameters

property – device property DeviceProperty

Returns

The minimum value supported by the device property, float type

inline int getMaxRangeI(DeviceProperty property)

Get the maximum value supported by the int type device property

Parameters

property – device property DeviceProperty

Returns

The maximum value supported by the device property, int type

inline float getMaxRangeF(DeviceProperty property)

Get the maximum value supported by the float type device property

Parameters

property – device DeviceProperty

Returns

The maximum value supported by the device property, float type

inline int getStepI(DeviceProperty property)

Get the step value at which the int type device property changes within the supported range

Parameters

property – device property DeviceProperty

Returns

The step value that changes within the range supported by the device property, int type

inline float getStepF(DeviceProperty property)

Get the step value at which the float type device property changes within the supported range

Parameters

property – device property DeviceProperty

Returns

The step value that changes within the range supported by the device property, float type

inline boolean getDefaultB(DeviceProperty property)

Get the default value of the boolean type device property

Parameters

property – device property DeviceProperty

Returns

The default value supported by the device property, boolean type

inline int getDefaultI(DeviceProperty property)

Get the default value of the int type device property

Parameters

property – device property DeviceProperty

Returns

The default value supported by the device property, int type

inline float getDefaultF(DeviceProperty property)

Get the default value of the float type device property

Parameters

property – device property DeviceProperty

Returns

The default value supported by the device property, float type

inline DeviceInfo getInfo()

Get device information

Returns

device information DeviceInfo

inline Sensor getSensor(SensorType type)

Get the sensor of the specified type

Parameters

type – sensor type SensorType

Returns

sensor Sensor

inline void upgrade(String fileName, UpgradeCallback callback)

Upgrade device firmware

Parameters
  • fileName – firmware path

  • callback – callback during the upgrade process UpgradeCallback

Throws

OBException – The firmware path is abnormal

inline void sendFileToDestination(String filePath, String dstPath, FileSendCallback callback)

Transfer files to the specified path

Parameters
  • filePath – source file path

  • dstPath – Target path

  • callback – File transfer callbackFileSendCallback

inline DeviceTemperature getDeviceTemperature()

Get device temperature information

Returns

temperature information DeviceTemperature

inline boolean activateAuthorization(String authCode)

Activate the device with an authorization code

Parameters

authCode – Authorization code

Returns

Whether the activation is successful, the activation succeeds: true, the activation fails: false

inline void setStateChangeListener(OnStateChangeListener listener)

Set device status monitoring

Parameters

listener – callback when device status changes OnStateChangeListener

inline void setMultiDeviceSyncConfig(MultiDeviceSyncConfig config)

Set up a multi-device sync configuration

Parameters

config – multidevice sync config MultiDeviceSyncConfig

inline MultiDeviceSyncConfig getMultiDeviceSyncConfig()

Get multi-device sync configuration

Returns

Return multi-device sync config MultiDeviceSyncConfig

inline long syncDeviceTime()

Synchronize the device time (time to the device, synchronize the local system time to the device)

Returns

command round trip time delay(round trip time, rtt)

inline CameraParamList getCalibrationCameraParamList()

Get a list of calibrated camera parameters

Returns

Camera parameter list CameraParamList

inline void reboot()

The device restarts. After the device restarts, the original device resources need to be released, and can be re-acquired after the device is reconnected.

inline void close()

release device resources

interface OnStateChangeListener

Device Status Monitoring

Public Functions

void onStateChange(DeviceStateType stateType, String msg)

Callback when device status changes

Parameters
  • stateType – state type

  • msg – state meesage

interface DeviceChangedCallback

Callback interface for registering listening device status

Public Functions

void onDeviceAttach(DeviceList deviceList)

Device addition notification and list

Parameters

deviceList – Add device list DeviceList

void onDeviceDetach(DeviceList deviceList)

Device removal notices and lists

Parameters

deviceList – Remove device list DeviceList

DeviceInfo : public com.orbbec.obsensor.LobClass

Device information

Public Functions

inline String getName()

Get device name

Returns

device name

inline int getPid()

Get device identification number

Returns

device identification number

inline int getVid()

Get the company identification number of the device

Returns

company identification number

inline String getUid()

Get device uid

Returns

Device Unique ID

inline String getSerialNumber()

Get device serial number

Returns

devise serial number

inline String getUsbType()

Get the USB type the device is connected to

Returns

The type of USB the device is connected to

inline String getConnectionType()

/if English Get the connection type of device

Returns

The device connection type /else 获取设备连接类型

Returns

设备连接类型 /endif

inline String getFirmwareVersion()

Get firmware version number

Returns

Returns the firmware version number

inline String getHardwareVersion()

Get the version number of the hardware

Returns

Returns the version number of the hardware

inline String getSupportedMinSdkVersion()

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

Returns

Returns the minimum SDK version number supported by the device

inline String getAsicName()

Get chip type name

Returns

Returns the chip type name

inline DeviceType getDeviceType()

Get device type

Returns

Returns the device type DeviceType

inline void close()

resource release

DeviceList : public com.orbbec.obsensor.LobClass

Device list

Public Functions

inline int getDeviceCount()

Get the number of devices

Returns

the number of devices

inline String getName(int index)

Get the device serial number according to the specified index in the device list

Parameters

index – index value

Returns

devise serial number

inline int getPid(int index)

Obtain the product identification number of the device according to the specified index in the device list

Parameters

index – index value

Returns

product identification number

inline int getVid(int index)

Obtain the identification number of the company which the device belongs according to the specified index in the device list

Parameters

index – index value

Returns

company identification number

inline String getUid(int index)

Obtain the unique ID of the device according to the specified index in the device list

Parameters

index – index value

Returns

Device Unique ID

inline String getDeviceSerialNumber(int index)

Get the device serial number according to the specified index in the device list

Parameters

index – index value

Returns

devise serial number

inline Device getDevice(int index)

Get the device object according to the specified index in the device list

Parameters

index – index value

Returns

designated device

inline Device getDeviceBySerialNumber(String serialNum)

Create a device, if the device has been acquired and created elsewhere, repeated acquisition will return an error

Parameters

serialNum – The serial number of the device to be created

Returns

Returns the created device Device

inline Device getDeviceByUid(String uid)

Create a device, if the device has been acquired and created elsewhere, repeated acquisition will return an error

Parameters

uid – The uid of the device to create

Returns

Returns the created device Device

inline void close()

resource release

interface DeviceListener

SDK device listening interface

Public Functions

void onDeviceAttach()

Device add notification

void onDeviceDetach()

Device removal notification

enum DeviceProperty

Device Property

Public Functions

inline DeviceProperty(int value)
inline int value()

获取设备属性对应的索引

Returns

索引值

Public Members

OB_PROP_LDP_BOOL   =(2)

LDP switch

OB_PROP_LASER_BOOL   =(3)

laser switch

OB_PROP_LASER_CURRENT_FLOAT   =(5)

laser current

OB_PROP_FLOOD_BOOL   =(6)

flood switch

OB_PROP_DEPTH_MIRROR_BOOL   =(14)

depth mirror

OB_PROP_DEPTH_FLIP_BOOL   =(15)

depth flip

OB_PROP_DEPTH_POSTFILTER_BOOL   =(16)

depth post filter

OB_PROP_DEPTH_HOLEFILTER_BOOL   =(17)

depth hole filter

OB_PROP_IR_MIRROR_BOOL   =(18)

IR mirror

OB_PROP_IR_FLIP_BOOL   =(19)

IR flip

OB_PROP_MIN_DEPTH_INT   =(22)

minimum depth threshold

OB_PROP_MAX_DEPTH_INT   =(23)

maximum depth threshold

OB_PROP_DEPTH_SOFT_FILTER_BOOL   =(24)

Software filter switch

OB_PROP_LDP_STATUS_BOOL   =(32)

LDP status

OB_PROP_DEPTH_MAX_DIFF_INT   =(40)

soft filter maxdiff param

OB_PROP_DEPTH_MAX_SPECKLE_SIZE_INT   =(41)

soft filter maxSpeckleSize

OB_PROP_TIMESTAMP_OFFSET_INT   =(43)

time stamp adjustment

OB_PROP_HARDWARE_DISTORTION_SWITCH_BOOL   =(61)

Hardware de-distortion switch Rectify

OB_PROP_FAN_WORK_MODE_INT   =(62)

Fan switch mode

OB_PROP_DEPTH_PRECISION_LEVEL_INT   =(75)

The depth precision level may change the depth frame data unit. You need to confirm the setting parameters through the ValueScale interface of DepthFrame. Set parameter reference DepthPrecisionLevel#value() The obtained value can be converted through DepthPrecisionLevel#get(int)

OB_PROP_TOF_FILTER_RANGE_INT   =(76)

tof filter scene range configuration

OB_PROP_LASER_MODE_INT   =(79)

mx6600 laser lighting mode, the firmware only returns 1: IR Drive, 2: Torch at present

OB_PROP_RECTIFY2_BOOL   =(80)

mx6600 brt2r-rectify function switch (brt2r is a special module on mx6600), false: Disable, true: Rectify Enable

OB_PROP_COLOR_MIRROR_BOOL   =(81)

color mirror

OB_PROP_COLOR_FLIP_BOOL   =(82)

color flip

OB_PROP_INDICATOR_LIGHT_BOOL   =(83)

indicator light switch false: Disable, true: Enable

OB_PROP_DISPARITY_TO_DEPTH_BOOL   =(85)

Hardware parallax to depth switch, 0: Turn off the hardware parallax to depth switch, turn on the software parallax to depth switch 1.Turn on the hardware parallax to depth switch, turn off the software parallax to depth switch

OB_PROP_BRT_BOOL   =(86)

BRT function switch (anti-background interference), false: Disable, true: Enable

OB_PROP_WATCHDOG_BOOL   =(87)

Watchdog function switch, false: Disable, true: Enable

OB_PROP_EXTERNAL_SIGNAL_RESET_BOOL   =(88)

External signal triggers restart function switch, false: Disable, true: Enable

OB_PROP_HEARTBEAT_BOOL   =(89)

Heartbeat monitoring function switch, false: Disable, true: Enable

OB_PROP_DEPTH_CROPPING_MODE_INT   =(90)

Depth cropping mode device: OB_DEPTH_CROPPING_MODE_EM (currently only suitable for Longquan Sword)

OB_PROP_D2C_PREPROCESS_BOOL   =(91)

D2C preprocessing switch (such as RGB cropping), false: off, true: on

OB_PROP_RGB_CUSTOM_CROP_BOOL   =(94)

custom RGB cropping switch, 0 is off, 1 is on custom cropping, and the ROI cropping area is issued

OB_PROP_DEVICE_WORK_MODE_INT   =(95)

Device operating mode (power consumption)

OB_STRUCT_DEVICE_TEMPERATURE   =(1003)

Device temperature

OB_STRUCT_TOF_EXPOSURE_THRESHOLD_CONTROL   =(1024)

TOF exposure threshold range

OB_STRUCT_MULTI_DEVICE_SYNC_CONFIG   =(1038)

Multi-device synchronization mode and parameter configuration

OB_PROP_COLOR_AUTO_EXPOSURE_BOOL   =(2000)

Color camera auto exposure

OB_PROP_COLOR_EXPOSURE_INT   =(2001)

Color camera exposure adjustment

OB_PROP_COLOR_GAIN_INT   =(2002)

Color camera gain adjustment

OB_PROP_COLOR_AUTO_WHITE_BALANCE_BOOL   =(2003)

Color camera automatic white balance

OB_PROP_COLOR_WHITE_BALANCE_INT   =(2004)

Color camera white balance adjustment

OB_PROP_COLOR_BRIGHTNESS_INT   =(2005)

Color camera brightness adjustment

OB_PROP_COLOR_SHARPNESS_INT   =(2006)

Color camera sharpness adjustment

OB_PROP_COLOR_SATURATION_INT   =(2008)

Color camera saturation adjustment

OB_PROP_COLOR_CONTRAST_INT   =(2009)

Color camera contrast adjustment

OB_PROP_COLOR_GAMMA_INT   =(2010)

Color camera gamma adjustment

OB_PROP_COLOR_ROLL_INT   =(2011)

Color camera image rotation

OB_PROP_COLOR_AUTO_EXPOSURE_PRIORITY_INT   =(2012)

Color camera auto exposure priority

OB_PROP_COLOR_BACKLIGHT_COMPENSATION_INT   =(2013)

Color camera brightness compensation

OB_PROP_COLOR_HUE_INT   =(2014)

color camera color tint

OB_PROP_COLOR_POWER_LINE_FREQUENCY_INT   =(2015)

Color camera power line frequency

OB_PROP_DEPTH_AUTO_EXPOSURE_BOOL   =(2016)

Automatic exposure of depth camera (infrared camera will be set synchronously under some models of devices)

OB_PROP_DEPTH_EXPOSURE_INT   =(2017)

Depth camera exposure adjustment (infrared cameras will be set synchronously under some models of devices)

OB_PROP_DEPTH_GAIN_INT   =(2018)

Depth camera gain adjustment (infrared cameras will be set synchronously under some models of devices)

OB_PROP_IR_AUTO_EXPOSURE_BOOL   =(2025)

Infrared camera auto exposure (depth camera will be set synchronously under some models of devices)

OB_PROP_IR_EXPOSURE_INT   =(2026)

Infrared camera exposure adjustment (some models of devices will set the depth camera synchronously)

OB_PROP_IR_GAIN_INT   =(2027)

Infrared camera gain adjustment (the depth camera will be set synchronously under some models of devices)

OB_PROP_SDK_DEPTH_FRAME_UNPACK_BOOL   =(3007)

Depth data unpacking function switch on the SDK side (it will be turned on by default every time the stream is opened, and supports RLE/Y10/Y11/Y12/Y14 format)

Public Static Functions

static inline DeviceProperty get(int value)

Get the device properties corresponding to the specified index

Parameters

value – index value

Returns

device properties

Private Members

final int mValue
class DevicePropertyInfo

Characteristics used to describe each property

Public Functions

inline DeviceProperty getProperty()

get property

Returns

return property DeviceProperty

inline String getPropertyName()

get property name

Returns

return property name

inline PropertyType getPropertyType()

get property type

Returns

returns property type PropertyType

inline PermissionType getPermissionType()

Get the permission type of the property

Returns

Returns the attribute’s permission type PermissionType

enum DeviceStateType

Device Status Type

Public Members

NORMAL

The device is normal, the default value

WARN

Device high temperature warning

FATAL

Device overtemperature abnormality

enum DeviceType

Device Type

Public Functions

inline DeviceType(int value)
inline int value()

The index corresponding to the device type

Returns

index value

Public Members

OB_STRUCTURED_LIGHT_MONOCULAR_CAMERA   =(0)

monocular structured light camera

OB_STRUCTURED_LIGHT_BINOCULAR_CAMERA   =(1)

Binocular structured light camera

OB_TOF_CAMERA   =(2)

tof camera

Public Static Functions

static inline DeviceType get(int value)

Get the device type corresponding to the specified index

Parameters

value – index value

Returns

device type

Private Members

final int mValue
interface FileSendCallback

File transfer callback class

Public Functions

void onCallback(short state, short percent, String msg)

file transfer callback

Parameters
  • state – current state

  • msg – status information

  • percent – current status progress, percentage 0~100

Public Members

short FILE_TRAN_STAT_TRANSFER = 2

file transfer

short FILE_TRAN_STAT_DONE = 1

File transfer succeeded

short FILE_TRAN_STAT_PREPARE = 0

preparing

short FILE_TRAN_ERR_DDR = -1

DDR access failed

short FILE_TRAN_ERR_NOT_ENOUGH_SPACE = -2

Insufficient target space error

short FILE_TRAN_ERR_PATH_NOT_WRITABLE = -3

Destination path is not writable

short FILE_TRAN_ERR_MD5_ERROR = -4

MD5 checksum error

short FILE_TRAN_ERR_WRITE_FLASH_ERROR = -5

write flash error

short FILE_TRAN_ERR_TIMEOUT = -6

timeout error

Filter : public com.orbbec.obsensor.LobClass , public Cloneable

Base class for all filters

Subclassed by com.orbbec.obsensor.FormatConvertFilter, com.orbbec.obsensor.PointCloudFilter

Public Functions

inline Frame process(Frame frame)

Process the data frame to get the format converted data frame

Parameters

frame – The data frame to be converted

Returns

Formatted Frame

inline void reset()

Filter reset, after reset, you can reset the format of the filter for the processing of another format

inline void setCallback(FilterCallback callback)

Filter sets the processing result callback function (asynchronous callback interface)

Parameters

callback – filter callback

inline void pushFrame(Frame frame)

filter pushes frame_set into the pending buffer (asynchronous callback interface)

Parameters

frame – data frame

inline void close()

release data frame resources

interface FilterCallback

Filter callback

Public Functions

void onFrame(Frame frame)

dataframe callback

Parameters

frame – dataframe

enum Format

Enumeration value describing pixel format

Public Functions

inline Format(int value)
inline int value()

Get the index corresponding to the data stream format

Returns

index value

Public Members

YUYV   =(0)

YUYV format

YUY2   =(1)

YUY2 format (the actual format is the same as YUYV)

UYVY   =(2)

UYVY format

NV12   =(3)

NV12 format

NV21   =(4)

NV21 format

MJPG   =(5)

MJPG encoding format

H264   =(6)

H.264 encoding format

H265   =(7)

H.265 encoding format

Y16   =(8)

Y16 format, single channel 16bit depth

Y8   =(9)

Y8 format, single channel 8bit depth

Y10   =(10)

Y10 format, single channel 10bit depth (SDK will unpack into Y16 by default)

Y11   =(11)

Y11 format, single channel 11bit depth (SDK will unpack into Y16 by default)

Y12   =(12)

Y12 format, single channel 12bit depth (SDK will unpack into Y16 by default)

GRAY   =(13)

GRAY (the actual format is the same as YUYV)

HEVC   =(14)

HEVC encoding format (the actual format is the same as H265)

I420   =(15)

I420 format

ACCEL   =(16)

Accelerometer data format

GYRO   =(17)

Gyroscope data format

POINT   =(19)

xyz 3D coordinate point format

RGB_POINT   =(20)

xyz 3D coordinate point format with RGB information

RLE   =(21)

RLE pressure test format (SDK will be unpacked into Y16 by default)

RGB888   =(22)

RGB888 format

BGR   =(23)

BGR format (actual BRG888)

UNKNOWN   =(0xff)

unknown format

Public Static Functions

static inline Format get(int value)

Get the data stream format corresponding to the specified index

Parameters

value – index value

Returns

data stream format

Private Members

final int mValue
FormatConvertFilter : public com.orbbec.obsensor.Filter

FormatConvertFilter For data stream format conversion

Public Functions

inline FormatConvertFilter()

Create a format conversion filter

inline void setFormatType(FormatConvertType type)

Set the data stream conversion format

Parameters

type – Data Stream Transformation Format

enum FormatConvertType

for data stream format conversion

Public Functions

inline FormatConvertType(int value)
inline int value()

Get the data stream conversion format corresponding to a specific index value

Returns

index value

Public Members

FORMAT_YUYV_TO_RGB888   =(0)

YUYV to RGB888

FORMAT_I420_TO_RGB888   =(1)

I420 to RGB888

FORMAT_NV21_TO_RGB888   =(2)

NV21 to RGB888

FORMAT_NV12_TO_RGB888   =(3)

NV12 to RGB888

FORMAT_MJPEG_TO_I420   =(4)

MJPG to I420

FORMAT_RGB888_TO_BGR   =(5)

RGB888 to BGR

FORMAT_MJPEG_TO_NV21   =(6)

MJPG to NV21

FORMAT_MJPEG_TO_RGB888   =(7)

MJPG to RG888

Public Static Functions

static inline FormatConvertType get(int value)

Get the data stream conversion format corresponding to the specified index

Parameters

value – index value

Returns

data stream format

Private Members

final int mValue
Frame : public com.orbbec.obsensor.LobClass , public Cloneable

The data frame in the data stream is the base class of ColorFrame, DepthFrame, IRFrame, VideoFrame, FrameSet

Subclassed by com.orbbec.obsensor.AccelFrame, com.orbbec.obsensor.FrameSet, com.orbbec.obsensor.GyroFrame, com.orbbec.obsensor.PointFrame, com.orbbec.obsensor.VideoFrame

Public Functions

inline long getSystemTimeStamp()

Get the system timestamp of the data frame, unit: ms

Returns

system timestamp

inline long getTimeStamp()

Get the device timestamp of the data frame, unit: ms

Returns

device timestamp

inline long getTimeStampUs()

Get the device timestamp of the data frame, unit: us

Returns

device timestamp

inline FrameType getStreamType()

Get the data stream type to which the data frame belongs

Returns

Data stream type FrameType

inline Format getFormat()

Get the data stream format to which the data frame belongs

Returns

Data Stream Format

inline long getFrameIndex()

Get the sequence number of the data frame in the data stream

Returns

data frame number

inline int getDataSize()

Get the data size of the data frame

Returns

data size

inline int getData (byte[] buf)

Get the data of the dataframe

Parameters

buf – byte array to fill frame data

Returns

success, return the size of data had fill to buf; failed, return -1;

inline int getData(ByteBuffer directByteBuffer)

Get the data of the dataFrame

Parameters

directByteBuffer – ByteBuffer to fill frame data.

Returns

success, return the size of data had fill to buf; failed, return -1;

inline int getMetadataSize()

Get the metadata size of the frame

Returns

Returns the metadata size of the frame

inline void getMetadata (byte[] metadata)

Get the metadata of the frame

Parameters

metadata – frame metadata

inline void close()

release data frame resources

interface FrameCallback

data frame callback interface

Public Functions

void onFrame(Frame frame)

Frame callback

Parameters

frame – Data frame

FrameSet : public com.orbbec.obsensor.Frame

Data frame set, including 0~N data frames

Public Functions

inline int getFrameCount()

Get the number of frames in a dataframe set

Returns

number of frames

inline DepthFrame getDepthFrame()

get depth data frame

Returns

depth data frame DepthFrame

inline ColorFrame getColorFrame()

Get color data frame

Returns

color data frame ColorFrame

inline IRFrame getIrFrame()

Get infrared data frame

Returns

Infrared data frame IRFrame

inline PointFrame getPointFrame()

Get point cloud data from a collection of frames

Returns

Return point cloud frame PointFrame

inline void close()

release dataframe set resources

interface FrameSetCallback

frameset callback interface

Public Functions

void onFrameSet(FrameSet frameSet)

Callback with a FrameSet

Parameters

frameSet – Data FrameSet

enum FrameType

Describe the Frame type enumeration value

Public Functions

inline FrameType(int value)
inline int value()

Get the index corresponding to the data frame type

Returns

index value

Public Members

VIDEO   =(0)

Video frames (infrared, color, depth frames are all video frames)

IR   =(1)

Infrared frame

COLOR   =(2)

color frame

DEPTH   =(3)

depth frame

ACCEL   =(4)

Accelerometer data frame

FRAME_SET   =(5)

Frame collection (internally contains a variety of data frames)

POINTS   =(6)

point cloud frame

GYRO   =(7)

Gyroscope data frame

Public Static Functions

static inline FrameType get(int value)

Get the data frame type corresponding to the specified index

Parameters

value – index value

Returns

data frame type

Private Members

final int mValue
GyroFrame : public com.orbbec.obsensor.Frame

Gyroscope data frame

Public Functions

inline float[] getGyroData ()

Get gyroscope data

Returns

float[3]{x,y,z} returns acceleration data

inline float getTemperature()

Get the temperature when the frame is sampled

Returns

temperature at frame sampling

enum GyroFullScaleRange

Enumeration of gyroscope ranges

Public Functions

inline GyroFullScaleRange(int value)
inline int value()

Get the index corresponding to the gyro range

Returns

index value

Public Members

FS_16dps   =(1)

16 degrees per second

FS_31dps   =(2)

31 degrees per second

FS_62dps   =(3)

62 degrees per second

FS_125dps   =(4)

125 degrees per second

FS_245dps   =(5)

245 degrees per second

FS_250dps   =(6)

250 degrees per second

FS_500dps   =(7)

500 degrees per second

FS_1000dps   =(8)

1000 degrees per second

FS_2000dps   =(9)

2000 degrees per second

Public Static Functions

static inline GyroFullScaleRange get(int value)

Get the range enumeration value corresponding to the specified index of the gyroscope

Parameters

value – index value

Returns

Gyroscope range enumeration

Private Members

final int mValue
GyroStreamProfile : public com.orbbec.obsensor.StreamProfile

Gyro stream profile

Public Functions

inline GyroFullScaleRange getGyroFullScaleRange()

Get the range of the gyroscope configuration

Returns

Gyroscope range GyroFullScaleRange

inline SampleRate getGyroSampleRate()

Get the data sampling rate of the gyroscope configuration

Returns

Gyroscope data sample rate SampleRate

IRFrame : public com.orbbec.obsensor.VideoFrame

IR frame

class LobClass : public AutoCloseable

SDK base class, loading core SDK Library

Subclassed by com.orbbec.obsensor.CameraParamList, com.orbbec.obsensor.Config, com.orbbec.obsensor.Device, com.orbbec.obsensor.DeviceInfo, com.orbbec.obsensor.DeviceList, com.orbbec.obsensor.Filter, com.orbbec.obsensor.Frame, com.orbbec.obsensor.OBContext, com.orbbec.obsensor.Pipeline, com.orbbec.obsensor.Playback, com.orbbec.obsensor.Recorder, com.orbbec.obsensor.Sensor, com.orbbec.obsensor.StreamProfile, com.orbbec.obsensor.StreamProfileList

Public Functions

inline long getHandle()

Get the current class handle

Returns

handle

enum LogSeverity

log level, the higher the level, the stronger the log filter

Public Functions

inline LogSeverity(int value)
inline int value()

Get the index corresponding to the log output level

Returns

index value

Public Members

DEBUG   =(0)

debug

INFO   =(1)

information

WARN   =(2)

warning

ERROR   =(3)

error

FATAL   =(4)

fatal error

NONE   =(5)

None (close LOG)

Public Static Functions

static inline LogSeverity get(int value)

Get the log output level corresponding to the specified index

Parameters

value – index value

Returns

log output level

Private Members

final int mValue
enum MediaState

Record playback status

Public Functions

inline MediaState(int value)
inline int value()

Get the index corresponding to the recording and playback status

Returns

index value

Public Members

OB_MEDIA_BEGIN   =(0)

start

OB_MEDIA_PAUSE   =(1)

pause

OB_MEDIA_RESUME   =(2)

recover

OB_MEDIA_END   =(3)

end

Public Static Functions

static inline MediaState get(int value)

Get the recording and playback status corresponding to the specified index

Parameters

value – index value

Returns

Record playback status

Private Members

final int mValue
interface MediaStateCallback

Playback Status Callback

Public Functions

void onState(MediaState state)

playback status callback

Parameters

state – playback status

enum MediaType

Playback data types

Public Functions

inline MediaType(int value)
inline int value()

Get the index corresponding to the data stream format

Returns

index value

Public Members

OB_MEDIA_COLOR_STREAM   =(1)

color stream

OB_MEDIA_DEPTH_STREAM   =(2)

depth stream

OB_MEDIA_IR_STREAM   =(4)

IR stream

OB_MEDIA_GYRO_STREAM   =(8)

gyro stream

OB_MEDIA_ACCEL_STREAM   =(16)

accel stream

OB_MEDIA_CAMERA_PARAM   =(32)

camera parameter

OB_MEDIA_DEVICE_INFO   =(64)

device information

OB_MEDIA_STREAM_INFO   =(128)

stream information

OB_MEDIA_ALL  =(OB_MEDIA_COLOR_STREAM.value()| OB_MEDIA_DEPTH_STREAM.value()| OB_MEDIA_IR_STREAM.value()| OB_MEDIA_GYRO_STREAM.value()| OB_MEDIA_ACCEL_STREAM.value()| OB_MEDIA_CAMERA_PARAM.value()| OB_MEDIA_DEVICE_INFO.value()| OB_MEDIA_STREAM_INFO.value())

all types

Public Static Functions

static inline MediaType get(int value)

Get the data stream format corresponding to the specified index

Parameters

value – index value

Returns

data stream format

Private Members

final int mValue
OBContext : public com.orbbec.obsensor.LobClass

Orbbec SDK context, which can perform device monitoring, query, log management and version query

Public Functions

inline OBContext(Context context, DeviceChangedCallback callback)

Create SDK context, apply for authorization, and enable device listening

Parameters
  • context – For Android environment context, it is recommended to use the context of application

  • callbackDevice listening DeviceChangedCallback

inline OBContext(Context context, String configPath, DeviceChangedCallback callback)

Create SDK context, apply for authorization, and enable device listening

Parameters
  • context – For Android environment context, it is recommended to use the context of application

  • configPath – Profile path

  • callbackDevice listening DeviceChangedCallback

inline DeviceList queryDevices()

Query device list

Returns

Device List DeviceList

inline synchronized void setDevicesChangedCallback (DeviceChangedCallback callback)

Set device plug and unplug listener callback

Parameters

callbackDevice plugging and unplugging monitor DeviceChangedCallback

inline synchronized void removeDevicesChangedCallback ()

Remove device plug and unplug listener callback

inline void enableMultiDeviceSync(long repeatInterval)

Start the multi-device synchronization function to synchronize the clock of the created device (the device needs to support this function)

Parameters

repeatInterval – Timing synchronization time interval (unit ms; if repeatInterval=0, it means that it is only synchronized once, and no longer executed regularly)

inline void close()

SDK Context resource release

Public Static Functions

static inline void setLoggerSeverity(LogSeverity severity)

Setting the level of the global log will affect both the log level output to the console and the log output to the file

Parameters

severity – Output log levelLogSeverity

static inline void setLoggerToConsole(LogSeverity severity)

Set log parameters and output to console

Parameters

severity – Log output level LogSeverity

static inline void setLoggerToFile(LogSeverity severity, String fileName)

Set log parameters and output to the specified file

Parameters
  • severity – Log output level LogSeverity

  • fileName – file path

static inline String getVersionName()

Get SDK version name

Returns

SDK version name

static inline int getVersionCode()

Get SDK version number

Returns

SDK version number

static inline String getCoreVersionName()

Get SDK kernel version name

Returns

SDK kernel version, major.minor.patch

static inline int getCoreVersionCode()

Get SDK kernel version number

Returns

Kernel version number

class OBException : public RuntimeException

Exception thrown by Orbbec sdk

Public Functions

inline OBException()

Create Orbbec SDK exception

inline OBException(String message)

Create Orbbec SDK exception with specific information

Parameters

message – details

enum PermissionType

Enumeration used to describe access rights for properties

Public Functions

inline PermissionType(int value)
inline int value()

Get the index value corresponding to a specific property enumeration

Returns

index value

Public Members

OB_PERMISSION_DENY   =(0)

no access

OB_PERMISSION_READ   =(1)

readable

OB_PERMISSION_WRITE   =(2)

writable

OB_PERMISSION_READ_WRITE   =(3)

can read and write

Public Static Functions

static inline PermissionType get(int value)

Get the attribute value corresponding to the specified index, read and write permission type enumeration

Parameters

value – index value

Returns

property enumeration

Private Members

final int mValue
Pipeline : public com.orbbec.obsensor.LobClass

pipeline: used to control data, it conflicts with the start method of the Sensor class, and the start method cannot be used to start the data stream at the same time. Additional operations can be extended, such as setting high-level interfaces such as data frame synchronization

Public Functions

inline Pipeline(Device device)

Use the specified device to create a Pipeline. To create a Pipeline through this interface, you need to create the corresponding device first.

See

DeviceList::getDevice(int)

inline Pipeline(String playbackFile)

Use the playback file to create a pipeline object

Parameters

playbackFile – The playback file path used to create the pipeline

inline void start(Config config)

Open the data stream of the specified configuration. If you need to use the configuration in the configuration file to open the stream, pass null to config (if there is no configuration file in the case of config passing null, the first one in the open flow configuration list is used by default to open the stream. )

Note: If the pipeline is created by playback file, it means start playback, at this time, config can pass null

Parameters

config – pipeline configuration Config

inline void start(Config config, FrameSetCallback callback)

Open the data stream of the specified configuration, and set the callback of the data frame set. If you need to use the configuration in the configuration file to open the stream, pass null to config (if there is no configuration file in the case of config passing null, the open stream configuration list is used by default. the first to open flow)

Note: If the pipeline is created by the playback file, it means that the playback starts in the callback mode. At this time, config can pass null.

Important: After the callback data frame is used up, FrameSet::close() and Frame::close() must be called to release resources.

Parameters
inline void stop()

stop data stream

inline FrameSet waitForFrameSet(long timeoutMilliseconds)

Query method to obtain data frame set Important: frameset must be called after the data frame is used, Close() and frame Close() releases resources

Parameters

timeoutMilliseconds – wait timeout

Returns

Data frameset FrameSet

inline Config getConfig()

Get the current pipeline configuration, which is configured by the start method

Returns

pipeline configuration Config

inline void enableFrameSync()

Enable frame sync

inline void disableFrameSync()

disable frame sync

inline StreamProfileList getStreamProfileList(SensorType sensorType)

Get the dataflow configuration supported by the specified sensor type

Parameters

sensorTypeSensor TypeSensorType

Returns

stream profile list StreamProfileList

inline void switchConfig(Config config)

Dynamically switch the corresponding config configuration

Parameters

config – pipeline configuration Config

inline StreamProfileList getD2CDepthProfileList(StreamProfile colorProfile, AlignMode mode)

Returns a list of D2C-enabled depth sensor resolutions corresponding to the input color sensor resolution

Parameters
Returns

a configuration list of matching depths

inline OBRect getD2CValidArea(int distance)

Valid area after getting D2C

Parameters

distance – Working distance(mm)

Returns

Returns the area information valid after D2c at the working distance OBRect

inline CameraParam getCameraParam()

Get the camera parameters after D2C. When the pipeline is created by the playback file, the camera internal parameters of the playback device are obtained

Returns

Returns the aligned camera internal parameter CameraParam

inline void startRecord(String filePath)

Start recording

Parameters

filePath – Recorded file path

inline void stopRecord()

stop recording

inline Playback getPlayback()

Get playback object from pipeline

Returns

Returns the playback object Playback

inline void close()

pipeline resource release

Playback : public com.orbbec.obsensor.LobClass

Data Playback

Public Functions

inline Playback(String filePath)

Create playback

Parameters

filePath – playback file path

inline void start(PlaybackCallback callback, MediaType mediaType)

Start playback, playback data is returned from the callback

Parameters
inline void stop()

stop playback

inline DeviceInfo getDeviceInfo()

Get device information

Returns

returns device information DeviceInfo

inline CameraParam getCameraParam()

Get the intrinsic and extrinsic parameter information in the recording file

Returns

returns internal and external parameter information CameraParam

inline void setMediaStateCallback(MediaStateCallback callback)

Set media state callback

Parameters

callback – media state callback

inline void close()

Release callback resource

interface PlaybackCallback

Data frame playback callback interface

Public Functions

void onPlayback(Frame frame)

Data frame playback callback

Parameters

frame – Data Frame

PointCloudFilter : public com.orbbec.obsensor.Filter

PointCloudFilter used to generate normal point cloud data, RGB point cloud data

Public Functions

inline PointCloudFilter()

Create point cloud filter

inline void setPointFormat(Format format)

Set the generated point cloud format

Parameters

format – point cloud format Format

inline void setCameraParam(CameraParam param)

PointCloud Filter device camera parameters

Parameters

param – Camera parameter CameraParam

inline void setD2CAlignStatus(boolean isAlign)

Set D2C alignment state

Parameters

isAlign – D2C alignment status, true: aligned, false: not aligned

PointFrame : public com.orbbec.obsensor.Frame

Public Functions

inline void getPointCloudData (float[] data)

Return point cloud frame data

Parameters

data – Data returned by point cloud frame

enum PropertyType

Property Type Description

Public Functions

inline PropertyType(int value)
inline int value()

Get the index value corresponding to a specific property enumeration

Returns

index value

Public Members

BOOL_PROPERTY   =(0)

property of boolean data

INT_PROPERTY   =(1)

property of int data

FLOAT_PROPERTY   =(2)

property of float data

STRUCT_PROPERTY   =(3)

Properties corresponding to the underlying structure type data

Public Static Functions

static inline PropertyType get(int value)

Get the property value type enumeration corresponding to the specified index

Parameters

value – index value

Returns

property enumeration

Private Members

final int mValue
Recorder : public com.orbbec.obsensor.LobClass

data recorder

Public Functions

inline Recorder()

Create a recorder

inline Recorder(Device device)

Create a recorder by specifying a device

Parameters

device – device Device

inline void start(String fileName, boolean async)

start recording

Parameters
  • fileName – Recorded file name

  • async – Whether to record asynchronously

inline void stop()

Stop recording

inline void writeFrame(Frame frame)

Write frame data to the recorder

Parameters

frame – Written frame data Frame

inline void close()

release recorder resources

enum SampleRate

Enumeration of IMU sample rate values ​​(gyroscope or accelerometer)

Public Functions

inline SampleRate(int value)
inline int value()

Get the accelerometer or gyroscope sampling frequency enumeration value

Returns

index value

Public Members

ODR_1_5625_HZ   =(1)

1.5625Hz

ODR_3_125_HZ   =(2)

3.125Hz

ODR_6_25_HZ   =(3)

6.25Hz

ODR_12_5_HZ   =(4)

12.5Hz

ODR_25_HZ   =(5)

25Hz

ODR_50_HZ   =(6)

50Hz

ODR_100_HZ   =(7)

100Hz

ODR_200_HZ   =(8)

200Hz

ODR_500_HZ   =(9)

500Hz

ODR_1_KHZ   =(10)

1KHz

ODR_2_KHZ   =(11)

2KHz

ODR_4_KHZ   =(12)

4KHz

ODR_8_KHZ   =(13)

8KHz

ODR_16_KHZ   =(14)

16KHz

ODR_32_KHZ   =(15)

32Hz

Public Static Functions

static inline SampleRate get(int value)

Get accelerometer or gyroscope sampling frequency enumeration

Parameters

value – index value

Returns

Accelerometer or gyroscope sampling frequency enumeration

Private Members

final int mValue
Sensor : public com.orbbec.obsensor.LobClass

Expose orbbec sensor function

Public Functions

inline SensorType getType()

Get sensor type

Returns

Sensor Type SensorType

inline StreamProfileList getStreamProfileList()

Get the data stream configuration information supported by the sensor

Returns

The list of data stream configuration information supported by the sensor StreamProfileList

inline void start(StreamProfile profile, FrameCallback callback)

Open the sensor data stream, it cannot be used with the pipeline at the same time. If the configuration in the configuration file is used to open the stream, the profile will pass null (if there is no configuration file when the null is passed, the first configuration in the configuration file list will be used by default. )

Important: After the callback data frame is used up, Frame.close() must be called to release resources.

Parameters
inline void stop()

turn off sensor data stream

inline void switchProfile(StreamProfile profile)

Dynamically switch resolutions

Parameters

profile – resolution that needs to be switched StreamProfile

inline void close()

release sensor resources

enum SensorType

Enumeration value describing the sensor type

Public Functions

inline SensorType(int value)
inline int value()

Get the index corresponding to the sensor type

Returns

index value

Public Members

UNKNOWN   =(0)

Unknown type sensor

IR   =(1)

infrared

COLOR   =(2)

color

DEPTH   =(3)

depth

ACCEL   =(4)

accelerometer

GYRO   =(5)

gyro

Public Static Functions

static inline SensorType get(int value)

Get the sensor type corresponding to the specified index

Parameters

value – index value

Returns

sensor type

Private Members

final int mValue
StreamProfile : public com.orbbec.obsensor.LobClass

Data stream configuration base class

Subclassed by com.orbbec.obsensor.AccelStreamProfile, com.orbbec.obsensor.GyroStreamProfile, com.orbbec.obsensor.VideoStreamProfile

Public Functions

inline Format getFormat()

Get data stream format

Returns

stream format Format

inline StreamType getType()

Get data stream type

Returns

stream type StreamType

inline void close()

resources release

StreamProfileList : public com.orbbec.obsensor.LobClass

stream profile list

Public Functions

inline int getStreamProfileCount()

get stream profile count

Returns

stream profile count

inline StreamProfile getStreamProfile(int index)

Get the configuration according to the specified index in the stream configuration list

Parameters

index – index value

Returns

stream configuration StreamProfile

inline VideoStreamProfile getVideoStreamProfile(int width, int height, Format format, int fps)

Match the corresponding StreamProfile through the passed parameters, if there are multiple matches, the first one in the list will be returned by default

Parameters
  • width – Width, if no matching width is required, pass 0

  • height – Height, if no matching height is required, pass 0

  • format – Type Format , if no matching type is required, pass Format#UNKNOWN

  • fpsFrame rate, pass 0 if there is no need to match the frame rate

Returns

Returns the matching stream configuration

inline void close()

resources release

enum StreamType

Enumeration value describing the type of data stream

Public Functions

inline StreamType(int value)
inline int value()

Get the index corresponding to the data stream type

Returns

index value

Public Members

VIDEO   =(0)

Video stream (infrared, color, depth streams are all video streams)

IR   =(1)

infrared stream

COLOR   =(2)

color stream

DEPTH   =(3)

depth stream

ACCEL   =(4)

Accelerometer data stream

GYRO   =(5)

Gyroscope data stream

Public Static Functions

static inline StreamType get(int value)

Get the data stream type corresponding to the specified index

Parameters

value – index value

Returns

data stream type

Private Members

final int mValue
enum SyncMode

Sync mode

Public Functions

inline SyncMode(int value)
inline int value()

Get the index corresponding to the data stream format

Returns

index value

Public Members

OB_SYNC_STOP   =(0)

stop sync

OB_SYNC_SINGLE_MODE   =(1)

single device mode

OB_SYNC_ONLINE_HOST_MODE   =(2)

The single device mode is also the host mode, which is dominated by ir

OB_SYNC_ONLINE_SLAVE_MODE   =(3)

slave mode (ext_in –> rgb、tof、ext_out)

OB_SYNC_ONLY_MCU_MODE   =(4)

MCU as host mode

OB_SYNC_ONLY_IR_MODE   =(5)

IR as host mode

Public Static Functions

static inline SyncMode get(int value)

Get the data stream format corresponding to the specified index

Parameters

value – index value

Returns

data stream format

Private Members

final int mValue
interface UpgradeCallback

Firmware upgrade callback class

Public Functions

void onCallback(short state, short percent, String msg)

Firmware upgrade callback

Parameters
  • state – current state

  • msg – status information

  • percent – Current status progress, percentage 0~100

Public Members

short STAT_FILE_TRANSFER = 4

Firmware file transfer status

short STAT_DONE = 3

Firmware upgrade complete

short STAT_IN_PROGRESS = 2

Firmware upgrade in progress

short STAT_START = 1

Firmware upgrade starts

short STAT_VERIFY_IMAGE = 0

Firmware file verification

short ERR_VERIFY = -1

Firmware file verification failed

short ERR_PROGRAM = -2

program error

short ERR_ERASE = -3

Erase failed

short ERR_FLASH_TYPE = -4

flash type failed

short ERR_IMG_SIZE = -5

Firmware file size failed

short ERR_OTHER = -6

other errors

short ERR_DDR = -7

DDR error

short ERR_TIMEOUT = -8

Upgrade timed out

VideoFrame : public com.orbbec.obsensor.Frame

Base class for ColorFrame, DepthFrame, IRFrame

Subclassed by com.orbbec.obsensor.ColorFrame, com.orbbec.obsensor.DepthFrame, com.orbbec.obsensor.IRFrame

Public Functions

inline int getWidth()

Get the height of the data frame

Returns

height of the data frame

inline int getHeight()

Get the width of the data frame

Returns

width of the data frame

inline int getPixelAvailableBitSize()

Get the effective number of pixels (such as Y16 format frame, but only the lower 10 bits are valid bits, and the upper 6 bits are filled with 0) Only valid for Y8/Y10/Y11/Y12/Y14/Y16 format

Returns

Returns the effective number of pixels in pixels, or 0 if it is an unsupported format

VideoStreamProfile : public com.orbbec.obsensor.StreamProfile

Data stream configuration for Color, Depth, IR stream

Public Functions

inline int getWidth()

Get data stream width

Returns

data stream width

inline int getHeight()

Get data flow height

Returns

data flow height

inline int getFps()

Get data stream frame rate per second

Returns

streaming frame rate

inline void close()

resource release

namespace datatype
CameraDistortion : public com.orbbec.obsensor.DataType

Distortion Parameters

Public Functions

inline float getK1()

Get Radial Distortion Factor 1

Returns

Radial distortion factor 1

inline float getK2()

Get Radial Distortion Factor 2

Returns

Radial distortion factor 2

inline float getK3()

Get Radial Distortion Factor 3

Returns

Radial distortion factor 3

inline float getK4()

Get Radial Distortion Factor 4

Returns

Radial distortion factor 4

inline float getK5()

Get Radial Distortion Factor 5

Returns

Radial distortion factor 5

inline float getK6()

Get Radial Distortion Factor 6

Returns

Radial distortion factor 6

inline float getP1()

Get the tangential distortion factor 1

Returns

Tangential distortion factor 1

inline float getP2()

Get the tangential distortion factor 2

Returns

Tangential distortion factor 2

inline int BYTES()

Get the number of bytes occupied by the Native structure

Returns

The number of bytes occupied by the Native structure

CameraIntrinsic : public com.orbbec.obsensor.DataType

Camera internal parameters

Public Functions

inline float getFx()

Get the focal length in the x direction, unit: pixel

Returns

returns the focal length in the x-direction

inline float getFy()

Get the focal length in the y direction, unit: pixel

Returns

returns the y-direction focal length

inline float getCx()

Get the abscissa of the optical center

Returns

returns the abscissa of the optical center

inline float getCy()

Get the ordinate of the optical center

Returns

returns the ordinate of the optical center

inline short getWidth()

get image width

Returns

returns image width

inline short getHeight()

get image height

Returns

returns image height

inline int BYTES()

Get the number of bytes occupied by the Native structure

Returns

The number of bytes occupied by the Native structure

D2CTransform : public com.orbbec.obsensor.DataType

Rotation/Transformation Matrix

Public Functions

inline float[] getRot ()

Get rotation matrix, row-major

Returns

rotation matrix

inline float[] getTrans ()

get transformation matrix

Returns

transformation matrix

inline int BYTES()

Get the number of bytes occupied by the Native structure

Returns

The number of bytes occupied by the Native structure

DeviceTemperature : public com.orbbec.obsensor.DataType

Device temperature information

Public Functions

inline float getCpuTemp()

Get CPU temperature, unit: Celsius

Returns

CPU temperature

inline float getIrTemp()

Get IR sensor temperature, unit: Celsius

Returns

IR sensor temperature

inline float getLdmTemp()

Get the temperature of the laser module, unit: Celsius

Returns

Laser module temperature

inline float getMainBoardTemp()

Get the motherboard temperature, unit: Celsius

Returns

motherboard temperature

inline float getTecTemp()

Get the TEC temperature in degrees Celsius

Returns

TEC temperature

inline float getImuTemp()

Get IMU sensor temperature, unit: Celsius

Returns

IMU sensor temperature

inline float getRgbTemp()

Get RGB sensor temperature, unit: Celsius

Returns

RGB sensor temperature

inline int BYTES()

Get the number of bytes occupied by the Native structure

Returns

The number of bytes occupied by the Native structure

ExposureThresholdControl : public com.orbbec.obsensor.DataType

TOF Exposure Threshold

Public Functions

inline int getUpper()

Get the upper limit of the threshold, unit: ms

Returns

upper threshold

inline int getLower()

Get the lower limit of the threshold, unit: ms

Returns

lower threshold

inline void setUpper(int upper)

Set the upper limit of the threshold, unit: ms

Parameters

upper – upper threshold value

inline void setLower(int lower)

Set the lower limit of the threshold, unit: ms

Parameters

lower – Lower threshold value

inline int BYTES()

Get the number of bytes occupied by the Native structure

Returns

The number of bytes occupied by the Native structure

MultiDeviceSyncConfig : public com.orbbec.obsensor.DataType

Tof multi-device synchronization configuration

Public Functions

inline SyncMode getSyncMode()

Get sync mode

Returns

SyncMode SyncMode

inline void setSyncMode(SyncMode mode)

Set sync mode

Parameters

modeSyncMode SyncMode

inline short getTofPhaseDelay()

Get TOF delayed exposure time, unit: us

Returns

TOF delayed exposure time

inline void setTofPhaseDelay(short delay)

Set TOF delayed exposure time, unit: us

Parameters

TOF – delayed exposure time

inline short getRgbPhaseDelay()

Get RGB delayed exposure time, unit: us

Returns

RGB delayed exposure time

inline void setRgbPhaseDelay(short delay)

Set RGB delay exposure time, unit: us

Parameters

delay – RGB delayed exposure time

inline short getOutPhaseDelay()

Get the signal delay output time, unit: us

Returns

Signal delay output time

inline void setOutPhaseDelay(short delay)

Set the signal delay output time, unit: us

Parameters

delay – Signal delay output time

inline short getOutOcPolarity()

Get pulse type

Returns

Return pulse type, 0: positive pulse, 1: negative pulse

inline void setOutOcPolarity(short polarity)

Set the pulse type, 0: positive pulse, 1: negative pulse

Parameters

polarity – Pulse type, 0: positive pulse, 1: negative pulse

inline short getMcuHostFps()

Get the trigger frame rate when the mcu master mode

Returns

Trigger frame rate when returning to mcu master mode

inline void setMcuHostFps(short fps)

Set trigger frame rate when mcu master mode

Parameters

fps – Trigger frame rate in mcu master mode

inline short getCurDevId()

Get the current device number

Returns

Returns the current device number

inline void setCurDevId(short id)

Set the current device number

Parameters

id – device ID

inline int BYTES()

Get the number of bytes occupied by the Native structure

Returns

The number of bytes occupied by the Native structure

OBRect : public com.orbbec.obsensor.DataType

Rectangle description

Public Functions

inline int getX()

Get the x-coordinate of the origin of the rectangle

Returns

returns the x-coordinate of the origin of the rectangle

inline int getY()

Get the y-coordinate of the origin of the rectangle

Returns

returns the y coordinate of the origin of the rectangle

inline int getWidth()

get rectangle width

Returns

returns the width of the rectangle

inline int getHeight()

get rectangle height

Returns

returns the height of the rectangle

inline int BYTES()

Get the number of bytes occupied by the Native structure

Returns

The number of bytes occupied by the Native structure