API 参考

The camport3 libraries provide support for configuring PERCIPIO depth camera, data receiving and post-processing functionality.

API for Percipio depth camera

TYApi.h

includes camera control and data receiving interface, which supports configuration for image resolution, frame rate, exposure

time, gain, working mode,etc.

Defines

_STDBOOL_H
__bool_true_false_are_defined
bool
true
false
TY_DLLIMPORT
TY_DLLEXPORT
TY_STDC
TY_CDEC
TY_EXPORT
TY_EXTC
TY_DECLARE_IMAGE_MODE0(pix, res)
TY_DECLARE_IMAGE_MODE1(pix)
TY_CAPI

Typedefs

typedef enum TY_STATUS_LIST TY_STATUS_LIST

API call return status.

typedef int32_t TY_STATUS
typedef enum TY_FW_ERRORCODE_LIST TY_FW_ERRORCODE_LIST
typedef uint32_t TY_FW_ERRORCODE
typedef enum TY_EVENT_LIST TY_ENENT_LIST
typedef int32_t TY_EVENT
typedef void *TY_INTERFACE_HANDLE

Interface handle.

typedef void *TY_DEV_HANDLE

Device Handle.

typedef enum TY_DEVICE_COMPONENT_LIST TY_DEVICE_COMPONENT_LIST

@breif Device Component list A device contains several component.

Each component can be controlled by its own features, such as image width, exposure time, etc..

参见

To Know how to get feature information please refer to sample code DumpAllFeatures

typedef uint32_t TY_COMPONENT_ID

component unique id

typedef enum TY_FEATURE_TYPE_LIST TY_FEATURE_TYPE_LIST

Feature Format Type definitions.

typedef uint32_t TY_FEATURE_TYPE
typedef enum TY_FEATURE_ID_LIST TY_FEATURE_ID_LIST

feature for component definitions

typedef uint32_t TY_FEATURE_ID

feature unique id

typedef enum TY_DEPTH_QUALITY_LIST TY_DEPTH_QUALITY_LIST
typedef uint32_t TY_DEPTH_QUALITY
typedef enum TY_TRIGGER_POL_LIST TY_TRIGGER_POL_LIST

set external trigger signal edge

typedef uint32_t TY_TRIGGER_POL
typedef enum TY_INTERFACE_TYPE_LIST TY_INTERFACE_TYPE_LIST

Interface type definition.

typedef uint32_t TY_INTERFACE_TYPE
typedef enum TY_ACCESS_MODE_LIST TY_ACCESS_MODE_LIST

Indicate a feature is readable or writable.

typedef uint8_t TY_ACCESS_MODE
typedef enum TY_STREAM_ASYNC_MODE_LIST TY_STREAM_ASYNC_MODE_LIST

stream async mode

typedef uint8_t TY_STREAM_ASYNC_MODE
typedef enum TY_PIXEL_BITS_LIST TY_PIXEL_BITS_LIST

Pixel size type definitions to define the pixel size in bits.

typedef uint32_t TY_PIXEL_BITS
typedef enum TY_PIXEL_FORMAT_LIST TY_PIXEL_FORMAT_LIST

pixel format definitions

typedef uint32_t TY_PIXEL_FORMAT
typedef enum TY_RESOLUTION_MODE_LIST TY_RESOLUTION_MODE_LIST

predefined resolution list

typedef int32_t TY_RESOLUTION_MODE
typedef enum TY_IMAGE_MODE_LIST TY_IMAGE_MODE_LIST

Predefined Image Mode List image mode controls image resolution & format predefined image modes named like TY_IMAGE_MODE_MONO_160x120,TY_IMAGE_MODE_RGB_1280x960.

typedef uint32_t TY_IMAGE_MODE
typedef enum TY_TRIGGER_MODE_LIST TY_TRIGGER_MODE_LIST

参见

refer to sample SimpleView_TriggerMode for detail usage

typedef int16_t TY_TRIGGER_MODE
typedef enum TY_TIME_SYNC_TYPE_LIST TY_TIME_SYNC_TYPE_LIST

type of time sync

typedef uint32_t TY_TIME_SYNC_TYPE
typedef uint32_t TY_E_VOLT_T
typedef uint32_t TY_E_DO_MODE
typedef uint32_t TY_E_DI_MODE
typedef uint32_t TY_E_DI_INT_ACTION
typedef struct TY_VERSION_INFO TY_VERSION_INFO
typedef struct TY_DEVICE_NET_INFO TY_DEVICE_NET_INFO

device network information

typedef struct TY_DEVICE_USB_INFO TY_DEVICE_USB_INFO
typedef struct TY_INTERFACE_INFO TY_INTERFACE_INFO

typedef struct TY_DEVICE_BASE_INFO TY_DEVICE_BASE_INFO

typedef struct TY_FEATURE_INFO TY_FEATURE_INFO
typedef struct TY_INT_RANGE TY_INT_RANGE
typedef struct TY_FLOAT_RANGE TY_FLOAT_RANGE

float range data structure

typedef struct TY_BYTEARRAY_ATTR TY_BYTEARRAY_ATTR

byte array data structure

typedef struct TY_ENUM_ENTRY TY_ENUM_ENTRY

enum feature entry information

typedef struct TY_VECT_3F TY_VECT_3F
typedef struct TY_CAMERA_INTRINSIC TY_CAMERA_INTRINSIC

a 3x3 matrix

.

.

.

fx

0

cx

0

fy

cy

0

0

1

参见

TYGetStruct Usage:

TY_CAMERA_INTRINSIC intrinsic;
TYGetStruct(hDevice, some_compoent, TY_STRUCT_CAM_INTRINSIC, &intrinsic, sizeof(intrinsic));

typedef struct TY_CAMERA_EXTRINSIC TY_CAMERA_EXTRINSIC

a 4x4 matrix

.

.

.

.

r11

r12

r13

t1

r21

r22

r23

t2

r31

r32

r33

t3

0

0

0

1

参见

TYGetStruct Usage:

TY_CAMERA_EXTRINSIC extrinsic;
TYGetStruct(hDevice, some_compoent, TY_STRUCT_EXTRINSIC, &extrinsic, sizeof(extrinsic));

typedef struct TY_CAMERA_DISTORTION TY_CAMERA_DISTORTION

camera distortion parameters

参见

TYGetStruct Usage:

TY_CAMERA_DISTORTION distortion;
TYGetStruct(hDevice, some_compoent, TY_STRUCT_CAM_DISTORTION, &distortion, sizeof(distortion));

typedef struct TY_CAMERA_CALIB_INFO TY_CAMERA_CALIB_INFO

camera ‘s cailbration data

参见

TYGetStruct

typedef struct TY_TRIGGER_PARAM TY_TRIGGER_PARAM
typedef struct TY_TRIGGER_PARAM_EX TY_TRIGGER_PARAM_EX
typedef struct TY_TRIGGER_TIMER_LIST TY_TRIGGER_TIMER_LIST
typedef struct TY_TRIGGER_TIMER_PERIOD TY_TRIGGER_TIMER_PERIOD
typedef struct TY_AEC_ROI_PARAM TY_AEC_ROI_PARAM
typedef struct TY_CAMERA_STATISTICS TY_CAMERA_STATISTICS
typedef struct TY_IMU_DATA TY_IMU_DATA
typedef struct TY_ACC_BIAS TY_ACC_BIAS

a 3x3 matrix

.

.

.

BIASx

BIASy

BIASz

typedef struct TY_ACC_MISALIGNMENT TY_ACC_MISALIGNMENT

a 3x3 matrix

|.

|.|.|

.

.

.

1

-GAMAyz

GAMAzy

GAMAxz

1

-GAMAzx

-GAMAxy

GAMAyx

1

typedef struct TY_ACC_SCALE TY_ACC_SCALE

a 3x3 matrix

.

.

.

SCALEx

0

0

0

SCALEy

0

0

0

SCALEz

typedef struct TY_GYRO_BIAS TY_GYRO_BIAS

a 3x3 matrix

.

.

.

BIASx

BIASy

BIASz

typedef struct TY_GYRO_MISALIGNMENT TY_GYRO_MISALIGNMENT

a 3x3 matrix

.

.

.

1

-ALPHAyz

ALPHAzy

0

1

-ALPHAzx

0

0

1

typedef struct TY_GYRO_SCALE TY_GYRO_SCALE

a 3x3 matrix

.

.

.

SCALEx

0

0

0

SCALEy

0

0

0

SCALEz

typedef struct TY_CAMERA_TO_IMU TY_CAMERA_TO_IMU

a 4x4 matrix

.

.

.

.

r11

r12

r13

t1

r21

r22

r23

t2

r31

r32

r33

t3

0

0

0

1

typedef struct TY_TOF_FREQ TY_TOF_FREQ
typedef enum TY_IMU_FPS_LIST TY_IMU_FPS_LIST
typedef struct TY_IMAGE_DATA TY_IMAGE_DATA
typedef struct TY_FRAME_DATA TY_FRAME_DATA
typedef struct TY_EVENT_INFO TY_EVENT_INFO
typedef struct TY_DO_WORKMODE TY_DO_WORKMODE
typedef struct TY_DI_WORKMODE TY_DI_WORKMODE
typedef void (*TY_EVENT_CALLBACK)(TY_EVENT_INFO*, void *userdata)
typedef void (*TY_IMU_CALLBACK)(TY_IMU_DATA*, void *userdata)

Enums

enum TY_STATUS_LIST

API call return status.

Values:

enumerator TY_STATUS_OK
enumerator TY_STATUS_ERROR
enumerator TY_STATUS_NOT_INITED
enumerator TY_STATUS_NOT_IMPLEMENTED
enumerator TY_STATUS_NOT_PERMITTED
enumerator TY_STATUS_DEVICE_ERROR
enumerator TY_STATUS_INVALID_PARAMETER
enumerator TY_STATUS_INVALID_HANDLE
enumerator TY_STATUS_INVALID_COMPONENT
enumerator TY_STATUS_INVALID_FEATURE
enumerator TY_STATUS_WRONG_TYPE
enumerator TY_STATUS_WRONG_SIZE
enumerator TY_STATUS_OUT_OF_MEMORY
enumerator TY_STATUS_OUT_OF_RANGE
enumerator TY_STATUS_TIMEOUT
enumerator TY_STATUS_WRONG_MODE
enumerator TY_STATUS_BUSY
enumerator TY_STATUS_IDLE
enumerator TY_STATUS_NO_DATA
enumerator TY_STATUS_NO_BUFFER
enumerator TY_STATUS_NULL_POINTER
enumerator TY_STATUS_READONLY_FEATURE
enumerator TY_STATUS_INVALID_DESCRIPTOR
enumerator TY_STATUS_INVALID_INTERFACE
enumerator TY_STATUS_FIRMWARE_ERROR
enumerator TY_STATUS_DEV_EPERM
enumerator TY_STATUS_DEV_EIO
enumerator TY_STATUS_DEV_ENOMEM
enumerator TY_STATUS_DEV_EBUSY
enumerator TY_STATUS_DEV_EINVAL
enum TY_FW_ERRORCODE_LIST

Values:

enumerator TY_FW_ERRORCODE_CAM0_NOT_DETECTED
enumerator TY_FW_ERRORCODE_CAM1_NOT_DETECTED
enumerator TY_FW_ERRORCODE_CAM2_NOT_DETECTED
enumerator TY_FW_ERRORCODE_POE_NOT_INIT
enumerator TY_FW_ERRORCODE_RECMAP_NOT_CORRECT
enumerator TY_FW_ERRORCODE_LOOKUPTABLE_NOT_CORRECT
enumerator TY_FW_ERRORCODE_DRV8899_NOT_INIT
enumerator TY_FW_ERRORCODE_CONFIG_NOT_FOUND
enumerator TY_FW_ERRORCODE_CONFIG_NOT_CORRECT
enumerator TY_FW_ERRORCODE_XML_NOT_FOUND
enumerator TY_FW_ERRORCODE_XML_NOT_CORRECT
enumerator TY_FW_ERRORCODE_XML_OVERRIDE_FAILED
enumerator TY_FW_ERRORCODE_CAM_INIT_FAILED
enumerator TY_FW_ERRORCODE_LASER_INIT_FAILED
enum TY_EVENT_LIST

Values:

enumerator TY_EVENT_DEVICE_OFFLINE
enumerator TY_EVENT_LICENSE_ERROR
enumerator TY_EVENT_FW_INIT_ERROR
enum TY_DEVICE_COMPONENT_LIST

@breif Device Component list A device contains several component.

Each component can be controlled by its own features, such as image width, exposure time, etc..

参见

To Know how to get feature information please refer to sample code DumpAllFeatures

Values:

enumerator TY_COMPONENT_DEVICE

Abstract component stands for whole device, always enabled.

enumerator TY_COMPONENT_DEPTH_CAM

Depth camera.

enumerator TY_COMPONENT_IR_CAM_LEFT

Left IR camera.

enumerator TY_COMPONENT_IR_CAM_RIGHT

Right IR camera.

enumerator TY_COMPONENT_RGB_CAM_LEFT

Left RGB camera.

