fast/3rdparty/hikvision/rgbd_camera/inc/Mv3dRgbdDefine.h

513 lines
42 KiB
C
Raw Normal View History

2025-01-20 10:30:01 +08:00
#ifndef _MV3D_RGBD_DEFINE_H_
#define _MV3D_RGBD_DEFINE_H_
#ifndef MV3D_RGBD_API
#if (defined (_WIN32) || defined(WIN64))
#if defined(MV3D_RGBD_EXPORTS)
#define MV3D_RGBD_API __declspec(dllexport)
#else
#define MV3D_RGBD_API __declspec(dllimport)
#endif
#else
#ifndef __stdcall
#define __stdcall
#endif
#ifndef MV3D_RGBD_API
#define MV3D_RGBD_API
#endif
#endif
#endif
/****************************** ch: 摘要 | en: Instructions **********************************************/
/**
* @~chinese
* 6
* 1.
* 2.
* 3.
* 4.
* 5.
* 6.
*
* @~english
* The document mainly consists of six parts:
* 1.Cross Platform Definition
* 2.Status Code
* 3.Macro Definition
* 4.Enumeration
* 5.Data Structure
* 6.Callback Interface Definition
**/
/***************************************** Part1 ch: 跨平台定义 | en: Cross Platform Definition **************************************************/
#ifdef WIN32
typedef signed char int8_t;
typedef short int16_t;
typedef int int32_t;
typedef long long int int64_t;
typedef unsigned char uint8_t;
typedef unsigned short uint16_t;
typedef unsigned int uint32_t;
typedef unsigned long long uint64_t;
#define MV3D_RGBD_UNDEFINED 0xFFFFFFFF
#else
#include <stdint.h>
#define MV3D_RGBD_UNDEFINED -1
#endif
/***************************************** Part2 ch: 状态码 | en: Status Code **************************************************/
/// \~chinese
/// \name 正确码定义
/// @{
/// \~english
/// \name Definition of correct code
/// @{
#define MV3D_RGBD_OK 0x00000000 ///< \~chinese 成功,无错误 \~english Successed, no error
/// @}
///
/// \~chinese
/// \name 通用错误码定义:范围0x80060000-0x800600FF
/// @{
/// \~english
/// \name Definition of General Error Code (from 0x80060000 to 0x800600FF)
/// @{
#define MV3D_RGBD_E_HANDLE 0x80060000 ///< \~chinese 错误或无效的句柄 \~english Incorrect or invalid handle
#define MV3D_RGBD_E_SUPPORT 0x80060001 ///< \~chinese 不支持的功能 \~english The function is not supported
#define MV3D_RGBD_E_BUFOVER 0x80060002 ///< \~chinese 缓存已满 \~english The buffer is full
#define MV3D_RGBD_E_CALLORDER 0x80060003 ///< \~chinese 函数调用顺序错误 \~english Incorrect calling sequence
#define MV3D_RGBD_E_PARAMETER 0x80060004 ///< \~chinese 错误的参数 \~english Incorrect parameter
#define MV3D_RGBD_E_RESOURCE 0x80060005 ///< \~chinese 资源申请失败 \~english Resource request failed
#define MV3D_RGBD_E_NODATA 0x80060006 ///< \~chinese 无数据 \~english No data
#define MV3D_RGBD_E_PRECONDITION 0x80060007 ///< \~chinese 前置条件有误,或运行环境已发生变化 \~english Incorrect precondition, or running environment has changed
#define MV3D_RGBD_E_VERSION 0x80060008 ///< \~chinese 版本不匹配 \~english The version mismatched
#define MV3D_RGBD_E_NOENOUGH_BUF 0x80060009 ///< \~chinese 传入的内存空间不足 \~english Insufficient memory
#define MV3D_RGBD_E_ABNORMAL_IMAGE 0x8006000A ///< \~chinese 异常图像,可能是丢包导致图像不完整 \~english Abnormal image. Incomplete image caused by packet loss
#define MV3D_RGBD_E_LOAD_LIBRARY 0x8006000B ///< \~chinese 动态导入DLL失败 \~english Failed to load the dynamic link library dynamically
#define MV3D_RGBD_E_ALGORITHM 0x8006000C ///< \~chinese 算法错误 \~english Algorithm error
#define MV3D_RGBD_E_DEVICE_OFFLINE 0x8006000D ///< \~chinese 设备离线 \~english The device is offline
#define MV3D_RGBD_E_ACCESS_DENIED 0x8006000E ///< \~chinese 设备无访问权限 \~english No device access permission
#define MV3D_RGBD_E_OUTOFRANGE 0x8006000F ///< \~chinese 值超出范围 \~english The value is out of range
#define MV3D_RGBD_E_UPG_FILE_MISMATCH 0x80060010 ///< \~chinese 升级固件不匹配 \~english The upgraded firmware does not match
#define MV3D_RGBD_E_UPG_CONFLICT 0x80060012 ///< \~chinese 升级冲突 \~english The upgraded firmware conflict
#define MV3D_RGBD_E_UPG_INNER_ERR 0x80060013 ///< \~chinese 升级时相机内部出现错误 \~english An error occurred inside the camera during the upgrade
#define MV3D_RGBD_E_INDUSTRY 0x80060020 ///< \~chinese 行业属性不匹配 \~english The industry attributes does not match
#define MV3D_RGBD_E_NETWORK 0x80060021 ///< \~chinese 网络相关错误 \~english Network related error
#define MV3D_RGBD_E_UNKNOW 0x800600FF ///< \~chinese 未知的错误 \~english Unknown error
/// @}
/***************************************** Part3 ch: 常量定义 | en: Macro Definition **************************************************/
///< \~chinese 常量 \~english Constant
#define MV3D_RGBD_MAX_IMAGE_COUNT 10 ///< \~chinese 最大图片个数 \~english The maximum number of images
#define MV3D_RGBD_MAX_STRING_LENGTH 256 ///< \~chinese 最大字符串长度 \~english The maximum length of string
#define MV3D_RGBD_MAX_PATH_LENGTH 256 ///< \~chinese 最大路径长度 \~english The maximum length of path
#define MV3D_RGBD_MAX_ENUM_COUNT 16 ///< \~chinese 最大枚举数量 \~english The maximum number of enumerations
///< \~chinese 像素类型 \~english Pixel Type
#define MV3D_RGBD_PIXEL_MONO 0x01000000 ///< \~chinese Mono像素格式 \~english Mono pixel format
#define MV3D_RGBD_PIXEL_COLOR 0x02000000 ///< \~chinese Color像素格式 \~english Color pixel format
#define MV3D_RGBD_PIXEL_CUSTOM 0x80000000 ///< \~chinese 自定义像素格式 \~english Custom pixel format
#define MV3D_RGBD_PIXEL_BIT_COUNT(n) ((n) << 16) ///< \~chinese 像素格式 \~english Pixel format
///< \~chinese 属性常量定义 \~english Attribute Key Value Definition
#define MV3D_RGBD_INT_WIDTH "Width" ///< \~chinese 图像宽 \~english Image width
#define MV3D_RGBD_INT_HEIGHT "Height" ///< \~chinese 图像高 \~english Image height
#define MV3D_RGBD_ENUM_WORKINGMODE "CameraWorkingMode" ///< \~chinese 工作模式 \~english The camera working mode
#define MV3D_RGBD_ENUM_PIXELFORMAT "PixelFormat" ///< \~chinese 像素格式 \~english Pixel format
#define MV3D_RGBD_ENUM_IMAGEMODE "ImageMode" ///< \~chinese 图像模式 \~english Image mode
#define MV3D_RGBD_FLOAT_GAIN "Gain" ///< \~chinese 增益 \~english Gain
#define MV3D_RGBD_FLOAT_EXPOSURETIME "ExposureTime" ///< \~chinese 曝光时间 \~english Exposure time
#define MV3D_RGBD_FLOAT_FRAMERATE "AcquisitionFrameRate" ///< \~chinese 采集帧率 \~english Acquired frame rate
#define MV3D_RGBD_ENUM_TRIGGERSELECTOR "TriggerSelector" ///< \~chinese 触发选择器 \~english Trigger selector
#define MV3D_RGBD_ENUM_TRIGGERMODE "TriggerMode" ///< \~chinese 触发模式 \~english Trigger mode
#define MV3D_RGBD_ENUM_TRIGGERSOURCE "TriggerSource" ///< \~chinese 触发源 \~english Trigger source
#define MV3D_RGBD_FLOAT_TRIGGERDELAY "TriggerDelay" ///< \~chinese 触发延迟时间 \~english Trigger delay
#define MV3D_RGBD_INT_IMAGEALIGN "ImageAlign" ///< \~chinese 深度图对齐到RGB坐标系默认值1对齐0不对齐重启程序后恢复默认值
///< \~english Whether to align the depth image with RGB image: 1 (align, default value), 0 (not align). The default value will be restored after rebooting
#define MV3D_RGBD_BOOL_LASERENABLE "LaserEnable" ///< \~chinese 投射器使能 \~english Open or close laser control
#define Mv3D_RGBD_FLOAT_BASEDISTANCE "BaseDistance" ///< \~chinese 左右目基线距 \~english Left and right eyes base distance
#define MV3D_RGBD_ENUM_RESOLUTION "BinningSelector" ///< \~chinese 采集分辨率 \~english Acquisition resolution
#define MV3D_RGBD_INT_OUTPUT_RGBD "OutputRgbd" ///< \~chinese RGBD图像输出默认值0不输出1输出重启程序后恢复默认值
///< \~english Whether to output rgbd image: 1 (not output, default value), 0 (output). The default value will be restored after rebooting
#define MV3D_RGBD_INT_DEVICE_TIMEOUT "DeviceTimeout" ///< \~chinese 设备控制超时时间(ms) \~english Timeout period of device control (unit: ms)
#define MV3D_RGBD_INT_IMAGE_NODE_NUM "ImageNodeNum" ///< \~chinese 图像缓存节点个数 \~english The number of image buffer node
#define MV3D_RGBD_FLOAT_Z_UNIT "ZUnit" ///< \~chinese 深度图量纲(mm) \~english The dimension of depth image (unit: mm)
///< \~chinese 设备文件枚举常量定义 \~english File Constant Definition
#define MV3D_RGBD_SENSOR_CALI "RGBDSensorCali" ///< \~chinese 相机传感器标定文件 \~english The calibration file of camera sensor
#define MV3D_RGBD_HANDEYE_CALI "RGBDHandEyeCali" ///< \~chinese 相机手眼标定文件 \~english The camera hand-eye calibration file
///< \~chinese 类型定义 \~english Typedef Documentation
typedef int32_t MV3D_RGBD_STATUS; ///< \~chinese 返回值类型 \~english Return value type
typedef void* HANDLE; ///< \~chinese 句柄类型 \~english Handle type
typedef int32_t BOOL; ///< \~chinese BOOL类型 \~english Boolean type
#ifndef TRUE
#define TRUE 1
#endif
#ifndef FALSE
#define FALSE 0
#endif
#ifndef NULL
#define NULL 0
#endif
/***************************************** Part4 ch: 枚举 | en: Enumeration **************************************************/
///< \~chinese 设备类型 \~english Device Type
typedef enum Mv3dRgbdDeviceType
{
DeviceType_Ethernet = 1 << 0, ///< \~chinese 网口设备 \~english Network type camera
DeviceType_USB = 1 << 1, ///< \~chinese USB设备 \~english USB type camera
DeviceType_Ethernet_Vir = 1 << 2, ///< \~chinese 虚拟网口设备 \~english Virtual network type camera
DeviceType_USB_Vir = 1 << 3 ///< \~chinese 虚拟USB设备 \~english Virtual USB type camera
} Mv3dRgbdDeviceType;
///< \~chinese ip类型 \~english IP Address Mode
typedef enum Mv3dRgbdIpCfgMode
{
IpCfgMode_Static = 1, ///< \~chinese 静态IP \~english Static IP mode
IpCfgMode_DHCP = 2, ///< \~chinese 自动分配IP(DHCP) \~english Automatically assigned IP address (DHCP)
IpCfgMode_LLA = 4 ///< \~chinese 自动分配IP(LLA) \~english Automatically assigned IP address (LLA)
} Mv3dRgbdIpCfgMode;
///< \~chinese USB协议类型 \~english Supported USB Protocol Type
typedef enum Mv3dRgbdUsbProtocol
{
UsbProtocol_USB2 = 1, ///< \~chinese USB 2.0 \~english USB 2.0
UsbProtocol_USB3 = 2 ///< \~chinese USB 3.0 \~english USB 3.0
} Mv3dRgbdUsbProtocol;
///< \~chinese 图像格式 \~english Image Format
typedef enum Mv3dRgbdImageType
{
ImageType_Undefined = MV3D_RGBD_UNDEFINED, ///< \~chinese 未定义的图像类型 \~english Undefined image type
ImageType_Mono8 = (MV3D_RGBD_PIXEL_MONO | MV3D_RGBD_PIXEL_BIT_COUNT(8) | 0x0001), //0x01080001,(Mono8)
ImageType_Mono16 = (MV3D_RGBD_PIXEL_MONO | MV3D_RGBD_PIXEL_BIT_COUNT(16) | 0x0007), //0x01100007,(Mono16)
ImageType_Depth = (MV3D_RGBD_PIXEL_MONO | MV3D_RGBD_PIXEL_BIT_COUNT(16) | 0x00B8), //0x011000B8,(C16)
ImageType_YUV422 = (MV3D_RGBD_PIXEL_COLOR | MV3D_RGBD_PIXEL_BIT_COUNT(16) | 0x0032), //0x02100032
ImageType_YUV420SP_NV12 = (MV3D_RGBD_PIXEL_COLOR | MV3D_RGBD_PIXEL_BIT_COUNT(12) | 0x8001), //0x020C8001
ImageType_YUV420SP_NV21 = (MV3D_RGBD_PIXEL_COLOR | MV3D_RGBD_PIXEL_BIT_COUNT(12) | 0x8002), //0x020C8002
ImageType_RGB8_Planar = (MV3D_RGBD_PIXEL_COLOR | MV3D_RGBD_PIXEL_BIT_COUNT(24) | 0x0021), //0x02180021
ImageType_PointCloud = (MV3D_RGBD_PIXEL_COLOR | MV3D_RGBD_PIXEL_BIT_COUNT(96) | 0x00C0), //0x026000C0,(ABC32f)
ImageType_Jpeg = (MV3D_RGBD_PIXEL_CUSTOM| MV3D_RGBD_PIXEL_BIT_COUNT(24) | 0x0001), //0x80180001, ///< \~chinese 自定义的图片格式 \~english The custom image format
ImageType_Rgbd = (MV3D_RGBD_PIXEL_CUSTOM| MV3D_RGBD_PIXEL_COLOR| MV3D_RGBD_PIXEL_BIT_COUNT(40) | 0x3007), //0x82283007
} Mv3dRgbdImageType;
///< \~chinese 数据流类型 \~english Data Stream Type
typedef enum Mv3dRgbdStreamType
{
StreamType_Undefined = 0,
StreamType_Depth = 1, ///< \~chinese 深度图数据流 \~english Depth image data stream
StreamType_Color = 2, ///< \~chinese 彩色图数据流 \~english Color image data stream
StreamType_Ir_Left = 3, ///< \~chinese 矫正后的左目图数据流 \~english Corrected left-eye image data stream
StreamType_Ir_Right = 4, ///< \~chinese 矫正后的右目图数据流 \~english Corrected right-eye image data stream
StreamType_Imu = 5, ///< \~chinese IMU数据流 \~english IMU data stream
StreamType_LeftMono = 6, ///< \~chinese 左目泛光图数据流 \~english Illuminated left-eye image data stream
StreamType_Mask = 7, ///< \~chinese 掩膜图数据流 \~english Mask image data stream
StreamType_Mono = 8, ///< \~chinese 未矫正的左右目融合图数据流 \~english Uncorrected left and right eyes fusion image data stream
StreamType_Phase = 9, ///< \~chinese 相位图数据流 \~english Phase image data stream
StreamType_Rgbd = 10 ///< \~chinese RGB-D图数据流 \~english RGB-D image data stream
}Mv3dRgbdStreamType;
///< \~chinese 坐标系类型 \~english Coordinates Type
typedef enum Mv3dRgbdCoordinateType
{
CoordinateType_Undefined = 0, ///< \~chinese 未定义的坐标系 \~english Undefined coordinates
CoordinateType_Depth = 1, ///< \~chinese 深度图坐标系 \~english Depth image coordinates
CoordinateType_RGB = 2 ///< \~chinese RGB图坐标系 \~english RGB image coordinates
} Mv3dRgbdCoordinateType;
///< \~chinese 异常信息 \~english Exception Information
typedef enum Mv3dRgbdDevException
{
DevException_Disconnect = 1 ///< \~chinese 设备断开连接 \~english The device is disconnected
} Mv3dRgbdDevException;
///< \~chinese 参数类型 \~english Parameter Data Type
typedef enum Mv3dRgbdParamType
{
ParamType_Bool = 1, ///< \~chinese Bool类型参数 \~english Boolean
ParamType_Int = 2, ///< \~chinese Int类型参数 \~english Int
ParamType_Float = 3, ///< \~chinese Float类型参数 \~english Float
ParamType_Enum = 4, ///< \~chinese Enum类型参数 \~english Enumeration
ParamType_String = 5 ///< \~chinese String类型参数 \~english String
} Mv3dRgbdParamType;
///< \~chinese 深度图与rgb图存图格式 \~english Format of Saving Depth Images and RGB Images
typedef enum Mv3dRgbdFileType
{
FileType_BMP = 1, ///< \~chinese BMP格式 \~english BMP
FileType_JPG = 2, ///< \~chinese JPG格式 \~english JPG
FileType_TIFF = 3 ///< \~chinese TIFF格式 \~english TIFF
}Mv3dRgbdFileType;
///< \~chinese 点云图存图格式 \~english Formats of Saving Point Cloud Images
typedef enum Mv3dRgbdPointCloudFileType
{
PointCloudFileType_PLY = 1, ///< \~chinese PLY_ASCII格式 \~english PLY(ascii)
PointCloudFileType_CSV = 2, ///< \~chinese CSV格式 \~english CSV
PointCloudFileType_OBJ = 3, ///< \~chinese OBJ格式 \~english OBJ
PointCloudFileType_PLY_Binary = 4 ///< \~chinese PLY_BINARY格式 \~english PLY(binary)
}Mv3dRgbdPointCloudFileType;
/***************************************** Part5 ch: 数据结构体 | en: Data Structure **************************************************/
///< \~chinese 版本信息 \~english SDK Version Information
typedef struct _MV3D_RGBD_VERSION_INFO_
{
uint32_t nMajor; ///< \~chinese 主版本 \~english The main version
uint32_t nMinor; ///< \~chinese 次版本 \~english The minor version
uint32_t nRevision; ///< \~chinese 修正版本 \~english The revision version
} MV3D_RGBD_VERSION_INFO;
///< \~chinese 网口设备信息 \~english Network Type Device Information
typedef struct _MV3D_RGBD_DEVICE_NET_INFO_
{
unsigned char chMacAddress[8]; ///< \~chinese Mac地址 \~english MAC address
Mv3dRgbdIpCfgMode enIPCfgMode; ///< \~chinese 当前IP类型 \~english Current IP type
char chCurrentIp[16]; ///< \~chinese 设备当前IP \~english Devices IP address
char chCurrentSubNetMask[16]; ///< \~chinese 设备当前子网掩码 \~english Devices subnet mask
char chDefultGateWay[16]; ///< \~chinese 设备默认网关 \~english Devices default gateway
char chNetExport[16]; ///< \~chinese 网口IP地址 \~english Network interface IP address
uint8_t nReserved[16]; ///< \~chinese 保留字节 \~english Reserved
} MV3D_RGBD_DEVICE_NET_INFO;
///< \~chinese USB设备信息 \~english USB Type Device Information
typedef struct _MV3D_RGBD_DEVICE_USB_INFO_
{
uint32_t nVendorId; ///< \~chinese 供应商ID号 \~english Manufacturer/vendor ID
uint32_t nProductId; ///< \~chinese 产品ID号 \~english Product ID
Mv3dRgbdUsbProtocol enUsbProtocol; ///< \~chinese 支持的USB协议 \~english Supported USB protocol types
char chDeviceGUID[64]; ///< \~chinese 设备GUID号 \~english Device GUID
uint8_t nReserved[16]; ///< \~chinese 保留字节 \~english Reserved
} MV3D_RGBD_DEVICE_USB_INFO;
///< \~chinese 枚举相关设备信息 \~english Device Information
typedef struct _MV3D_RGBD_DEVICE_INFO_
{
char chManufacturerName[32]; ///< \~chinese 设备厂商 \~english Manufacturer
char chModelName[32]; ///< \~chinese 设备型号 \~english Device model
char chDeviceVersion[32]; ///< \~chinese 设备版本 \~english Device version
char chManufacturerSpecificInfo[44]; ///< \~chinese 设备厂商特殊信息 \~english The specific information about manufacturer
uint32_t nDevTypeInfo; ///< \~chinese 设备类型信息 \~english Device type info
char chSerialNumber[16]; ///< \~chinese 设备序列号 \~english Device serial number
char chUserDefinedName[16]; ///< \~chinese 设备用户自定义名称 \~english User-defined name of device
Mv3dRgbdDeviceType enDeviceType; ///< \~chinese 设备类型网口、USB、虚拟网口设备、虚拟USB设备
///< \~english Device type(network / USB / virtual network / virtual USB)
union
{
MV3D_RGBD_DEVICE_NET_INFO stNetInfo; ///< \~chinese 网口设备特有 \~english Network type device
MV3D_RGBD_DEVICE_USB_INFO stUsbInfo; ///< \~chinese USB设备特有 \~english USB type device information
} SpecialInfo; ///< \~chinese 不同设备特有信息 \~english Particular information of different types devices
} MV3D_RGBD_DEVICE_INFO;
///< \~chinese IP配置 \~english IP Configuration Parameters
typedef struct _MV3D_RGBD_IP_CONFIG_
{
Mv3dRgbdIpCfgMode enIPCfgMode; ///< \~chinese IP配置模式 \~english IP configuration mode
char chDestIp[16]; ///< \~chinese 设置的目标IP,仅静态IP模式下有效 \~english The IP address which is to be attributed to the target device. It is valid in the static IP mode only
char chDestNetMask[16]; ///< \~chinese 设置的目标子网掩码,仅静态IP模式下有效 \~english The subnet mask of target device. It is valid in the static IP mode only
char chDestGateWay[16]; ///< \~chinese 设置的目标网关,仅静态IP模式下有效 \~english The gateway of target device. It is valid in the static IP mode only
uint8_t nReserved[16]; ///< \~chinese 保留字节 \~english Reserved
} MV3D_RGBD_IP_CONFIG;
///< \~chinese 相机图像 \~english Camera Image Parameters
typedef struct _MV3D_RGBD_IMAGE_DATA_
{
Mv3dRgbdImageType enImageType; ///< \~chinese 图像格式 \~english Image format
uint32_t nWidth; ///< \~chinese 图像宽 \~english Image width
uint32_t nHeight; ///< \~chinese 图像高 \~english Image height
uint8_t* pData; ///< \~chinese 相机输出的图像数据 \~english Image data, which is outputted by the camera
uint32_t nDataLen; ///< \~chinese 图像数据长度(字节) \~english Image data length (bytes)
uint32_t nFrameNum; ///< \~chinese 帧号,代表第几帧图像 \~english Frame number, which indicates the frame sequence
int64_t nTimeStamp; ///< \~chinese 设备上报的时间戳 设备上电从0开始规则详见设备手册
///< \~english Timestamp uploaded by the device. It starts from 0 when the device is powered on. Refer to the device user manual for detailed rules
BOOL bIsRectified; ///< \~chinese 是否校正 \~english Correction flag
Mv3dRgbdStreamType enStreamType; ///< \~chinese 流类型,用于区分图像(图像格式相同时) \~english Data stream type, used to distinguish data in the same image format
Mv3dRgbdCoordinateType enCoordinateType; ///< \~chinese 坐标系类型 \~english Coordinates type
uint8_t nReserved[4]; ///< \~chinese 保留字节 \~english Reserved
} MV3D_RGBD_IMAGE_DATA;
///< \~chinese 图像帧数据 \~english Frame Data
typedef struct _MV3D_RGBD_FRAME_DATA_
{
uint32_t nImageCount; ///< \~chinese 图像个数表示stImage数组的有效个数 \~english The number of images. It indicates the number of valid stImage arrays
MV3D_RGBD_IMAGE_DATA stImageData[MV3D_RGBD_MAX_IMAGE_COUNT]; ///< \~chinese 图像数组,每一个代表一种类型的图像 \~english Image array, each one represents one type of images
uint32_t nValidInfo; ///< \~chinese 帧有效信息0帧有效1 << 0丢包1 << 1触发标识符无效
///< \~english Frame valid info: 0 (Frame is valid), 1 << 0 (lost package), 1 << 1 (trigger is not valid)
uint8_t nReserved[12]; ///< \~chinese 保留字节 \~english Reserved
} MV3D_RGBD_FRAME_DATA;
///< \~chinese 固件输出的图像附加信息 \~english Image Additional Information Output by Firmware
typedef struct _MV3D_RGBD_STREAM_CFG_
{
Mv3dRgbdImageType enImageType; ///< \~chinese 图像格式 \~english Image format
uint32_t nWidth; ///< \~chinese 图像宽 \~english Image width
uint32_t nHeight; ///< \~chinese 图像高 \~english Image height
uint8_t nReserved[32]; ///< \~chinese 保留字节 \~english Reserved
}MV3D_RGBD_STREAM_CFG;
///< \~chinese 固件输出的图像帧附加信息 \~english Frame Additional Information Output by Firmware
typedef struct _MV3D_RGBD_STREAM_CFG_LIST_
{
uint32_t nStreamCfgCount; ///< \~chinese 图像信息数量 \~english The number of image information
MV3D_RGBD_STREAM_CFG stStreamCfg[MV3D_RGBD_MAX_IMAGE_COUNT]; ///< \~chinese 图像附加信息 \~english Image additional information
uint8_t nReserved[16]; ///< \~chinese 保留字节 \~english Reserved
}MV3D_RGBD_STREAM_CFG_LIST;
///< \~chinese 相机内参 \~english Camera Internal Parameters
///< | fx| 0| cx|
///< | 0| fy| cy|
///< | 0| 0| 1|
typedef struct _MV3D_RGBD_CAMERA_INTRINSIC_
{
float fData[3*3]; ///< \~chinese 内参参数fx,0,cx,0,fy,cy,0,0,1 \~english Internal parameters: fx,0,cx,0,fy,cy,0,0,1
} MV3D_RGBD_CAMERA_INTRINSIC;
///< \~chinese 相机畸变系数 \~english Camera Distortion Coefficient
typedef struct _MV3D_RGBD_CAMERA_DISTORTION_
{
float fData[12]; ///< \~chinese 畸变系数k1,k2,p1,p2,k3,k4,k5,k6,s1,s2,s3,s4 \~english Distortion coefficient: k1,k2,p1,p2,k3,k4,k5,k6,s1,s2,s3,s4
} MV3D_RGBD_CAMERA_DISTORTION;
///< \~chinese 相机的内参,畸变系数,分辨率信息 \~english Structure About Camera Internal Parameters, Distortion Coefficient and Resolution Information
typedef struct _MV3D_RGBD_CALIB_INFO_
{
MV3D_RGBD_CAMERA_INTRINSIC stIntrinsic; ///< \~chinese 相机内参 \~english Camera internal parameters
MV3D_RGBD_CAMERA_DISTORTION stDistortion; ///< \~chinese 畸变系数 \~english Camera distortion coefficient
uint32_t nWidth; ///< \~chinese 图像宽 \~english Image width
uint32_t nHeight; ///< \~chinese 图像高 \~english Image height
uint8_t nReserved[8]; ///< \~chinese 保留字节 \~english Reserved
} MV3D_RGBD_CALIB_INFO;
///< \~chinese 相机深度图转Rgb的外参 \~english Camera Extrinsic Parameters of Depth Image to Rgb Image
///< | r00| r01| r02| t0|
///< | r10| r11| r12| t1|
///< | r20| r21| r22| t2|
///< | 0| 0| 0| 1|
typedef struct _MV3D_RGBD_CAMERA_EXTRINSIC_
{
float fData[4*4]; ///< \~chinese 深度图转Rgb外参参数r00,r01,r02,t0,r10,r11,r12,t1,r20,r21,r22,t2,0,0,0,1
///< \~english Extrinsic parameters of depth image to rgb image: r00,r01,r02,t0,r10,r11,r12,t1,r20,r21,r22,t2,0,0,0,1
}MV3D_RGBD_CAMERA_EXTRINSIC;
///< \~chinese 相机参数信息 \~english Camera Parameters Information
typedef struct _MV3D_RGBD_CAMERA_PARAM_
{
MV3D_RGBD_CALIB_INFO stDepthCalibInfo; ///< \~chinese 深度图内参和畸变矩阵信息 \~english Depth image intrinsic information and distortion coefficient
MV3D_RGBD_CALIB_INFO stRgbCalibInfo; ///< \~chinese rgb内参和畸变矩阵信息 \~english Rgb image intrinsic information and distortion coefficient
MV3D_RGBD_CAMERA_EXTRINSIC stDepth2RgbExtrinsic; ///< \~chinese 相机深度图转RGB的外参 \~english Camera extrinsic parameters of depth image to rgb image
uint8_t nReserved[32]; ///< \~chinese 保留字节 \~english Reserved
}MV3D_RGBD_CAMERA_PARAM;
///< \~chinese Int类型值 \~english Int Type Value
typedef struct _MV3D_RGBD_INTPARAM_
{
int64_t nCurValue; ///< \~chinese 当前值 \~english Current value
int64_t nMax; ///< \~chinese 最大值 \~english The maximum value
int64_t nMin; ///< \~chinese 最小值 \~english The minimum value
int64_t nInc; ///< \~chinese 增量值 \~english The increment value
} MV3D_RGBD_INTPARAM;
///< \~chinese Enum类型值 \~english Enumeration Type Value
typedef struct _MV3D_RGBD_ENUMPARAM_
{
uint32_t nCurValue; ///< \~chinese 当前值 \~english Current value
uint32_t nSupportedNum; ///< \~chinese 有效数据个数 \~english The number of valid data
uint32_t nSupportValue[MV3D_RGBD_MAX_ENUM_COUNT]; ///< \~chinese 支持的枚举类型 \~english The type of supported enumerations
} MV3D_RGBD_ENUMPARAM;
///< \~chinese Float类型值 \~english Float Type Value
typedef struct _MV3D_RGBD_FLOATPARAM_
{
float fCurValue; ///< \~chinese 当前值 \~english Current value
float fMax; ///< \~chinese 最大值 \~english The maximum value
float fMin; ///< \~chinese 最小值 \~english The minimum value
} MV3D_RGBD_FLOATPARAM;
///< \~chinese String类型值 \~english String Type Value
typedef struct _MV3D_RGBD_STRINGPARAM_
{
char chCurValue[MV3D_RGBD_MAX_STRING_LENGTH]; ///< \~chinese 当前值 \~english Current value
uint32_t nMaxLength; ///< \~chinese 属性节点能设置字符的最大长度 \~english The maximum length of string
} MV3D_RGBD_STRINGPARAM;
///< \~chinese 设备参数 \~english Device Parameters
typedef struct _MV3D_RGBD_PARAM_
{
Mv3dRgbdParamType enParamType; ///< \~chinese 设置属性值类型 \~english Parameter data type
union
{
BOOL bBoolParam; ///< \~chinese Bool类型参数 \~english Boolean type parameter
MV3D_RGBD_INTPARAM stIntParam; ///< \~chinese Int类型参数 \~english Int type parameter
MV3D_RGBD_FLOATPARAM stFloatParam; ///< \~chinese Float类型参数 \~english Float type parameter
MV3D_RGBD_ENUMPARAM stEnumParam; ///< \~chinese Enum类型参数 \~english Enum type parameter
MV3D_RGBD_STRINGPARAM stStringParam; ///< \~chinese String类型参数 \~english String type parameter
} ParamInfo;
uint8_t nReserved[16]; ///< \~chinese 保留字节 \~english Reserved
} MV3D_RGBD_PARAM;
///< \~chinese 异常信息 \~english Exception Information
typedef struct _MV3D_RGBD_EXCEPTION_INFO_
{
Mv3dRgbdDevException enExceptionId; ///< \~chinese 异常ID \~english Exception ID
char chExceptionDes[MV3D_RGBD_MAX_STRING_LENGTH]; ///< \~chinese 异常描述 \~english Exception description
uint8_t nReserved[4]; ///< \~chinese 保留字节 \~english Reserved
} MV3D_RGBD_EXCEPTION_INFO;
///< \~chinese 文件存取 \~english File Access
typedef struct _MV3D_RGBD_FILE_ACCESS_
{
const char* pUserFileName; ///< \~chinese 用户文件名 \~english User file name
const char* pDevFileName; ///< \~chinese 设备文件名 \~english Device file name
uint8_t nReserved[32]; ///< \~chinese 保留字节 \~english Reserved
}MV3D_RGBD_FILE_ACCESS;
///< \~chinese 文件存取进度 \~english File Access Progress
typedef struct _MV3D_RGBD_FILE_ACCESS_PROGRESS_
{
int64_t nCompleted; ///< \~chinese 已完成的长度 \~english Completed length
int64_t nTotal; ///< \~chinese 总长度 \~english Total length
uint8_t nReserved[32]; ///< \~chinese 保留字节 \~english Reserved
}MV3D_RGBD_FILE_ACCESS_PROGRESS;
/***************************************** Part6 ch: 回调接口定义 | en: Callback Interface Definition **************************************************/
///< \~chinese 帧数据回调 \~english Frame Data Callback
typedef void(__stdcall* MV3D_RGBD_FrameDataCallBack) (MV3D_RGBD_FRAME_DATA* pstFrameData, void* pUser);
///< \~chinese 异常回调 \~english Exception Callback
typedef void(__stdcall* MV3D_RGBD_ExceptionCallBack) (MV3D_RGBD_EXCEPTION_INFO* pstExceptInfo, void* pUser);
#endif // _MV3D_RGBD_DEFINE_H_