enumerator TY_COMPONENT_RGB_CAM_RIGHT

Right RGB camera.

enumerator TY_COMPONENT_LASER

Laser.

enumerator TY_COMPONENT_IMU

Inertial Measurement Unit.

enumerator TY_COMPONENT_BRIGHT_HISTO

virtual component for brightness histogram of ir

enumerator TY_COMPONENT_STORAGE

virtual component for device storage

enumerator TY_COMPONENT_RGB_CAM

Some device has only one RGB camera, map it to left.

enum TY_FEATURE_TYPE_LIST

Feature Format Type definitions.

Values:

enumerator TY_FEATURE_INT
enumerator TY_FEATURE_FLOAT
enumerator TY_FEATURE_ENUM
enumerator TY_FEATURE_BOOL
enumerator TY_FEATURE_STRING
enumerator TY_FEATURE_BYTEARRAY
enumerator TY_FEATURE_STRUCT
enum TY_FEATURE_ID_LIST

feature for component definitions

Values:

enumerator TY_STRUCT_CAM_INTRINSIC

see TY_CAMERA_INTRINSIC

enumerator TY_STRUCT_EXTRINSIC_TO_DEPTH

extrinsic between depth cam and current component , see TY_CAMERA_EXTRINSIC

enumerator TY_STRUCT_EXTRINSIC_TO_IR_LEFT

extrinsic between left IR and current compoent, see TY_CAMERA_EXTRINSIC

enumerator TY_STRUCT_CAM_DISTORTION

see TY_CAMERA_DISTORTION

enumerator TY_STRUCT_CAM_CALIB_DATA

see TY_CAMERA_CALIB_INFO

enumerator TY_STRUCT_CAM_RECTIFIED_INTRI

the rectified intrinsic. see TY_CAMERA_INTRINSIC

enumerator TY_BYTEARRAY_CUSTOM_BLOCK

used for reading/writing custom block

enumerator TY_BYTEARRAY_ISP_BLOCK

used for reading/writing fpn block

enumerator TY_INT_PERSISTENT_IP
enumerator TY_INT_PERSISTENT_SUBMASK
enumerator TY_INT_PERSISTENT_GATEWAY
enumerator TY_BOOL_GVSP_RESEND
enumerator TY_INT_PACKET_DELAY

microseconds

enumerator TY_INT_ACCEPTABLE_PERCENT
enumerator TY_INT_NTP_SERVER_IP

Ntp server IP.

enumerator TY_INT_PACKET_SIZE

milliseconds

enumerator TY_STRUCT_CAM_STATISTICS

statistical information, see TY_CAMERA_STATISTICS

enumerator TY_INT_WIDTH_MAX
enumerator TY_INT_HEIGHT_MAX
enumerator TY_INT_OFFSET_X
enumerator TY_INT_OFFSET_Y
enumerator TY_INT_WIDTH

Image width.

enumerator TY_INT_HEIGHT

Image height.

enumerator TY_ENUM_IMAGE_MODE

Resolution-PixelFromat mode, see TY_IMAGE_MODE_LIST.

enumerator TY_FLOAT_SCALE_UNIT

scale unit depth image is uint16 pixel format with default millimeter unit ,for some device can output Sub-millimeter accuracy data the acutal depth (mm)= PixelValue * ScaleUnit

enumerator TY_ENUM_TRIGGER_POL

Trigger POL, see TY_TRIGGER_POL_LIST.

enumerator TY_INT_FRAME_PER_TRIGGER

Number of frames captured per trigger.

enumerator TY_STRUCT_TRIGGER_PARAM

param of trigger, see TY_TRIGGER_PARAM

enumerator TY_STRUCT_TRIGGER_PARAM_EX

param of trigger, see TY_TRIGGER_PARAM_EX

enumerator TY_STRUCT_TRIGGER_TIMER_LIST

param of trigger mode 20, see TY_TRIGGER_TIMER_LIST

enumerator TY_STRUCT_TRIGGER_TIMER_PERIOD

param of trigger mode 21, see TY_TRIGGER_TIMER_PERIOD

enumerator TY_BOOL_KEEP_ALIVE_ONOFF

Keep Alive switch.

enumerator TY_INT_KEEP_ALIVE_TIMEOUT

Keep Alive timeout.

enumerator TY_BOOL_CMOS_SYNC

Cmos sync switch.

enumerator TY_INT_TRIGGER_DELAY_US

Trigger delay time, in microseconds.

enumerator TY_BOOL_TRIGGER_OUT_IO

Trigger out IO.

enumerator TY_INT_TRIGGER_DURATION_US

Trigger duration time, in microseconds.

enumerator TY_ENUM_STREAM_ASYNC

stream async switch, see TY_STREAM_ASYNC_MODE

enumerator TY_INT_CAPTURE_TIME_US

capture time in multi-ir

enumerator TY_ENUM_TIME_SYNC_TYPE

see TY_TIME_SYNC_TYPE

enumerator TY_BOOL_TIME_SYNC_READY

time sync done status

enumerator TY_BOOL_FLASHLIGHT

flashlight on/off control

enumerator TY_INT_FLASHLIGHT_INTENSITY

flashlight intensity level [0, 63]

enumerator TY_STRUCT_DO0_WORKMODE

DO_0 workmode, see TY_DO_WORKMODE.

enumerator TY_STRUCT_DI0_WORKMODE

DI_0 workmode, see TY_DI_WORKMODE.

enumerator TY_STRUCT_DO1_WORKMODE

DO_1 workmode, see TY_DO_WORKMODE.

enumerator TY_STRUCT_DI1_WORKMODE

DI_1 workmode, see TY_DI_WORKMODE.

enumerator TY_STRUCT_DO2_WORKMODE

DO_2 workmode, see TY_DO_WORKMODE.

enumerator TY_STRUCT_DI2_WORKMODE

DI_2 workmode, see TY_DI_WORKMODE.

enumerator TY_BOOL_AUTO_EXPOSURE

Auto exposure switch.

enumerator TY_INT_EXPOSURE_TIME

Exposure time in percentage.

enumerator TY_BOOL_AUTO_GAIN

Auto gain switch.

enumerator TY_INT_GAIN

Sensor Gain.

enumerator TY_BOOL_AUTO_AWB

Auto white balance.

enumerator TY_STRUCT_AEC_ROI

region of aec statistics, see TY_AEC_ROI_PARAM

enumerator TY_INT_TOF_HDR_RATIO

tof sensor hdr ratio for depth

enumerator TY_INT_TOF_JITTER_THRESHOLD

tof jitter threshold for depth

enumerator TY_INT_LASER_POWER

Laser power level.

enumerator TY_BOOL_LASER_AUTO_CTRL

Laser auto ctrl.

enumerator TY_BOOL_UNDISTORTION

Output undistorted image.

enumerator TY_BOOL_BRIGHTNESS_HISTOGRAM

Output bright histogram.

enumerator TY_BOOL_DEPTH_POSTPROC

Do depth image postproc.

enumerator TY_INT_R_GAIN

Gain of R channel.

enumerator TY_INT_G_GAIN

Gain of G channel.

enumerator TY_INT_B_GAIN

Gain of B channel.

enumerator TY_INT_ANALOG_GAIN

Analog gain.

enumerator TY_BOOL_HDR

HDR func enable/disable.

enumerator TY_BYTEARRAY_HDR_PARAMETER

HDR parameters.

enumerator TY_BOOL_IMU_DATA_ONOFF

IMU Data Onoff.

enumerator TY_STRUCT_IMU_ACC_BIAS

IMU acc bias matrix, see TY_ACC_BIAS.

enumerator TY_STRUCT_IMU_ACC_MISALIGNMENT

IMU acc misalignment matrix, see TY_ACC_MISALIGNMENT.

enumerator TY_STRUCT_IMU_ACC_SCALE

IMU acc scale matrix, see TY_ACC_SCALE.

enumerator TY_STRUCT_IMU_GYRO_BIAS

IMU gyro bias matrix, see TY_GYRO_BIAS.

enumerator TY_STRUCT_IMU_GYRO_MISALIGNMENT

IMU gyro misalignment matrix, see TY_GYRO_MISALIGNMENT.

enumerator TY_STRUCT_IMU_GYRO_SCALE

IMU gyro scale matrix, see TY_GYRO_SCALE.

enumerator TY_STRUCT_IMU_CAM_TO_IMU

IMU camera to imu matrix, see TY_CAMERA_TO_IMU.

enumerator TY_ENUM_IMU_FPS

IMU fps, see TY_IMU_FPS_LIST.

enumerator TY_INT_SGBM_IMAGE_NUM

SGBM image channel num.

enumerator TY_INT_SGBM_DISPARITY_NUM

SGBM disparity num.

enumerator TY_INT_SGBM_DISPARITY_OFFSET

SGBM disparity offset.

enumerator TY_INT_SGBM_MATCH_WIN_HEIGHT

SGBM match window height.

enumerator TY_INT_SGBM_SEMI_PARAM_P1

SGBM semi global param p1.

enumerator TY_INT_SGBM_SEMI_PARAM_P2

SGBM semi global param p2.

enumerator TY_INT_SGBM_UNIQUE_FACTOR

SGBM uniqueness factor param.

enumerator TY_INT_SGBM_UNIQUE_ABSDIFF

SGBM uniqueness min absolute diff.

enumerator TY_INT_SGBM_COST_PARAM

SGBM cost param.

enumerator TY_BOOL_SGBM_HFILTER_HALF_WIN

SGBM enable half window size.

enumerator TY_INT_SGBM_MATCH_WIN_WIDTH

SGBM match window width.

enumerator TY_BOOL_SGBM_MEDFILTER

SGBM enable median filter.

enumerator TY_BOOL_SGBM_LRC

SGBM enable left right consist check.

enumerator TY_INT_SGBM_LRC_DIFF

SGBM max diff.

enumerator TY_INT_SGBM_MEDFILTER_THRESH

SGBM median filter thresh.

enumerator TY_INT_SGBM_SEMI_PARAM_P1_SCALE

SGBM semi global param p1 scale.

enumerator TY_ENUM_DEPTH_QUALITY

the quality of generated depth, see TY_DEPTH_QUALITY

enumerator TY_INT_FILTER_THRESHOLD

the threshold of the noise filter, 0 for disabled

enumerator TY_INT_TOF_CHANNEL

the frequency channel of tof

enumerator TY_INT_TOF_MODULATION_THRESHOLD

the threshold of the tof modulation

enumerator TY_STRUCT_TOF_FREQ

the frequency of tof, see TY_TOF_FREQ

enumerator TY_BOOL_TOF_ANTI_INTERFERENCE

cooperation if multi-device used

enum TY_DEPTH_QUALITY_LIST

Values:

enumerator TY_DEPTH_QUALITY_BASIC
enumerator TY_DEPTH_QUALITY_MEDIUM
enumerator TY_DEPTH_QUALITY_HIGH
enum TY_TRIGGER_POL_LIST

set external trigger signal edge

Values:

enumerator TY_TRIGGER_POL_FALLINGEDGE
enumerator TY_TRIGGER_POL_RISINGEDGE
enum TY_INTERFACE_TYPE_LIST

Interface type definition.

Values:

enumerator TY_INTERFACE_UNKNOWN
enumerator TY_INTERFACE_RAW
enumerator TY_INTERFACE_USB
enumerator TY_INTERFACE_ETHERNET
enumerator TY_INTERFACE_IEEE80211
enumerator TY_INTERFACE_ALL
enum TY_ACCESS_MODE_LIST

Indicate a feature is readable or writable.

Values:

enumerator TY_ACCESS_READABLE
enumerator TY_ACCESS_WRITABLE
enum TY_STREAM_ASYNC_MODE_LIST

stream async mode

Values:

enumerator TY_STREAM_ASYNC_OFF
enumerator TY_STREAM_ASYNC_DEPTH
enumerator TY_STREAM_ASYNC_RGB
enumerator TY_STREAM_ASYNC_DEPTH_RGB
enumerator TY_STREAM_ASYNC_ALL
enum TY_PIXEL_BITS_LIST

Pixel size type definitions to define the pixel size in bits.

Values:

enumerator TY_PIXEL_8BIT
enumerator TY_PIXEL_16BIT
enumerator TY_PIXEL_24BIT
enumerator TY_PIXEL_32BIT
enumerator TY_PIXEL_10BIT
enumerator TY_PIXEL_12BIT
enumerator TY_PIXEL_14BIT
enumerator TY_PIXEL_48BIT
enumerator TY_PIXEL_64BIT
enum TY_PIXEL_FORMAT_LIST

pixel format definitions

Values:

enumerator TY_PIXEL_FORMAT_UNDEFINED
enumerator TY_PIXEL_FORMAT_MONO

0x10000000

enumerator TY_PIXEL_FORMAT_BAYER8GB

0x11000000

enumerator TY_PIXEL_FORMAT_BAYER8BG

0x12000000

enumerator TY_PIXEL_FORMAT_BAYER8GR

0x13000000

enumerator TY_PIXEL_FORMAT_BAYER8RG

0x14000000

enumerator TY_PIXEL_FORMAT_BAYER8GRBG
enumerator TY_PIXEL_FORMAT_BAYER8RGGB
enumerator TY_PIXEL_FORMAT_BAYER8GBRG
enumerator TY_PIXEL_FORMAT_BAYER8BGGR
enumerator TY_PIXEL_FORMAT_CSI_MONO10

0x50000000

enumerator TY_PIXEL_FORMAT_CSI_BAYER10GRBG

0x51000000

enumerator TY_PIXEL_FORMAT_CSI_BAYER10RGGB

0x52000000

enumerator TY_PIXEL_FORMAT_CSI_BAYER10GBRG

0x53000000

enumerator TY_PIXEL_FORMAT_CSI_BAYER10BGGR

0x54000000

enumerator TY_PIXEL_FORMAT_CSI_MONO12

0x60000000

enumerator TY_PIXEL_FORMAT_CSI_BAYER12GRBG

0x61000000

enumerator TY_PIXEL_FORMAT_CSI_BAYER12RGGB

0x62000000

enumerator TY_PIXEL_FORMAT_CSI_BAYER12GBRG

0x63000000

enumerator TY_PIXEL_FORMAT_CSI_BAYER12BGGR

0x64000000

enumerator TY_PIXEL_FORMAT_DEPTH16

0x20000000

enumerator TY_PIXEL_FORMAT_YVYU

0x21000000, yvyu422

enumerator TY_PIXEL_FORMAT_YUYV

0x22000000, yuyv422

enumerator TY_PIXEL_FORMAT_MONO16

0x23000000,

enumerator TY_PIXEL_FORMAT_TOF_IR_MONO16

0xa4000000,

enumerator TY_PIXEL_FORMAT_RGB

0x30000000

enumerator TY_PIXEL_FORMAT_BGR

0x31000000

enumerator TY_PIXEL_FORMAT_JPEG

0x32000000

enumerator TY_PIXEL_FORMAT_MJPG

0x33000000

enumerator TY_PIXEL_FORMAT_RGB48

0x80000000

enumerator TY_PIXEL_FORMAT_BGR48

0x81000000

enumerator TY_PIXEL_FORMAT_XYZ48

0x82000000

enum TY_RESOLUTION_MODE_LIST

predefined resolution list

Values:

enumerator TY_RESOLUTION_MODE_160x100

0x000a0078

enumerator TY_RESOLUTION_MODE_160x120

0x000a0078

enumerator TY_RESOLUTION_MODE_240x320

0x000f0140

enumerator TY_RESOLUTION_MODE_320x180

0x001400b4

enumerator TY_RESOLUTION_MODE_320x200

0x001400c8

enumerator TY_RESOLUTION_MODE_320x240

0x001400f0

enumerator TY_RESOLUTION_MODE_480x640

0x001e0280

enumerator TY_RESOLUTION_MODE_640x360

0x00280168

enumerator TY_RESOLUTION_MODE_640x400

0x00280190

enumerator TY_RESOLUTION_MODE_640x480

0x002801e0

enumerator TY_RESOLUTION_MODE_960x1280

0x003c0500

enumerator TY_RESOLUTION_MODE_1280x720

0x005002d0

enumerator TY_RESOLUTION_MODE_1280x800

0x00500320

enumerator TY_RESOLUTION_MODE_1280x960

0x005003c0

enumerator TY_RESOLUTION_MODE_1920x1080

0x00780438

enumerator TY_RESOLUTION_MODE_2560x1920

0x00a00780

enumerator TY_RESOLUTION_MODE_2592x1944

0x00a20798

enumerator TY_RESOLUTION_MODE_1920x1440

0x007805a0

enumerator TY_RESOLUTION_MODE_240x96

0x000f0060

enumerator TY_RESOLUTION_MODE_2048x1536

0x00800600

enum TY_IMAGE_MODE_LIST

Predefined Image Mode List image mode controls image resolution & format predefined image modes named like TY_IMAGE_MODE_MONO_160x120,TY_IMAGE_MODE_RGB_1280x960.

Values:

enumerator TY_DECLARE_IMAGE_MODE1
enumerator TY_DECLARE_IMAGE_MODE1
enumerator TY_DECLARE_IMAGE_MODE1
enumerator TY_DECLARE_IMAGE_MODE1
enumerator TY_DECLARE_IMAGE_MODE1
enumerator TY_DECLARE_IMAGE_MODE1
enumerator TY_DECLARE_IMAGE_MODE1
enumerator TY_DECLARE_IMAGE_MODE1
enumerator TY_DECLARE_IMAGE_MODE1
enumerator TY_DECLARE_IMAGE_MODE1
enumerator TY_DECLARE_IMAGE_MODE1
enumerator TY_DECLARE_IMAGE_MODE1
enumerator TY_DECLARE_IMAGE_MODE1
enumerator TY_DECLARE_IMAGE_MODE1
enumerator TY_DECLARE_IMAGE_MODE1
enumerator TY_DECLARE_IMAGE_MODE1
enumerator TY_DECLARE_IMAGE_MODE1
enumerator TY_DECLARE_IMAGE_MODE1
enumerator TY_DECLARE_IMAGE_MODE1
enumerator TY_DECLARE_IMAGE_MODE1
enumerator TY_DECLARE_IMAGE_MODE1
enumerator TY_DECLARE_IMAGE_MODE1
enumerator TY_DECLARE_IMAGE_MODE1
enumerator TY_DECLARE_IMAGE_MODE1
enumerator TY_DECLARE_IMAGE_MODE1
enumerator TY_DECLARE_IMAGE_MODE1
enumerator TY_DECLARE_IMAGE_MODE1
enumerator TY_DECLARE_IMAGE_MODE1
enumerator TY_DECLARE_IMAGE_MODE1
enumerator TY_DECLARE_IMAGE_MODE1
enum TY_TRIGGER_MODE_LIST

参见

refer to sample SimpleView_TriggerMode for detail usage

Values:

enumerator TY_TRIGGER_MODE_OFF

not trigger mode, continuous mode

enumerator TY_TRIGGER_MODE_SLAVE

slave mode, receive soft/hardware triggers

enumerator TY_TRIGGER_MODE_M_SIG

master mode 1, sending one trigger signal once received a soft/hardware trigger

enumerator TY_TRIGGER_MODE_M_PER

master mode 2, periodic sending one trigger signals, ‘fps’ param should be set

enumerator TY_TRIGGER_MODE_SIG_PASS
enumerator TY_TRIGGER_MODE_PER_PASS
enumerator TY_TRIGGER_MODE_TIMER_LIST
enumerator TY_TRIGGER_MODE_TIMER_PERIOD
enumerator TY_TRIGGER_MODE_PER_PASS2

trigger mode 30,Alternate output depth image/ir image

enumerator TY_TRIGGER_WORK_MODE31
enumerator TY_TRIGGER_MODE_SIG_LASER
enum TY_TIME_SYNC_TYPE_LIST

type of time sync

Values:

enumerator TY_TIME_SYNC_TYPE_NONE
enumerator TY_TIME_SYNC_TYPE_HOST
enumerator TY_TIME_SYNC_TYPE_NTP
enumerator TY_TIME_SYNC_TYPE_PTP
enumerator TY_TIME_SYNC_TYPE_CAN
enumerator TY_TIME_SYNC_TYPE_PTP_MASTER
enum TY_IMU_FPS_LIST

Values:

enumerator TY_IMU_FPS_100HZ
enumerator TY_IMU_FPS_200HZ
enumerator TY_IMU_FPS_400HZ

Functions

static inline bool TYIsNetworkInterface(int32_t interfaceType)
static inline void TYIntToIPv4(uint32_t addr, uint8_t out[4])
static inline uint32_t TYIPv4ToInt(uint8_t ip[4])
static inline TY_IMAGE_DATA TYInitImageData(size_t size, void *buffer, size_t width, size_t height)

init a TY_IMAGE_DATA struct

static inline TY_FEATURE_TYPE TYFeatureType(TY_FEATURE_ID id)

get feature format type from feature id

static inline int32_t TYPixelSize(TY_IMAGE_MODE imageMode)

deprecated: get pixel size in byte, Invalid for 10/12/14bit mode

static inline int32_t TYBitsPerPixel(TY_IMAGE_MODE imageMode)

get pixel size in bits

static inline int32_t TYPixelLineSize(int width, TY_IMAGE_MODE imageMode)

get line size in bytes

static inline TY_IMAGE_MODE TYImageMode(TY_PIXEL_FORMAT pix, TY_RESOLUTION_MODE res)

make a image mode from pixel format & resolution mode

static inline TY_RESOLUTION_MODE TYResolutionMode2(int width, int height)

get a resoltuion mode from width & height

static inline TY_IMAGE_MODE TYImageMode2(TY_PIXEL_FORMAT pix, int width, int height)

create a image mode from pixel format , width & height

static inline TY_PIXEL_FORMAT TYPixelFormat(TY_IMAGE_MODE imageMode)

get pixel format from image mode

static inline TY_RESOLUTION_MODE TYResolutionMode(TY_IMAGE_MODE imageMode)

get a resoltuion mode from image mode

static inline int32_t TYImageWidth(TY_IMAGE_MODE imageMode)

get image width from image mode

static inline int32_t TYImageHeight(TY_IMAGE_MODE imageMode)

get image height from image mode

TY_EXTC const TY_EXPORT char *TY_STDC TYErrorString (TY_STATUS errorID)

Get error information.

参数:

errorID[in] Error id.

返回:

Error string.

static inline TY_STATUS TYInitLib(void)

Init this library.

We make this function to be static inline, because we do a version check here. Some user may use the mismatched header file and dynamic library, and that’s quite difficult to locate the error.

返回值:
  • TY_STATUS_OK – Succeed.

  • TY_STATUS_ERROR – Has been inited.

TY_CAPI TYDeinitLib(void)

Deinit this library.

返回值:

TY_STATUS_OK – Succeed.

TY_CAPI TYLibVersion(TY_VERSION_INFO *version)

Get current library version.

参数:

version[out] Version infomation to be filled.

返回值:
  • TY_STATUS_OK – Succeed.

  • TY_STATUS_NULL_POINTER – buffer is NULL.

TY_CAPI TYUpdateInterfaceList()

Update current interfaces.

call before TYGetInterfaceList

返回值:
  • TY_STATUS_OK – Succeed.

  • TY_STATUS_NOT_INITED – TYInitLib not called.

TY_CAPI TYGetInterfaceNumber(uint32_t *pNumIfaces)

Get number of current interfaces.

参数:

pNumIfaces[out] Number of interfaces.

返回值:
  • TY_STATUS_OK – Succeed.

  • TY_STATUS_NOT_INITED – TYInitLib not called.

  • TY_STATUS_NULL_POINTER – deviceNumber is NULL.

TY_CAPI TYGetInterfaceList(TY_INTERFACE_INFO *pIfaceInfos, uint32_t bufferCount, uint32_t *filledCount)

Get interface info list.

参数:
  • pIfaceInfos[out] Array of interface infos to be filled.

  • bufferCount[in] Array size of interface infos.

  • filledCount[out] Number of filled TY_INTERFACE_INFO.

返回值:
  • TY_STATUS_OK – Succeed.

  • TY_STATUS_NOT_INITED – TYInitLib not called.

  • TY_STATUS_NULL_POINTER – pIfaceInfos or filledCount is NULL.

TY_CAPI TYHasInterface(const char *ifaceID, bool *value)

Check if has interface.

参数:
  • ifaceID[in] Interface ID string, can be get from TY_INTERFACE_INFO.

  • value[out] True if the interface exists.

返回值:
  • TY_STATUS_OK – Succeed.

  • TY_STATUS_NOT_INITED – TYInitLib not called.

  • TY_STATUS_NULL_POINTER – ifaceID or outHandle is NULL.

TY_CAPI TYOpenInterface(const char *ifaceID, TY_INTERFACE_HANDLE *outHandle)

Open specified interface.

参数:
  • ifaceID[in] Interface ID string, can be get from TY_INTERFACE_INFO.

  • outHandle[out] Handle of opened interface.

返回值:
  • TY_STATUS_OK – Succeed.

  • TY_STATUS_NOT_INITED – TYInitLib not called.

  • TY_STATUS_NULL_POINTER – ifaceID or outHandle is NULL.

  • TY_STATUS_INVALID_INTERFACE – Interface not found.

TY_CAPI TYCloseInterface(TY_INTERFACE_HANDLE ifaceHandle)

Close interface.

参数:

ifaceHandle[in] Interface to be closed.

返回值:
  • TY_STATUS_OK – Succeed.

  • TY_STATUS_NOT_INITED – TYInitLib not called.

  • TY_STATUS_INVALID_INTERFACE – Interface not found.

TY_CAPI TYUpdateDeviceList(TY_INTERFACE_HANDLE ifaceHandle)

Update current connected devices.

参数:

ifaceHandle[in] Interface handle.

返回值:
  • TY_STATUS_OK – Succeed.

  • TY_STATUS_NOT_INITED – TYInitLib not called.

  • TY_STATUS_INVALID_INTERFACE – Invalid interface handle.

TY_CAPI TYUpdateAllDeviceList()

Update current connected devices.

返回值:
  • TY_STATUS_OK – Succeed.

  • TY_STATUS_NOT_INITED – TYInitLib not called.

TY_CAPI TYGetDeviceNumber(TY_INTERFACE_HANDLE ifaceHandle, uint32_t *deviceNumber)

Get number of current connected devices.

参数:
  • ifaceHandle[in] Interface handle.

  • deviceNumber[out] Number of connected devices.

返回值:
  • TY_STATUS_OK – Succeed.

  • TY_STATUS_NOT_INITED – TYInitLib not called.

  • TY_STATUS_INVALID_INTERFACE – Invalid interface handle.

  • TY_STATUS_NULL_POINTER – deviceNumber is NULL.

TY_CAPI TYGetDeviceList(TY_INTERFACE_HANDLE ifaceHandle, TY_DEVICE_BASE_INFO *deviceInfos, uint32_t bufferCount, uint32_t *filledDeviceCount)

Get device info list.

参数:
  • ifaceHandle[in] Interface handle.

  • deviceInfos[out] Device info array to be filled.

  • bufferCount[in] Array size of deviceInfos.

  • filledDeviceCount[out] Number of filled TY_DEVICE_BASE_INFO.

返回值:
  • TY_STATUS_OK – Succeed.

  • TY_STATUS_NOT_INITED – TYInitLib not called.

  • TY_STATUS_INVALID_INTERFACE – Invalid interface handle.

  • TY_STATUS_NULL_POINTER – deviceInfos or filledDeviceCount is NULL.

TY_CAPI TYHasDevice(TY_INTERFACE_HANDLE ifaceHandle, const char *deviceID, bool *value)

Check whether the interface has the specified device.

参数:
  • ifaceHandle[in] Interface handle.

  • deviceID[in] Device ID string, can be get from TY_DEVICE_BASE_INFO.

  • value[out] True if the device exists.

返回值:
  • TY_STATUS_OK – Succeed.

  • TY_STATUS_NOT_INITED – TYInitLib not called.

  • TY_STATUS_INVALID_INTERFACE – Invalid interface handle.

  • TY_STATUS_NULL_POINTER – deviceID or value is NULL.

TY_CAPI TYOpenDevice(TY_INTERFACE_HANDLE ifaceHandle, const char *deviceID, TY_DEV_HANDLE *outDeviceHandle, TY_FW_ERRORCODE *outFwErrorcode = NULL)

Open device by device ID.

参数:
  • ifaceHandle[in] Interface handle.

  • deviceID[in] Device ID string, can be get from TY_DEVICE_BASE_INFO.

  • deviceHandle[out] Handle of opened device. Valid only if TY_STATUS_OK or TY_FW_ERRORCODE returned.

  • outFwErrorcode[out] Firmware errorcode. Valid only if TY_FW_ERRORCODE returned.

返回值:
  • TY_STATUS_OK – Succeed.

  • TY_STATUS_NOT_INITED – TYInitLib not called.

  • TY_STATUS_INVALID_INTERFACE – Invalid interface handle.

  • TY_STATUS_NULL_POINTER – deviceID or deviceHandle is NULL.

  • TY_STATUS_INVALID_PARAMETER – Device not found.

  • TY_STATUS_BUSY – Device has been opened.

  • TY_STATUS_DEVICE_ERROR – Open device failed.

TY_CAPI TYOpenDeviceWithIP(TY_INTERFACE_HANDLE ifaceHandle, const char *IP, TY_DEV_HANDLE *deviceHandle)

Open device by device IP, useful when a device is not listed.

参数:
  • ifaceHandle[in] Interface handle.

  • IP[in] Device IP.

  • deviceHandle[out] Handle of opened device.

返回值:
  • TY_STATUS_OK – Succeed.

  • TY_STATUS_NOT_INITED – TYInitLib not called.

  • TY_STATUS_INVALID_INTERFACE – Invalid interface handle.

  • TY_STATUS_NULL_POINTER – IP or deviceHandle is NULL.

  • TY_STATUS_INVALID_PARAMETER – Device not found.

  • TY_STATUS_BUSY – Device has been opened, may occupied somewhere else.

  • TY_STATUS_DEVICE_ERROR – Open device failed.

TY_CAPI TYGetDeviceInterface(TY_DEV_HANDLE hDevice, TY_INTERFACE_HANDLE *pIface)

Get interface handle by device handle.

参数:
  • hDevice[in] Device handle.

  • pIface[out] Interface handle.

返回值:
  • TY_STATUS_OK – Succeed.

  • TY_STATUS_INVALID_HANDLE – Invalid device handle.

  • TY_STATUS_NULL_POINTER – pIface is NULL.

TY_CAPI TYForceDeviceIP(TY_INTERFACE_HANDLE ifaceHandle, const char *MAC, const char *newIP, const char *newNetMask, const char *newGateway)

Force a ethernet device to use new IP address, useful when device use persistent IP and cannot be found.

参数:
  • ifaceHandle[in] Interface handle.

  • MAC[in] Device MAC, should be “xx:xx:xx:xx:xx:xx”.

  • newIP[in] New IP.

  • newNetMask[in] New subnet mask.

  • newGateway[in] New gateway.

返回值:
  • TY_STATUS_OK – Succeed.

  • TY_STATUS_NOT_INITED – TYInitLib not called.

  • TY_STATUS_INVALID_INTERFACE – Invalid interface handle.

  • TY_STATUS_WRONG_TYPE – Wrong interface type, should be network.

  • TY_STATUS_NULL_POINTER – MAC or newIP/newNetMask/newGateway is NULL.

  • TY_STATUS_INVALID_PARAMETER – MAC is not valid.

  • TY_STATUS_TIMEOUT – No device found.

  • TY_STATUS_DEVICE_ERROR – Set new IP failed.

TY_CAPI TYCloseDevice(TY_DEV_HANDLE hDevice, bool reboot = false)

Close device by device handle.

参数:

hDevice[in] Device handle.

返回值:
  • TY_STATUS_OK – Succeed.

  • TY_STATUS_INVALID_HANDLE – Invalid device handle.

  • TY_STATUS_IDLE – Device has been closed.

TY_CAPI TYGetDeviceInfo(TY_DEV_HANDLE hDevice, TY_DEVICE_BASE_INFO *info)

Get base info of the open device.

参数:
  • hDevice[in] Device handle.

  • info[out] Base info out.

返回值:
  • TY_STATUS_OK – Succeed.

  • TY_STATUS_INVALID_HANDLE – Invalid device handle.

  • TY_STATUS_NULL_POINTER – componentIDs is NULL.

TY_CAPI TYGetComponentIDs(TY_DEV_HANDLE hDevice, TY_COMPONENT_ID *componentIDs)

Get all components IDs.

参数:
  • hDevice[in] Device handle.

  • componentIDs[out] All component IDs this device has. (bit flag).

返回值:
  • TY_STATUS_OK – Succeed.

  • TY_STATUS_INVALID_HANDLE – Invalid device handle.

  • TY_STATUS_NULL_POINTER – componentIDs is NULL.

TY_CAPI TYGetEnabledComponents(TY_DEV_HANDLE hDevice, TY_COMPONENT_ID *componentIDs)

Get all enabled components IDs.

参数:
  • hDevice[in] Device handle.

  • componentIDs[out] Enabled component IDs.(bit flag)

返回值:
  • TY_STATUS_OK – Succeed.

  • TY_STATUS_INVALID_HANDLE – Invalid device handle.

  • TY_STATUS_NULL_POINTER – componentIDs is NULL.

TY_CAPI TYEnableComponents(TY_DEV_HANDLE hDevice, TY_COMPONENT_ID componentIDs)

Enable components.

参数:
  • hDevice[in] Device handle.

  • componentIDs[in] Components to be enabled.

返回值:
  • TY_STATUS_OK – Succeed.

  • TY_STATUS_INVALID_HANDLE – Invalid device handle.

  • TY_STATUS_INVALID_COMPONENT – Some components specified by componentIDs are invalid.

  • TY_STATUS_BUSY – Device is capturing.

TY_CAPI TYDisableComponents(TY_DEV_HANDLE hDevice, TY_COMPONENT_ID componentIDs)

Disable components.

参数:
  • hDevice[in] Device handle.

  • componentIDs[in] Components to be disabled.

返回值:
  • TY_STATUS_OK – Succeed.

  • TY_STATUS_INVALID_HANDLE – Invalid device handle.

  • TY_STATUS_INVALID_COMPONENT – Some components specified by componentIDs are invalid.

  • TY_STATUS_BUSY – Device is capturing.

TY_CAPI TYGetFrameBufferSize(TY_DEV_HANDLE hDevice, uint32_t *bufferSize)

Get total buffer size of one frame in current configuration.

参数:
  • hDevice[in] Device handle.

  • bufferSize[out] Buffer size per frame.

返回值:
  • TY_STATUS_OK – Succeed.

  • TY_STATUS_INVALID_HANDLE – Invalid device handle.

  • TY_STATUS_NULL_POINTER – bufferSize is NULL.

TY_CAPI TYEnqueueBuffer(TY_DEV_HANDLE hDevice, void *buffer, uint32_t bufferSize)

Enqueue a user allocated buffer.

参数:
  • hDevice[in] Device handle.

  • buffer[in] Buffer to be enqueued.

  • bufferSize[in] Size of the input buffer.

返回值:
  • TY_STATUS_OK – Succeed.

  • TY_STATUS_INVALID_HANDLE – Invalid device handle.

  • TY_STATUS_NULL_POINTER – buffer is NULL.

  • TY_STATUS_WRONG_SIZE – The input buffer is not large enough.

TY_CAPI TYClearBufferQueue(TY_DEV_HANDLE hDevice)

Clear the internal buffer queue, so that user can release all the buffer.

参数:

hDevice[in] Device handle.

返回值:
  • TY_STATUS_OK – Succeed.

  • TY_STATUS_INVALID_HANDLE – Invalid device handle.

  • TY_STATUS_BUSY – Device is capturing.

TY_CAPI TYStartCapture(TY_DEV_HANDLE hDevice)

Start capture.

参数:

hDevice[in] Device handle.

返回值:
  • TY_STATUS_OK – Succeed.

  • TY_STATUS_INVALID_HANDLE – Invalid device handle.

  • TY_STATUS_INVALID_COMPONENT – No components enabled.

  • TY_STATUS_BUSY – Device has been started.

  • TY_STATUS_DEVICE_ERROR – Start capture failed.

TY_CAPI TYStopCapture(TY_DEV_HANDLE hDevice)

Stop capture.

参数:

hDevice[in] Device handle.

返回值:
  • TY_STATUS_OK – Succeed.

  • TY_STATUS_INVALID_HANDLE – Invalid device handle.

  • TY_STATUS_IDLE – Device is not capturing.

  • TY_STATUS_DEVICE_ERROR – Stop capture failed.

TY_CAPI TYSendSoftTrigger(TY_DEV_HANDLE hDevice)

Send a software trigger to capture a frame when device works in trigger mode.

参数:

hDevice[in] Device handle.

返回值:
  • TY_STATUS_OK – Succeed.

  • TY_STATUS_INVALID_HANDLE – Invalid device handle.

  • TY_STATUS_INVALID_FEATURE – Not support soft trigger.

  • TY_STATUS_IDLE – Device has not started capture.

  • TY_STATUS_WRONG_MODE – Not in trigger mode.

TY_CAPI TYRegisterEventCallback(TY_DEV_HANDLE hDevice, TY_EVENT_CALLBACK callback, void *userdata)

Register device status callback.

Register NULL to clean callback.

参数:
  • hDevice[in] Device handle.

  • callback[in] Callback function.

  • userdata[in] User private data.

返回值:
  • TY_STATUS_OK – Succeed.

  • TY_STATUS_INVALID_HANDLE – Invalid device handle.

  • TY_STATUS_BUSY – Device is capturing.

TY_CAPI TYRegisterImuCallback(TY_DEV_HANDLE hDevice, TY_IMU_CALLBACK callback, void *userdata)

Register imu callback.

Register NULL to clean callback.

参数:
  • hDevice[in] Device handle.

  • callback[in] Callback function.

  • userdata[in] User private data.

返回值:
  • TY_STATUS_OK – Succeed.

  • TY_STATUS_INVALID_HANDLE – Invalid device handle.

  • TY_STATUS_BUSY – Device is capturing.

TY_CAPI TYFetchFrame(TY_DEV_HANDLE hDevice, TY_FRAME_DATA *frame, int32_t timeout)

Fetch one frame.

参数:
  • hDevice[in] Device handle.

  • frame[out] Frame data to be filled.

  • timeout[in] Timeout in milliseconds. <0 for infinite.

返回值:
  • TY_STATUS_OK – Succeed.

  • TY_STATUS_INVALID_HANDLE – Invalid device handle.

  • TY_STATUS_NULL_POINTER – frame is NULL.

  • TY_STATUS_IDLE – Device capturing is not started.

  • TY_STATUS_WRONG_MODE – Callback has been registered, this function is disabled.

  • TY_STATUS_TIMEOUT – Timeout.

TY_CAPI TYHasFeature(TY_DEV_HANDLE hDevice, TY_COMPONENT_ID componentID, TY_FEATURE_ID featureID, bool *value)

Check whether a component has a specific feature.

参数:
  • hDevice[in] Device handle.

  • componentID[in] Component ID.

  • featureID[in] Feature ID.

  • value[out] Whether has feature.

返回值:
  • TY_STATUS_OK – Succeed.

  • TY_STATUS_INVALID_HANDLE – Invalid device handle.

  • TY_STATUS_INVALID_COMPONENT – Invalid component ID.

  • TY_STATUS_NULL_POINTER – value is NULL.

TY_CAPI TYGetFeatureInfo(TY_DEV_HANDLE hDevice, TY_COMPONENT_ID componentID, TY_FEATURE_ID featureID, TY_FEATURE_INFO *featureInfo)

Get feature info.

参数:
  • hDevice[in] Device handle.

  • componentID[in] Component ID.

  • featureID[in] Feature ID.

  • featureInfo[out] Feature info.

返回值:
  • TY_STATUS_OK – Succeed.

  • TY_STATUS_INVALID_HANDLE – Invalid device handle.

  • TY_STATUS_INVALID_COMPONENT – Invalid component ID.

  • TY_STATUS_NULL_POINTER – featureInfo is NULL.

TY_CAPI TYGetIntRange(TY_DEV_HANDLE hDevice, TY_COMPONENT_ID componentID, TY_FEATURE_ID featureID, TY_INT_RANGE *intRange)

Get value range of integer feature.

参数:
  • hDevice[in] Device handle.

  • componentID[in] Component ID.

  • featureID[in] Feature ID.

  • intRange[out] Integer range to be filled.

返回值:
  • TY_STATUS_OK – Succeed.

  • TY_STATUS_INVALID_HANDLE – Invalid device handle.

  • TY_STATUS_INVALID_COMPONENT – Invalid component ID.

  • TY_STATUS_INVALID_FEATURE – Invalid feature ID.

  • TY_STATUS_WRONG_TYPE – The feature’s type is not TY_FEATURE_INT.

  • TY_STATUS_NULL_POINTER – intRange is NULL.

TY_CAPI TYGetInt(TY_DEV_HANDLE hDevice, TY_COMPONENT_ID componentID, TY_FEATURE_ID featureID, int32_t *value)

Get value of integer feature.

参数:
  • hDevice[in] Device handle.

  • componentID[in] Component ID.

  • featureID[in] Feature ID.

  • value[out] Integer value.

返回值:
  • TY_STATUS_OK – Succeed.

  • TY_STATUS_INVALID_HANDLE – Invalid device handle.

  • TY_STATUS_INVALID_COMPONENT – Invalid component ID.

  • TY_STATUS_INVALID_FEATURE – Invalid feature ID.

  • TY_STATUS_WRONG_TYPE – The feature’s type is not TY_FEATURE_INT.

  • TY_STATUS_NULL_POINTER – value is NULL.

TY_CAPI TYSetInt(TY_DEV_HANDLE hDevice, TY_COMPONENT_ID componentID, TY_FEATURE_ID featureID, int32_t value)

Set value of integer feature.

参数:
  • hDevice[in] Device handle.

  • componentID[in] Component ID.

  • featureID[in] Feature ID.

  • value[in] Integer value.

返回值:
  • TY_STATUS_OK – Succeed.

  • TY_STATUS_INVALID_HANDLE – Invalid device handle.

  • TY_STATUS_INVALID_COMPONENT – Invalid component ID.

  • TY_STATUS_INVALID_FEATURE – Invalid feature ID.

  • TY_STATUS_NOT_PERMITTED – The feature is not writable.

  • TY_STATUS_WRONG_TYPE – The feature’s type is not TY_FEATURE_INT.

  • TY_STATUS_OUT_OF_RANGE – value is out of range.

  • TY_STATUS_BUSY – Device is capturing, the feature is locked.

TY_CAPI TYGetFloatRange(TY_DEV_HANDLE hDevice, TY_COMPONENT_ID componentID, TY_FEATURE_ID featureID, TY_FLOAT_RANGE *floatRange)

Get value range of float feature.

参数:
  • hDevice[in] Device handle.

  • componentID[in] Component ID.

  • featureID[in] Feature ID.

  • floatRange[out] Float range to be filled.

返回值:
  • TY_STATUS_OK – Succeed.

  • TY_STATUS_INVALID_HANDLE – Invalid device handle.

  • TY_STATUS_INVALID_COMPONENT – Invalid component ID.

  • TY_STATUS_INVALID_FEATURE – Invalid feature ID.

  • TY_STATUS_WRONG_TYPE – The feature’s type is not TY_FEATURE_FLOAT.

  • TY_STATUS_NULL_POINTER – floatRange is NULL.

TY_CAPI TYGetFloat(TY_DEV_HANDLE hDevice, TY_COMPONENT_ID componentID, TY_FEATURE_ID featureID, float *value)

Get value of float feature.

参数:
  • hDevice[in] Device handle.

  • componentID[in] Component ID.

  • featureID[in] Feature ID.

  • value[out] Float value.

返回值:
  • TY_STATUS_OK – Succeed.

  • TY_STATUS_INVALID_HANDLE – Invalid device handle.

  • TY_STATUS_INVALID_COMPONENT – Invalid component ID.

  • TY_STATUS_INVALID_FEATURE – Invalid feature ID.

  • TY_STATUS_WRONG_TYPE – The feature’s type is not TY_FEATURE_FLOAT.

  • TY_STATUS_NULL_POINTER – value is NULL.

TY_CAPI TYSetFloat(TY_DEV_HANDLE hDevice, TY_COMPONENT_ID componentID, TY_FEATURE_ID featureID, float value)

Set value of float feature.

参数:
  • hDevice[in] Device handle.

  • componentID[in] Component ID.

  • featureID[in] Feature ID.

  • value[in] Float value.

返回值:
  • TY_STATUS_OK – Succeed.

  • TY_STATUS_INVALID_HANDLE – Invalid device handle.

  • TY_STATUS_INVALID_COMPONENT – Invalid component ID.

  • TY_STATUS_INVALID_FEATURE – Invalid feature ID.

  • TY_STATUS_NOT_PERMITTED – The feature is not writable.

  • TY_STATUS_WRONG_TYPE – The feature’s type is not TY_FEATURE_FLOAT.

  • TY_STATUS_OUT_OF_RANGE – value is out of range.

  • TY_STATUS_BUSY – Device is capturing, the feature is locked.

TY_CAPI TYGetEnumEntryCount(TY_DEV_HANDLE hDevice, TY_COMPONENT_ID componentID, TY_FEATURE_ID featureID, uint32_t *entryCount)

Get number of enum entries.

参数:
  • hDevice[in] Device handle.

  • componentID[in] Component ID.

  • featureID[in] Feature ID.

  • entryCount[out] Entry count.

返回值:
  • TY_STATUS_OK – Succeed.

  • TY_STATUS_INVALID_HANDLE – Invalid device handle.

  • TY_STATUS_INVALID_COMPONENT – Invalid component ID.

  • TY_STATUS_INVALID_FEATURE – Invalid feature ID.

  • TY_STATUS_WRONG_TYPE – The feature’s type is not TY_FEATURE_ENUM.

  • TY_STATUS_NULL_POINTER – entryCount is NULL.

TY_CAPI TYGetEnumEntryInfo(TY_DEV_HANDLE hDevice, TY_COMPONENT_ID componentID, TY_FEATURE_ID featureID, TY_ENUM_ENTRY *entries, uint32_t entryCount, uint32_t *filledEntryCount)

Get list of enum entries.

参数:
  • hDevice[in] Device handle.

  • componentID[in] Component ID.

  • featureID[in] Feature ID.

  • entries[out] Output entries.

  • entryCount[in] Array size of input parameter “entries”.

  • filledEntryCount[out] Number of filled entries.

返回值:
  • TY_STATUS_OK – Succeed.

  • TY_STATUS_INVALID_HANDLE – Invalid device handle.

  • TY_STATUS_INVALID_COMPONENT – Invalid component ID.

  • TY_STATUS_INVALID_FEATURE – Invalid feature ID.

  • TY_STATUS_WRONG_TYPE – The feature’s type is not TY_FEATURE_ENUM.

  • TY_STATUS_NULL_POINTER – entries or filledEntryCount is NULL.

TY_CAPI TYGetEnum(TY_DEV_HANDLE hDevice, TY_COMPONENT_ID componentID, TY_FEATURE_ID featureID, uint32_t *value)

Get current value of enum feature.

参数:
  • hDevice[in] Device handle.

  • componentID[in] Component ID.

  • featureID[in] Feature ID.

  • value[out] Enum value.

返回值:
  • TY_STATUS_OK – Succeed.

  • TY_STATUS_INVALID_HANDLE – Invalid device handle.

  • TY_STATUS_INVALID_COMPONENT – Invalid component ID.

  • TY_STATUS_INVALID_FEATURE – Invalid feature ID.

  • TY_STATUS_WRONG_TYPE – The feature’s type is not TY_FEATURE_ENUM.

  • TY_STATUS_NULL_POINTER – value is NULL.

TY_CAPI TYSetEnum(TY_DEV_HANDLE hDevice, TY_COMPONENT_ID componentID, TY_FEATURE_ID featureID, uint32_t value)

Set value of enum feature.

参数:
  • hDevice[in] Device handle.

  • componentID[in] Component ID.

  • featureID[in] Feature ID.

  • value[in] Enum value.

返回值:
  • TY_STATUS_OK – Succeed.

  • TY_STATUS_INVALID_HANDLE – Invalid device handle.

  • TY_STATUS_INVALID_COMPONENT – Invalid component ID.

  • TY_STATUS_INVALID_FEATURE – Invalid feature ID.

  • TY_STATUS_NOT_PERMITTED – The feature is not writable.

  • TY_STATUS_WRONG_TYPE – The feature’s type is not TY_FEATURE_ENUM.

  • TY_STATUS_INVALID_PARAMETER – value is invalid.

  • TY_STATUS_BUSY – Device is capturing, the feature is locked.

TY_CAPI TYGetBool(TY_DEV_HANDLE hDevice, TY_COMPONENT_ID componentID, TY_FEATURE_ID featureID, bool *value)

Get value of bool feature.

参数:
  • hDevice[in] Device handle.

  • componentID[in] Component ID.

  • featureID[in] Feature ID.

  • value[out] Bool value.

返回值:
  • TY_STATUS_OK – Succeed.

  • TY_STATUS_INVALID_HANDLE – Invalid device handle.

  • TY_STATUS_INVALID_COMPONENT – Invalid component ID.

  • TY_STATUS_INVALID_FEATURE – Invalid feature ID.

  • TY_STATUS_WRONG_TYPE – The feature’s type is not TY_FEATURE_BOOL.

  • TY_STATUS_NULL_POINTER – value is NULL.

TY_CAPI TYSetBool(TY_DEV_HANDLE hDevice, TY_COMPONENT_ID componentID, TY_FEATURE_ID featureID, bool value)

Set value of bool feature.

参数:
  • hDevice[in] Device handle.

  • componentID[in] Component ID.

  • featureID[in] Feature ID.

  • value[in] Bool value.

返回值:
  • TY_STATUS_OK – Succeed.

  • TY_STATUS_INVALID_HANDLE – Invalid device handle.

  • TY_STATUS_INVALID_COMPONENT – Invalid component ID.

  • TY_STATUS_INVALID_FEATURE – Invalid feature ID.

  • TY_STATUS_NOT_PERMITTED – The feature is not writable.

  • TY_STATUS_WRONG_TYPE – The feature’s type is not TY_FEATURE_BOOL.

  • TY_STATUS_BUSY – Device is capturing, the feature is locked.

TY_CAPI TYGetStringLength(TY_DEV_HANDLE hDevice, TY_COMPONENT_ID componentID, TY_FEATURE_ID featureID, uint32_t *size)

Get internal buffer size of string feature.

参见

TYGetString

参数:
  • hDevice[in] Device handle.

  • componentID[in] Component ID.

  • featureID[in] Feature ID.

  • size[out] String length including ‘\0’.

返回值:
  • TY_STATUS_OK – Succeed.

  • TY_STATUS_INVALID_HANDLE – Invalid device handle.

  • TY_STATUS_INVALID_COMPONENT – Invalid component ID.

  • TY_STATUS_INVALID_FEATURE – Invalid feature ID.

  • TY_STATUS_WRONG_TYPE – The feature’s type is not TY_FEATURE_STRING.

  • TY_STATUS_NULL_POINTER – size is NULL.

TY_CAPI TYGetString(TY_DEV_HANDLE hDevice, TY_COMPONENT_ID componentID, TY_FEATURE_ID featureID, char *buffer, uint32_t bufferSize)

Get value of string feature.

参数:
  • hDevice[in] Device handle.

  • componentID[in] Component ID.

  • featureID[in] Feature ID.

  • buffer[out] String buffer.

  • bufferSize[in] Size of buffer.

返回值:
  • TY_STATUS_OK – Succeed.

  • TY_STATUS_INVALID_HANDLE – Invalid device handle.

  • TY_STATUS_INVALID_COMPONENT – Invalid component ID.

  • TY_STATUS_INVALID_FEATURE – Invalid feature ID.

  • TY_STATUS_WRONG_TYPE – The feature’s type is not TY_FEATURE_STRING.

  • TY_STATUS_NULL_POINTER – buffer is NULL.

TY_CAPI TYSetString(TY_DEV_HANDLE hDevice, TY_COMPONENT_ID componentID, TY_FEATURE_ID featureID, const char *buffer)

Set value of string feature.

参数:
  • hDevice[in] Device handle.

  • componentID[in] Component ID.

  • featureID[in] Feature ID.

  • buffer[in] String buffer.

返回值:
  • TY_STATUS_OK – Succeed.

  • TY_STATUS_INVALID_HANDLE – Invalid device handle.

  • TY_STATUS_INVALID_COMPONENT – Invalid component ID.

  • TY_STATUS_INVALID_FEATURE – Invalid feature ID.

  • TY_STATUS_NOT_PERMITTED – The feature is not writable.

  • TY_STATUS_WRONG_TYPE – The feature’s type is not TY_FEATURE_STRING.

  • TY_STATUS_NULL_POINTER – buffer is NULL.

  • TY_STATUS_OUT_OF_RANGE – Input string is too long.

  • TY_STATUS_BUSY – Device is capturing, the feature is locked.

TY_CAPI TYGetStruct(TY_DEV_HANDLE hDevice, TY_COMPONENT_ID componentID, TY_FEATURE_ID featureID, void *pStruct, uint32_t structSize)

Get value of struct.

参数:
  • hDevice[in] Device handle.

  • componentID[in] Component ID.

  • featureID[in] Feature ID.

  • pStruct[out] Pointer of struct.

  • structSize[in] Size of input buffer pStruct..

返回值:
  • TY_STATUS_OK – Succeed.

  • TY_STATUS_INVALID_HANDLE – Invalid device handle.

  • TY_STATUS_INVALID_COMPONENT – Invalid component ID.

  • TY_STATUS_INVALID_FEATURE – Invalid feature ID.

  • TY_STATUS_WRONG_TYPE – The feature’s type is not TY_FEATURE_STRUCT.

  • TY_STATUS_NULL_POINTER – pStruct is NULL.

  • TY_STATUS_WRONG_SIZE – structSize incorrect.

TY_CAPI TYSetStruct(TY_DEV_HANDLE hDevice, TY_COMPONENT_ID componentID, TY_FEATURE_ID featureID, void *pStruct, uint32_t structSize)

Set value of struct.

参数:
  • hDevice[in] Device handle.

  • componentID[in] Component ID.

  • featureID[in] Feature ID.

  • pStruct[in] Pointer of struct.

  • structSize[in] Size of struct.

返回值:
  • TY_STATUS_OK – Succeed.

  • TY_STATUS_INVALID_HANDLE – Invalid device handle.

  • TY_STATUS_INVALID_COMPONENT – Invalid component ID.

  • TY_STATUS_INVALID_FEATURE – Invalid feature ID.

  • TY_STATUS_NOT_PERMITTED – The feature is not writable.

  • TY_STATUS_WRONG_TYPE – The feature’s type is not TY_FEATURE_STRUCT.

  • TY_STATUS_NULL_POINTER – pStruct is NULL.

  • TY_STATUS_WRONG_SIZE – structSize incorrect.

  • TY_STATUS_BUSY – Device is capturing, the feature is locked.

TY_CAPI TYGetByteArraySize(TY_DEV_HANDLE hDevice, TY_COMPONENT_ID componentID, TY_FEATURE_ID featureID, uint32_t *pSize)

Get the size of specified byte array zone .

参数:
  • hDevice[in] Device handle.

  • componentID[in] Component ID.

  • featureID[in] Feature ID.

  • pSize[out] size of specified byte array zone.

返回值:
  • TY_STATUS_OK – Succeed.

  • TY_STATUS_INVALID_HANDLE – Invalid device handle.

  • TY_STATUS_INVALID_COMPONENT – Invalid component ID.

  • TY_STATUS_INVALID_FEATURE – Invalid feature ID.

  • TY_STATUS_WRONG_TYPE – The feature’s type is not TY_FEATURE_BYTEARRAY.

  • TY_STATUS_NULL_POINTER – pSize is NULL.

TY_CAPI TYGetDeviceFeatureNumber(TY_DEV_HANDLE hDevice, TY_COMPONENT_ID componentID, uint32_t *size)

Get the size of device features .

参数:
  • hDevice[in] Device handle.

  • componentID[in] Component ID.

  • pSize[out] size of all feature cnt.

返回值:
  • TY_STATUS_OK – Succeed.

  • TY_STATUS_INVALID_HANDLE – Invalid device handle.

  • TY_STATUS_INVALID_COMPONENT – Invalid component ID.

  • TY_STATUS_NULL_POINTER – pSize is NULL.

TY_CAPI TYGetDeviceFeatureInfo(TY_DEV_HANDLE hDevice, TY_COMPONENT_ID componentID, TY_FEATURE_INFO *featureInfo, uint32_t entryCount, uint32_t *filledEntryCount)

Get the all features by comp id.

参数:
  • hDevice[in] Device handle.

  • componentID[in] Component ID.

  • featureInfo[out] Output feature info.

  • entryCount[in] Array size of input parameter “featureInfo”.

  • filledEntryCount[out] Number of filled featureInfo.

返回值:
  • TY_STATUS_OK – Succeed.

  • TY_STATUS_INVALID_HANDLE – Invalid device handle.

  • TY_STATUS_INVALID_COMPONENT – Invalid component ID.

  • TY_STATUS_NULL_POINTER – featureInfo or filledEntryCount is NULL.

TY_CAPI TYGetByteArray(TY_DEV_HANDLE hDevice, TY_COMPONENT_ID componentID, TY_FEATURE_ID featureID, uint8_t *pBuffer, uint32_t bufferSize)

Read byte array from device.

参数:
  • hDevice[in] Device handle.

  • componentID[in] Component ID.

  • featureID[in] Feature ID.

  • pbuffer[out] byte buffer.

  • bufferSize[in] Size of buffer.

返回值:
  • TY_STATUS_OK – Succeed.

  • TY_STATUS_INVALID_HANDLE – Invalid device handle.

  • TY_STATUS_INVALID_COMPONENT – Invalid component ID.

  • TY_STATUS_INVALID_FEATURE – Invalid feature ID.

  • TY_STATUS_WRONG_TYPE – The feature’s type is not TY_FEATURE_BYTEARRAY.

  • TY_STATUS_NULL_POINTER – pbuffer is NULL.

  • TY_STATUS_WRONG_SIZE – bufferSize incorrect.

TY_CAPI TYSetByteArray(TY_DEV_HANDLE hDevice, TY_COMPONENT_ID componentID, TY_FEATURE_ID featureID, const uint8_t *pBuffer, uint32_t bufferSize)

Write byte array to device.

参数:
  • hDevice[in] Device handle.

  • componentID[in] Component ID.

  • featureID[in] Feature ID.

  • pbuffer[out] byte buffer.

  • bufferSize[in] Size of buffer.

返回值:
  • TY_STATUS_OK – Succeed.

  • TY_STATUS_INVALID_HANDLE – Invalid device handle.

  • TY_STATUS_INVALID_COMPONENT – Invalid component ID.

  • TY_STATUS_INVALID_FEATURE – Invalid feature ID.

  • TY_STATUS_NOT_PERMITTED – The feature is not writable.

  • TY_STATUS_WRONG_TYPE – The feature’s type is not TY_FEATURE_BYTEARRAY.

  • TY_STATUS_NULL_POINTER – pbuffer is NULL.

  • TY_STATUS_WRONG_SIZE – bufferSize incorrect.

  • TY_STATUS_BUSY – Device is capturing, the feature is locked.

TY_CAPI TYGetByteArrayAttr(TY_DEV_HANDLE hDevice, TY_COMPONENT_ID componentID, TY_FEATURE_ID featureID, TY_BYTEARRAY_ATTR *pAttr)

Write byte array to device.

参数:
  • hDevice[in] Device handle.

  • componentID[in] Component ID.

  • featureID[in] Feature ID.

  • pAttr[out] byte array attribute to be filled.

返回值:
  • TY_STATUS_OK – Succeed.

  • TY_STATUS_INVALID_HANDLE – Invalid device handle.

  • TY_STATUS_INVALID_COMPONENT – Invalid component ID.

  • TY_STATUS_INVALID_FEATURE – Invalid feature ID.

  • TY_STATUS_NOT_PERMITTED – The feature is not writable.

  • TY_STATUS_WRONG_TYPE – The feature’s type is not TY_FEATURE_BYTEARRAY.

  • TY_STATUS_NULL_POINTER – pbuffer is NULL.

TY_CAPI _TYInitLib(void)

Variables

typedef enum
typedef TY_DO_5V   = 1
typedef TY_DO_12V   = 2
typedef TY_E_VOLT_T_LIST
typedef TY_DO_HIGH   = 1
typedef TY_DO_PWM   = 2
typedef TY_DO_CAM_TRIG   = 3
typedef TY_E_DO_MODE_LIST
typedef TY_DI_NE_INT   = 1
typedef TY_DI_PE_INT   = 2
typedef TY_E_DI_MODE_LIST
typedef TY_DI_INT_TRIG_CAP   = 1
typedef TY_DI_INT_EVENT   = 2
typedef TY_E_DI_INT_ACTION_LIST
struct TY_VERSION_INFO
#include <TYApi.h>

Public Members

int32_t major
int32_t minor
int32_t patch
int32_t reserved
struct TY_DEVICE_NET_INFO
#include <TYApi.h>

device network information

Public Members

char mac[32]
char ip[32]
char netmask[32]
char gateway[32]
char broadcast[32]
char reserved[96]
struct TY_DEVICE_USB_INFO
#include <TYApi.h>

Public Members

int bus
int addr
char reserved[248]
struct TY_INTERFACE_INFO
#include <TYApi.h>

Public Members

char name[32]
char id[32]
TY_INTERFACE_TYPE type
char reserved[4]
TY_DEVICE_NET_INFO netInfo
struct TY_DEVICE_BASE_INFO
#include <TYApi.h>

Public Members

TY_INTERFACE_INFO iface
char id[32]

device serial number

char vendorName[32]
char userDefinedName[32]
char modelName[32]

device model name

TY_VERSION_INFO hardwareVersion

deprecated

TY_VERSION_INFO firmwareVersion

deprecated

TY_DEVICE_NET_INFO netInfo
TY_DEVICE_USB_INFO usbInfo
union TY_DEVICE_BASE_INFO::[anonymous] [anonymous]
char buildHash[256]
char configVersion[256]
char reserved[256]
struct TY_FEATURE_INFO
#include <TYApi.h>

Public Members

bool isValid

true if feature exists, false otherwise

TY_ACCESS_MODE accessMode

feature access privilege

bool writableAtRun

feature can be written while capturing

char reserved0[1]
TY_COMPONENT_ID componentID

owner of this feature

TY_FEATURE_ID featureID

feature unique id

char name[32]

describe string

TY_COMPONENT_ID bindComponentID

component ID current feature bind to

TY_FEATURE_ID bindFeatureID

feature ID current feature bind to

char reserved[252]
struct TY_INT_RANGE
#include <TYApi.h>

Public Members

int32_t min
int32_t max
int32_t inc

increaing step

int32_t reserved[1]
struct TY_FLOAT_RANGE
#include <TYApi.h>

float range data structure

Public Members

float min
float max
float inc

increaing step

float reserved[1]
struct TY_BYTEARRAY_ATTR
#include <TYApi.h>

byte array data structure

Public Members

int32_t size

Bytes array size in bytes.

int32_t unit_size

unit size in bytes for special parse

int32_t valid_size

valid size in bytes in case has reserved member, Must be multiple of unit_size, mem_length = valid_size/unit_size

struct TY_ENUM_ENTRY
#include <TYApi.h>

enum feature entry information

Public Members

char description[64]
uint32_t value
uint32_t reserved[3]
struct TY_VECT_3F
#include <TYApi.h>

Public Members

float x
float y
float z
struct TY_CAMERA_INTRINSIC
#include <TYApi.h>

a 3x3 matrix

.

.

.

fx

0

cx

0

fy

cy

0

0

1

参见

TYGetStruct Usage:

TY_CAMERA_INTRINSIC intrinsic;
TYGetStruct(hDevice, some_compoent, TY_STRUCT_CAM_INTRINSIC, &intrinsic, sizeof(intrinsic));

Public Members

float data[3 * 3]
struct TY_CAMERA_EXTRINSIC
#include <TYApi.h>

a 4x4 matrix

.

.

.

.

r11

r12

r13

t1

r21

r22

r23

t2

r31

r32

r33

t3

0

0

0

1

参见

TYGetStruct Usage:

TY_CAMERA_EXTRINSIC extrinsic;
TYGetStruct(hDevice, some_compoent, TY_STRUCT_EXTRINSIC, &extrinsic, sizeof(extrinsic));

Public Members

float data[4 * 4]
struct TY_CAMERA_DISTORTION
#include <TYApi.h>

camera distortion parameters

参见

TYGetStruct Usage:

TY_CAMERA_DISTORTION distortion;
TYGetStruct(hDevice, some_compoent, TY_STRUCT_CAM_DISTORTION, &distortion, sizeof(distortion));

Public Members

float data[12]

Definition is compatible with opencv3.0+ :k1,k2,p1,p2,k3,k4,k5,k6,s1,s2,s3,s4.

struct TY_CAMERA_CALIB_INFO
#include <TYApi.h>

camera ‘s cailbration data

参见

TYGetStruct

Public Members

int32_t intrinsicWidth
int32_t intrinsicHeight
TY_CAMERA_INTRINSIC intrinsic
TY_CAMERA_EXTRINSIC extrinsic
TY_CAMERA_DISTORTION distortion
struct TY_TRIGGER_PARAM
#include <TYApi.h>

Public Members

TY_TRIGGER_MODE mode
int8_t fps
int8_t rsvd
struct TY_TRIGGER_PARAM_EX
#include <TYApi.h>

Public Members

TY_TRIGGER_MODE mode
int8_t fps
int8_t duty
int32_t laser_stream
int32_t led_stream
int32_t led_expo
int32_t led_gain
int32_t ir_gain[2]
int32_t rsvd[32]
union TY_TRIGGER_PARAM_EX::[anonymous] [anonymous]
struct TY_TRIGGER_TIMER_LIST
#include <TYApi.h>

Public Members

uint64_t start_time_us
uint32_t offset_us_count
uint32_t offset_us_list[50]
struct TY_TRIGGER_TIMER_PERIOD
#include <TYApi.h>

Public Members

uint64_t start_time_us
uint32_t trigger_count
uint32_t period_us
struct TY_AEC_ROI_PARAM
#include <TYApi.h>

Public Members

uint32_t x
uint32_t y
uint32_t w
uint32_t h
struct TY_CAMERA_STATISTICS
#include <TYApi.h>

Public Members

uint64_t packetReceived
uint64_t packetLost
uint64_t imageOutputed
uint64_t imageDropped
uint8_t rsvd[1024]
struct TY_IMU_DATA
#include <TYApi.h>

Public Members

uint64_t timestamp
float acc_x
float acc_y
float acc_z
float gyro_x
float gyro_y
float gyro_z
float temperature
float reserved[1]
struct TY_ACC_BIAS
#include <TYApi.h>

a 3x3 matrix

.

.

.

BIASx

BIASy

BIASz

Public Members

float data[3]
struct TY_ACC_MISALIGNMENT
#include <TYApi.h>

a 3x3 matrix

|.

|.|.|

.

.

.

1

-GAMAyz

GAMAzy

GAMAxz

1

-GAMAzx

-GAMAxy

GAMAyx

1

Public Members

float data[3 * 3]
struct TY_ACC_SCALE
#include <TYApi.h>

a 3x3 matrix

.

.

.

SCALEx

0

0

0

SCALEy

0

0

0

SCALEz

Public Members

float data[3 * 3]
struct TY_GYRO_BIAS
#include <TYApi.h>

a 3x3 matrix

.

.

.

BIASx

BIASy

BIASz

Public Members

float data[3]
struct TY_GYRO_MISALIGNMENT
#include <TYApi.h>

a 3x3 matrix

.

.

.

1

-ALPHAyz

ALPHAzy

0

1

-ALPHAzx

0

0

1

Public Members

float data[3 * 3]
struct TY_GYRO_SCALE
#include <TYApi.h>

a 3x3 matrix

.

.

.

SCALEx

0

0

0

SCALEy

0

0

0

SCALEz

Public Members

float data[3 * 3]
struct TY_CAMERA_TO_IMU
#include <TYApi.h>

a 4x4 matrix

.

.

.

.

r11

r12

r13

t1

r21

r22

r23

t2

r31

r32

r33

t3

0

0

0

1

Public Members

float data[4 * 4]
struct TY_TOF_FREQ
#include <TYApi.h>

Public Members

uint32_t freq1
uint32_t freq2
struct TY_IMAGE_DATA
#include <TYApi.h>

Public Members

uint64_t timestamp

Timestamp in microseconds.

int32_t imageIndex

image index used in trigger mode

int32_t status

Status of this buffer.

int32_t componentID

Where current data come from.

int32_t size

Buffer size.

void *buffer

Pointer to data buffer.

int32_t width

Image width in pixels.

int32_t height

Image height in pixels.

int32_t pixelFormat

Pixel format, see TY_PIXEL_FORMAT_LIST.

int32_t reserved[9]

Reserved.

struct TY_FRAME_DATA
#include <TYApi.h>

Public Members

void *userBuffer

Pointer to user enqueued buffer, user should enqueue this buffer in the end of callback.

int32_t bufferSize

Size of userBuffer.

int32_t validCount

Number of valid data.

int32_t reserved[6]

Reserved: reserved[0],laser_val;.

TY_IMAGE_DATA image[10]

Buffer data, max to 10 images per frame, each buffer data could be an image or something else.

struct TY_EVENT_INFO
#include <TYApi.h>

Public Members

TY_EVENT eventId
char message[124]
struct TY_DO_WORKMODE
#include <TYApi.h>

Public Members

TY_E_DO_MODE mode
TY_E_VOLT_T volt
uint32_t freq
uint32_t duty
uint32_t mode_supported
uint32_t volt_supported
uint32_t reserved[3]
struct TY_DI_WORKMODE
#include <TYApi.h>

Public Members

TY_E_DI_MODE mode
TY_E_DI_INT_ACTION int_act
uint32_t mode_supported
uint32_t int_act_supported
uint32_t status
uint32_t reserved[3]

API for coodinate mapping functions

Coordinate Conversion API.

Copyright

Copyright(C)2016-2018 Percipio All Rights Reserved

备注

Considering performance, we leave the responsibility of parameters check to users.

Defines

TYMAP_CHECKRET(f, bufToFree)

Typedefs

typedef struct TY_PIXEL_DESC TY_PIXEL_DESC
typedef struct TY_PIXEL_COLOR_DESC TY_PIXEL_COLOR_DESC

Functions

TY_CAPI TYInvertExtrinsic(const TY_CAMERA_EXTRINSIC *orgExtrinsic, TY_CAMERA_EXTRINSIC *invExtrinsic)

Calculate 4x4 extrinsic matrix’s inverse matrix.

参数:
  • orgExtrinsic[in] Input extrinsic matrix.

  • invExtrinsic[out] Inverse matrix.

返回值:
  • TY_STATUS_OK – Succeed.

  • TY_STATUS_ERROR – Calculation failed.

TY_CAPI TYMapDepthToPoint3d(const TY_CAMERA_CALIB_INFO *src_calib, uint32_t depthW, uint32_t depthH, const TY_PIXEL_DESC *depthPixels, uint32_t count, TY_VECT_3F *point3d, float f_scale_unit = 1.0f)

Map pixels on depth image to 3D points.

参数:
  • src_calib[in] Depth image’s calibration data.

  • depthW[in] Width of depth image.

  • depthH[in] Height of depth image.

  • depthPixels[in] Pixels on depth image.

  • count[in] Number of depth pixels.

  • point3d[out] Output point3D.

返回值:

TY_STATUS_OK – Succeed.

TY_CAPI TYMapPoint3dToDepth(const TY_CAMERA_CALIB_INFO *dst_calib, const TY_VECT_3F *point3d, uint32_t count, uint32_t depthW, uint32_t depthH, TY_PIXEL_DESC *depth, float f_scale_unit = 1.0f)

Map 3D points to pixels on depth image.

Reverse operation of TYMapDepthToPoint3d.

参数:
  • dst_calib[in] Target depth image’s calibration data.

  • point3d[in] Input 3D points.

  • count[in] Number of points.

  • depthW[in] Width of target depth image.

  • depthH[in] Height of target depth image.

  • depth[out] Output depth pixels.

返回值:

TY_STATUS_OK – Succeed.

TY_CAPI TYMapDepthImageToPoint3d(const TY_CAMERA_CALIB_INFO *src_calib, int32_t imageW, int32_t imageH, const uint16_t *depth, TY_VECT_3F *point3d, float f_scale_unit = 1.0f)

Map depth image to 3D points.

0 depth pixels maps to (NAN, NAN, NAN).

参数:
  • src_calib[in] Depth image’s calibration data.

  • depthW[in] Width of depth image.

  • depthH[in] Height of depth image.

  • depth[in] Depth image.

  • point3d[out] Output point3D image.

返回值:

TY_STATUS_OK – Succeed.

TY_CAPI TYMapPoint3dToDepthImage(const TY_CAMERA_CALIB_INFO *dst_calib, const TY_VECT_3F *point3d, uint32_t count, uint32_t depthW, uint32_t depthH, uint16_t *depth, float f_target_scale = 1.0f)

Map 3D points to depth image.

(NAN, NAN, NAN) will be skipped.

参数:
  • dst_calib[in] Target depth image’s calibration data.

  • point3d[in] Input 3D points.

  • count[in] Number of points.

  • depthW[in] Width of target depth image.

  • depthH[in] Height of target depth image.

  • depth[inout] Depth image buffer.

返回值:

TY_STATUS_OK – Succeed.

TY_CAPI TYMapPoint3dToPoint3d(const TY_CAMERA_EXTRINSIC *extrinsic, const TY_VECT_3F *point3dFrom, int32_t count, TY_VECT_3F *point3dTo)

Map 3D points to another coordinate.

参数:
  • extrinsic[in] Extrinsic matrix.

  • point3dFrom[in] Source 3D points.

  • count[in] Number of source 3D points.

  • point3dTo[out] Target 3D points.

返回值:

TY_STATUS_OK – Succeed.

static inline TY_STATUS TYMapDepthToColorCoordinate(const TY_CAMERA_CALIB_INFO *depth_calib, uint32_t depthW, uint32_t depthH, const TY_PIXEL_DESC *depth, uint32_t count, const TY_CAMERA_CALIB_INFO *color_calib, uint32_t mappedW, uint32_t mappedH, TY_PIXEL_DESC *mappedDepth, float f_scale_unit = 1.0f)

Map depth pixels to color coordinate pixels.

参数:
  • depth_calib[in] Depth image’s calibration data.

  • depthW[in] Width of current depth image.

  • depthH[in] Height of current depth image.

  • depth[in] Depth image pixels.

  • count[in] Number of depth image pixels.

  • color_calib[in] Color image’s calibration data.

  • mappedW[in] Width of target depth image.

  • mappedH[in] Height of target depth image.

  • mappedDepth[out] Output pixels.

返回值:

TY_STATUS_OK – Succeed.

static inline TY_STATUS TYMapDepthImageToColorCoordinate(const TY_CAMERA_CALIB_INFO *depth_calib, uint32_t depthW, uint32_t depthH, const uint16_t *depth, const TY_CAMERA_CALIB_INFO *color_calib, uint32_t mappedW, uint32_t mappedH, uint16_t *mappedDepth, float f_scale_unit = 1.0f)

Map original depth image to color coordinate depth image.

参数:
  • depth_calib[in] Depth image’s calibration data.

  • depthW[in] Width of current depth image.

  • depthH[in] Height of current depth image.

  • depth[in] Depth image.

  • color_calib[in] Color image’s calibration data.

  • mappedW[in] Width of target depth image.

  • mappedH[in] Height of target depth image.

  • mappedDepth[out] Output pixels.

返回值:

TY_STATUS_OK – Succeed.

static inline TY_STATUS TYCreateDepthToColorCoordinateLookupTable(const TY_CAMERA_CALIB_INFO *depth_calib, uint32_t depthW, uint32_t depthH, const uint16_t *depth, const TY_CAMERA_CALIB_INFO *color_calib, uint32_t mappedW, uint32_t mappedH, TY_PIXEL_DESC *lut, float f_scale_unit = 1.0f)

Create depth image to color coordinate lookup table.

参数:
  • depth_calib[in] Depth image’s calibration data.

  • depthW[in] Width of current depth image.

  • depthH[in] Height of current depth image.

  • depth[in] Depth image.

  • color_calib[in] Color image’s calibration data.

  • mappedW[in] Width of target depth image.

  • mappedH[in] Height of target depth image.

  • lut[out] Output lookup table.

返回值:

TY_STATUS_OK – Succeed.

static inline TY_STATUS TYMapRGBPixelsToDepthCoordinate(const TY_CAMERA_CALIB_INFO *depth_calib, uint32_t depthW, uint32_t depthH, const uint16_t *depth, const TY_CAMERA_CALIB_INFO *color_calib, uint32_t rgbW, uint32_t rgbH, TY_PIXEL_COLOR_DESC *src, uint32_t cnt, uint32_t min_distance, uint32_t max_distance, TY_PIXEL_COLOR_DESC *dst, float f_scale_unit = 1.0f)

Map original RGB pixels to depth coordinate.

参数:
  • depth_calib[in] Depth image’s calibration data.

  • depthW[in] Width of current depth image.

  • depthH[in] Height of current depth image.

  • depth[in] Current depth image.

  • color_calib[in] Color image’s calibration data.

  • rgbW[in] Width of RGB image.

  • rgbH[in] Height of RGB image.

  • src[in] Input RGB pixels info.

  • cnt[in] Input src RGB pixels cnt

  • min_distance[in] The min distance(mm), which is generally set to the minimum measured distance of the current camera

  • max_distance[in] The longest distance(mm), which is generally set to the longest measuring distance of the current camera

  • dst[out] Output RGB pixels info.

返回值:

TY_STATUS_OK – Succeed.

static inline TY_STATUS TYMapRGBImageToDepthCoordinate(const TY_CAMERA_CALIB_INFO *depth_calib, uint32_t depthW, uint32_t depthH, const uint16_t *depth, const TY_CAMERA_CALIB_INFO *color_calib, uint32_t rgbW, uint32_t rgbH, const uint8_t *inRgb, uint8_t *mappedRgb, float f_scale_unit = 1.0f)

Map original RGB image to depth coordinate RGB image.

参数:
  • depth_calib[in] Depth image’s calibration data.

  • depthW[in] Width of current depth image.

  • depthH[in] Height of current depth image.

  • depth[in] Current depth image.

  • color_calib[in] Color image’s calibration data.

  • rgbW[in] Width of RGB image.

  • rgbH[in] Height of RGB image.

  • inRgb[in] Current RGB image.

  • mappedRgb[out] Output RGB image.

返回值:

TY_STATUS_OK – Succeed.

static inline TY_STATUS TYMapRGB48ImageToDepthCoordinate(const TY_CAMERA_CALIB_INFO *depth_calib, uint32_t depthW, uint32_t depthH, const uint16_t *depth, const TY_CAMERA_CALIB_INFO *color_calib, uint32_t rgbW, uint32_t rgbH, const uint16_t *inRgb, uint16_t *mappedRgb, float f_scale_unit = 1.0f)

Map original RGB48 image to depth coordinate RGB image.

参数:
  • depth_calib[in] Depth image’s calibration data.

  • depthW[in] Width of current depth image.

  • depthH[in] Height of current depth image.

  • depth[in] Current depth image.

  • color_calib[in] Color image’s calibration data.

  • rgbW[in] Width of RGB48 image.

  • rgbH[in] Height of RGB48 image.

  • inRgb[in] Current RGB48 image.

  • mappedRgb[out] Output RGB48 image.

返回值:

TY_STATUS_OK – Succeed.

static inline TY_STATUS TYMapMono16ImageToDepthCoordinate(const TY_CAMERA_CALIB_INFO *depth_calib, uint32_t depthW, uint32_t depthH, const uint16_t *depth, const TY_CAMERA_CALIB_INFO *color_calib, uint32_t rgbW, uint32_t rgbH, const uint16_t *gray, uint16_t *mappedGray, float f_scale_unit = 1.0f)

Map original MONO16 image to depth coordinate MONO16 image.

参数:
  • depth_calib[in] Depth image’s calibration data.

  • depthW[in] Width of current depth image.

  • depthH[in] Height of current depth image.

  • depth[in] Current depth image.

  • color_calib[in] Color image’s calibration data.

  • rgbW[in] Width of MONO16 image.

  • rgbH[in] Height of MONO16 image.

  • gray[in] Current MONO16 image.

  • mappedGray[out] Output MONO16 image.

返回值:

TY_STATUS_OK – Succeed.

static inline TY_STATUS TYMapMono8ImageToDepthCoordinate(const TY_CAMERA_CALIB_INFO *depth_calib, uint32_t depthW, uint32_t depthH, const uint16_t *depth, const TY_CAMERA_CALIB_INFO *color_calib, uint32_t monoW, uint32_t monoH, const uint8_t *inMono, uint8_t *mappedMono, float f_scale_unit = 1.0f)

Map original MONO8 image to depth coordinate MONO8 image.

参数:
  • depth_calib[in] Depth image’s calibration data.

  • depthW[in] Width of current depth image.

  • depthH[in] Height of current depth image.

  • depth[in] Current depth image.

  • color_calib[in] Color image’s calibration data.

  • monoW[in] Width of MONO8 image.

  • monoH[in] Height of MONO8 image.

  • inMono[in] Current MONO8 image.

  • mappedMono[out] Output MONO8 image.

返回值:

TY_STATUS_OK – Succeed.

struct TY_PIXEL_DESC
#include <TYCoordinateMapper.h>

Public Members

int16_t x
int16_t y
uint16_t depth
uint16_t rsvd
struct TY_PIXEL_COLOR_DESC
#include <TYCoordinateMapper.h>

Public Members

int16_t x
int16_t y
uint8_t bgr_ch1
uint8_t bgr_ch2
uint8_t bgr_ch3
uint8_t rsvd

API for Depth and IR image post processing

@breif Image post-process API

Copyright

Copyright(C)2016-2018 Percipio All Rights Reserved

Defines

DepthSpeckleFilterParameters_Initializer
DepthEnhenceParameters_Initializer

Functions

TY_CAPI TYImageProcesAcceEnable(bool en)

Image processing acceleration switch.

参数:

en[in] Enable image process acceleration switch

TY_CAPI TYUndistortImage(const TY_CAMERA_CALIB_INFO *srcCalibInfo, const TY_IMAGE_DATA *srcImage, const TY_CAMERA_INTRINSIC *cameraNewIntrinsic, TY_IMAGE_DATA *dstImage)

Do image undistortion, only support TY_PIXEL_FORMAT_MONO ,TY_PIXEL_FORMAT_RGB,TY_PIXEL_FORMAT_BGR.

参数:
  • srcCalibInfo[in] Image calibration data.

  • srcImage[in] Source image.

  • cameraNewIntrinsic[in] Expected new image intrinsic, will use srcCalibInfo for new image intrinsic if set to NULL.

  • dstImage[out] Output image.

返回值:
  • TY_STATUS_OK – Succeed.

  • TY_STATUS_NULL_POINTER – Any srcCalibInfo, srcImage, dstImage, srcImage->buffer, dstImage->buffer is NULL.

  • TY_STATUS_INVALID_PARAMETER – Invalid srcImage->width, srcImage->height, dstImage->width, dstImage->height or unsupported pixel format.

TY_CAPI TYDepthSpeckleFilter(TY_IMAGE_DATA *depthImage, const DepthSpeckleFilterParameters *param)

Remove speckles on depth image.

参数:
  • depthImage[inout] Depth image to be processed.

  • param[in] Algorithm parameters.

返回值:
  • TY_STATUS_OK – Succeed.

  • TY_STATUS_NULL_POINTER – Any depth, param or depth->buffer is NULL.

  • TY_STATUS_INVALID_PARAMETER – param->max_speckle_size <= 0 or param->max_speckle_diff <= 0

TY_CAPI TYDepthEnhenceFilter(const TY_IMAGE_DATA *depthImages, int imageNum, TY_IMAGE_DATA *guide, TY_IMAGE_DATA *output, const DepthEnhenceParameters *param)

Remove speckles on depth image.

参数:
  • depthImage[in] Pointer to depth image array.

  • imageNum[in] Depth image array size.

  • guide[inout] Guide image.

  • output[out] Output depth image.

  • param[in] Algorithm parameters.

返回值:
  • TY_STATUS_OK – Succeed.

  • TY_STATUS_NULL_POINTER – Any depthImage, param, output or output->buffer is NULL.

  • TY_STATUS_INVALID_PARAMETER – imageNum >= 11 or imageNum <= 0, or any image invalid

  • TY_STATUS_OUT_OF_MEMORY – Output image not suitable.

struct DepthSpeckleFilterParameters
#include <TYImageProc.h>

Public Members

int max_speckle_size
int max_speckle_diff
struct DepthEnhenceParameters
#include <TYImageProc.h>

Public Members

float sigma_s

filter param on space

float sigma_r

filter param on range

int outlier_win_sz

outlier filter windows ize

float outlier_rate

API for Color image post processing

@breif this file Include interface declare for raw color image (bayer format) process functions

Copyright(C)2016-2019 Percipio All Rights Reserved

Defines

TYISP_CAPI

Typedefs

typedef void *TY_ISP_HANDLE

Enums

enum TY_ISP_FEATURE_ID

Values:

enumerator TY_ISP_FEATURE_CAM_MODEL
enumerator TY_ISP_FEATURE_CAM_DEV_HANDLE

device handle for device control

enumerator TY_ISP_FEATURE_CAM_DEV_COMPONENT

the component to control

enumerator TY_ISP_FEATURE_IMAGE_SIZE

image size width&height

enumerator TY_ISP_FEATURE_WHITEBALANCE_GAIN
enumerator TY_ISP_FEATURE_ENABLE_AUTO_WHITEBALANCE
enumerator TY_ISP_FEATURE_SHADING
enumerator TY_ISP_FEATURE_SHADING_CENTER
enumerator TY_ISP_FEATURE_BLACK_LEVEL

global black level

enumerator TY_ISP_FEATURE_BLACK_LEVEL_COLUMN

to set different black level for each image column

enumerator TY_ISP_FEATURE_BLACK_LEVEL_GAIN

global pixel gain

enumerator TY_ISP_FEATURE_BLACK_LEVEL_GAIN_COLUMN

to set different gain for each image column

enumerator TY_ISP_FEATURE_BAYER_PATTERN
enumerator TY_ISP_FEATURE_DEMOSAIC_METHOD
enumerator TY_ISP_FEATURE_GAMMA
enumerator TY_ISP_FEATURE_DEFECT_PIXEL_LIST
enumerator TY_ISP_FEATURE_CCM
enumerator TY_ISP_FEATURE_CCM_ENABLE

ENABLE CCM.

enumerator TY_ISP_FEATURE_BRIGHT
enumerator TY_ISP_FEATURE_CONTRAST
enumerator TY_ISP_FEATURE_AUTOBRIGHT
enumerator TY_ISP_FEATURE_INPUT_RESAMPLE_SCALE
enumerator TY_ISP_FEATURE_ENABLE_AUTO_EXPOSURE_GAIN
enumerator TY_ISP_FEATURE_AUTO_EXPOSURE_RANGE

exposure range ,default no limit

enumerator TY_ISP_FEATURE_AUTO_GAIN_RANGE

gain range ,default no limit

enumerator TY_ISP_FEATURE_AUTO_EXPOSURE_UPDATE_INTERVAL

update device exposure interval , default 5 frame

enumerator TY_ISP_FEATURE_DEBUG_LOG

display detail log information

enum TY_ISP_BAYER_PATTERN

Values:

enumerator TY_ISP_BAYER_GB
enumerator TY_ISP_BAYER_BG
enumerator TY_ISP_BAYER_RG
enumerator TY_ISP_BAYER_GR
enumerator TY_ISP_BAYER_AUTO
enum TY_DEMOSAIC_METHOD

Values:

enumerator TY_DEMOSAIC_METHOD_SIMPLE
enumerator TY_DEMOSAIC_METHOD_BILINEAR
enumerator TY_DEMOSAIC_METHOD_HQLINEAR
enumerator TY_DEMOSAIC_METHOD_EDGESENSE

Functions

TYISP_CAPI TYISPCreate(TY_ISP_HANDLE *handle)
TYISP_CAPI TYISPRelease(TY_ISP_HANDLE *handle)
TYISP_CAPI TYISPLoadConfig(TY_ISP_HANDLE handle, const uint8_t *config, uint32_t config_size)
TYISP_CAPI TYISPUpdateDevice(TY_ISP_HANDLE handle)

@breif called by main thread to update & control device status for ISP

TYISP_CAPI TYISPSetFeature(TY_ISP_HANDLE handle, TY_ISP_FEATURE_ID feature_id, const uint8_t *data, int32_t size)
TYISP_CAPI TYISPGetFeature(TY_ISP_HANDLE handle, TY_ISP_FEATURE_ID feature_id, uint8_t *data_buff, int32_t buff_size)
TYISP_CAPI TYISPGetFeatureSize(TY_ISP_HANDLE handle, TY_ISP_FEATURE_ID feature_id, int32_t *size)
TYISP_CAPI TYISPHasFeature(TY_ISP_HANDLE handle, TY_ISP_FEATURE_ID feature_id)
TYISP_CAPI TYISPGetFeatureInfoList(TY_ISP_HANDLE handle, TY_ISP_FEATURE_INFO *info_buffer, int buffer_size)
TYISP_CAPI TYISPGetFeatureInfoListSize(TY_ISP_HANDLE handle, int32_t *buffer_size)
TYISP_CAPI TYISPProcessImage(TY_ISP_HANDLE handle, const TY_IMAGE_DATA *image_bayer, TY_IMAGE_DATA *image_out)

@breif convert bayer raw image to rgb image,output buffer is allocated by invoker

struct TY_ISP_FEATURE_INFO
#include <TyIsp.h>

Public Members

TY_ISP_FEATURE_ID id
int32_t size
const char *name
const char *value_type
TY_ACCESS_MODE mode