diff --git a/orbbec_camera/CMakeLists.txt b/orbbec_camera/CMakeLists.txt index c7ab123a..e962d45b 100644 --- a/orbbec_camera/CMakeLists.txt +++ b/orbbec_camera/CMakeLists.txt @@ -41,8 +41,21 @@ pkg_search_module(GLOG REQUIRED libglog) if (NOT GLOG_FOUND) message(FATAL_ERROR "glog is not found") endif() +execute_process(COMMAND uname -m OUTPUT_VARIABLE MACHINES) +execute_process(COMMAND getconf LONG_BIT OUTPUT_VARIABLE MACHINES_BIT) +message(STATUS "ORRBEC Machine : ${MACHINES}") +message(STATUS "ORRBEC Machine Bits : ${MACHINES_BIT}") +if ((${MACHINES} MATCHES "x86_64") AND (${MACHINES_BIT} MATCHES "64")) + set(HOST_PLATFORM "x64") +elseif (${MACHINES} MATCHES "arm") + set(HOST_PLATFORM "arm") +elseif ((${MACHINES} MATCHES "aarch64") AND (${MACHINES_BIT} MATCHES "64")) + set(HOST_PLATFORM "arm64") +elseif ((${MACHINES} MATCHES "aarch64") AND (${MACHINES_BIT} MATCHES "32")) + set(HOST_PLATFORM "arm") +endif () -set(ORBBEC_LIBS ${CMAKE_CURRENT_SOURCE_DIR}/SDK/lib) +set(ORBBEC_LIBS ${CMAKE_CURRENT_SOURCE_DIR}/SDK/lib/${HOST_PLATFORM}) set(ORBBEC_INCLUDE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/SDK/include/) add_library(${PROJECT_NAME} SHARED diff --git a/orbbec_camera/SDK/include/libobsensor/ObSensor.hpp b/orbbec_camera/SDK/include/libobsensor/ObSensor.hpp index 0d409ab0..8ebc6753 100644 --- a/orbbec_camera/SDK/include/libobsensor/ObSensor.hpp +++ b/orbbec_camera/SDK/include/libobsensor/ObSensor.hpp @@ -1,10 +1,10 @@ /* License: Apache 2.0. See LICENSE file in root directory. Copyright(c) 2020 Orbbec Corporation. All Rights Reserved. */ -/** +/** * \if English * \file ObSensor.hpp - * \brief + * \brief * libobsensor pure C ++ entry document * \else * \file ObSensor.hpp diff --git a/orbbec_camera/SDK/include/libobsensor/h/Context.h b/orbbec_camera/SDK/include/libobsensor/h/Context.h index 8bdf282c..8c8233a4 100644 --- a/orbbec_camera/SDK/include/libobsensor/h/Context.h +++ b/orbbec_camera/SDK/include/libobsensor/h/Context.h @@ -2,8 +2,8 @@ * \if English * @file Context.h * @brief Context is a management class that describes the runtime of the SDK and is responsible for resource application and release of the SDK. - * Context has the ability to manage multiple devices. It is responsible for enumerating devices, monitoring device callbacks, and enabling multi device synchronization. - * \else + * Context has the ability to manage multiple devices. It is responsible for enumerating devices, monitoring device callbacks, and enabling multi device + * synchronization. \else * @file Context.h * @brief context是描述SDK的runtime一个管理类,负责SDK的资源申请与释放 * context具备多设备的管理能力,负责枚举设备,监听设备回调,启用多设备同步等功能 @@ -81,6 +81,17 @@ void ob_delete_context(ob_context *context, ob_error **error); */ ob_device_list *ob_query_device_list(ob_context *context, ob_error **error); +/** + * @brief 创建网络设备 + * + * @param[in] context 上下文环境 + * @param[in] address 设备ip地址 + * @param[in] port 设备端口 + * @param[out] error 记录错误信息 + * @return[out] ob_device* 返回设备对象 + */ +ob_device *ob_create_net_device(ob_context *context, const char *address, uint16_t port, ob_error **error); + /** * \if English * @brief Set device plug-in callback function @@ -107,7 +118,8 @@ void ob_set_device_changed_callback(ob_context *context, ob_device_changed_callb * @brief Activate the multi-device synchronization function to synchronize the clock of the created device(the device needs to support this function) * * @param[in] context Context - * @param[in] repeatInterval synchronization time interval (unit: ms; if repeatInterval=0, itmeans that it will only be synchronized once and will not be executedregularly) + * @param[in] repeatInterval synchronization time interval (unit: ms; if repeatInterval=0, itmeans that it will only be synchronized once and will not be + * executedregularly) * @param[out] error Log error messages * \else * @brief 启动多设备同步功能,同步已创建设备的时钟(需要使用的设备支持该功能) @@ -139,7 +151,8 @@ void ob_set_logger_severity(ob_log_severity severity, ob_error **error); * @brief Set output log to file * * @param[in] severity log level output to file - * @param[in] directory The log file output path. If the path is empty, the existing settings will continue to be used (if the existing configuration is also empty, the log will not be output to the file) + * @param[in] directory The log file output path. If the path is empty, the existing settings will continue to be used (if the existing configuration is also + * empty, the log will not be output to the file) * @param[out] error Log error messages * \else * @brief 设置输出日志到文件 diff --git a/orbbec_camera/SDK/include/libobsensor/h/Device.h b/orbbec_camera/SDK/include/libobsensor/h/Device.h index 77431402..49220604 100644 --- a/orbbec_camera/SDK/include/libobsensor/h/Device.h +++ b/orbbec_camera/SDK/include/libobsensor/h/Device.h @@ -35,19 +35,19 @@ uint32_t ob_device_list_device_count(ob_device_list *list, ob_error **error); /** *\if English - * @brief Get device information + * @brief Get device name (DEPRECATED) * * @param[in] list Device list object * @param[in] index Device index * @param[out] error Log error messages - * @return ob_device_info* returns device information + * @return const char* returns device name * \else - * @brief 获取设备信息 + * @brief 获取设备名称 (废弃接口) * * @param[in] list 设备列表对象 * @param[in] index 设备索引 * @param[out] error 记录错误信息 - * @return ob_device_info* 返回设备信息 + * @return const char* 返回设备名称 * \endif */ const char *ob_device_list_get_device_name(ob_device_list *list, uint32_t index, ob_error **error); @@ -111,7 +111,7 @@ const char *ob_device_list_get_device_uid(ob_device_list *list, uint32_t index, /** * \if English - * @brief Get the serial number of the specified device + * @brief Get the serial number of the specified device * * @param[in] list Device list object * @param[in] index Device index @@ -533,7 +533,7 @@ ob_property_item ob_device_get_supported_property(ob_device *device, uint32_t in /** * \if English - * @brief Check if device property permission is supported + * @brief Check if device property permission is supported * * @param[in] device Device object * @param[in] property_id Property id @@ -885,7 +885,9 @@ void ob_device_write_authorization_code(ob_device *device, const char *auth_code /** * \if English - * @brief Get the original parameter list of camera calibration saved in the device. The parameters in the list do not correspond to the current open-stream configuration. You need to select the parameters according to the actual situation, and may need to do scaling, mirroring and other processing. Non-professional users are recommended to use the ob_pipeline_get_camera_param() interface. + * @brief Get the original parameter list of camera calibration saved in the device. The parameters in the list do not correspond to the current open-stream + * configuration. You need to select the parameters according to the actual situation, and may need to do scaling, mirroring and other processing. + * Non-professional users are recommended to use the ob_pipeline_get_camera_param() interface. * @param[in] device Device object * @param[out] error Log error messages * @@ -903,9 +905,9 @@ ob_camera_param_list *ob_device_get_calibration_camera_param_list(ob_device *dev /** * \if English - * @brief Device reboot - * @attention The device will be disconnected and reconnected. After the device is disconnected, the interface access to the device handle may be abnormal. Please use the ob_delete_device interface to delete the handle directly. - * After the device is reconnected, it can be obtained again. + * @brief Device reboot + * @attention The device will be disconnected and reconnected. After the device is disconnected, the interface access to the device handle may be abnormal. + * Please use the ob_delete_device interface to delete the handle directly. After the device is reconnected, it can be obtained again. * * @param[in] device Device object * @param[out] error Log error messages @@ -1024,20 +1026,20 @@ const char *ob_device_info_firmware_version(ob_device_info *info, ob_error **err /** * \if English - * @brief Get usb connection type + * @brief Get usb connection type (DEPRECATED) * * @param[in] info Device Information * @param[out] error Log error messages * @return char* returns usb connection type * \else - * @brief 获取usb连接类型 + * @brief 获取usb连接类型 (废弃接口) * * @param[in] info 设备信息 * @param[out] error 记录错误信息 * @return char* 返回usb连接类型 * \endif */ -DEPRECATED const char *ob_device_info_usb_type(ob_device_info *info, ob_error **error); +const char *ob_device_info_usb_type(ob_device_info *info, ob_error **error); /** * \if English @@ -1156,7 +1158,7 @@ ob_camera_param ob_camera_param_list_get_param(ob_camera_param_list *param_list, /** * \if English - * @brief Delete camera parameter list + * @brief Delete camera parameter list * * @param param_list Camera parameter list * @param error Log error messages diff --git a/orbbec_camera/SDK/include/libobsensor/h/Error.h b/orbbec_camera/SDK/include/libobsensor/h/Error.h index 8e5e274c..7c320d0e 100644 --- a/orbbec_camera/SDK/include/libobsensor/h/Error.h +++ b/orbbec_camera/SDK/include/libobsensor/h/Error.h @@ -59,7 +59,7 @@ const char *ob_error_message(ob_error *error); const char *ob_error_function(ob_error *error); /** * \if English - * @brief Get error parameters + * @brief Get error parameters * * @param[in] error Error object * @return const char* returns the error parameter diff --git a/orbbec_camera/SDK/include/libobsensor/h/Filter.h b/orbbec_camera/SDK/include/libobsensor/h/Filter.h index 210059cb..e4df2096 100644 --- a/orbbec_camera/SDK/include/libobsensor/h/Filter.h +++ b/orbbec_camera/SDK/include/libobsensor/h/Filter.h @@ -35,7 +35,7 @@ ob_filter *ob_create_pointcloud_filter(ob_error **error); /** * \if English - * @brief PointCloud Filter device camera parameters + * @brief PointCloud Filter device camera parameters * * @param[in] filter pointcloud_filter object * @param[in] param Camera parameters @@ -52,7 +52,7 @@ void ob_pointcloud_filter_set_camera_param(ob_filter *filter, ob_camera_param pa /** * \if English - * @brief Set point cloud type parameters + * @brief Set point cloud type parameters * * @param[in] filter pointcloud_filter object * @param[in] type Point cloud type: depth point cloud or RGBD point cloud @@ -82,6 +82,36 @@ void ob_pointcloud_filter_set_point_format(ob_filter *filter, ob_format type, ob */ void ob_pointcloud_filter_set_frame_align_state(ob_filter *filter, bool state, ob_error **error); +/** + * \if English + * @brief Set point cloud position data scale ratio + * @param[in] filter pointcloud_filter object + * @param[in] scale scale ratio + * @param[out] error Log error messages + * \else + * @brief 设置点云数据缩放比例 + * @param[in] filter pointcloud_filter对象 + * @param[in] scale 设置点云坐标数据缩放比例 + * @param[out] error 记录错误信息 + * \endif + */ +void ob_pointcloud_filter_set_position_data_scale(ob_filter *filter, float scale, ob_error **error); + +/** + * \if English + * @brief Set point cloud color data normalization + * @param[in] filter pointcloud_filter object + * @param[in] state Whether to normalize + * @param[out] error Log error messages + * \else + * @brief 设置点云颜色数据归一化 + * @param[in] filter pointcloud_filter对象 + * @param[in] state 设置点云颜色数据是否归一化 + * @param[out] error 记录错误信息 + * \endif + */ +void ob_pointcloud_filter_set_color_data_normalization(ob_filter *filter, bool state, ob_error **error); + /** * \if English * @brief Create FormatConvet Filter @@ -118,7 +148,8 @@ void ob_format_convert_filter_set_format(ob_filter *filter, ob_convert_format ty /** * \if English - * @brief Filter reset, cache clear, state reset. If the asynchronous interface is used, the processing thread will also be stopped and the pending cache frames will be cleared. + * @brief Filter reset, cache clear, state reset. If the asynchronous interface is used, the processing thread will also be stopped and the pending cache + * frames will be cleared. * * @param[in] filter filter object * @param[out] error Log error messages @@ -157,7 +188,7 @@ ob_frame *ob_filter_process(ob_filter *filter, ob_frame *frame, ob_error **error * @brief Filter Set the processing result callback function (asynchronous callback interface) * * @param[in] filter filter object - * @param[in] callback + * @param[in] callback * @param[in] user_data Arbitrary user data pointer can be passed in and returned from the callback * @param[out] error Log error messages * \else diff --git a/orbbec_camera/SDK/include/libobsensor/h/Frame.h b/orbbec_camera/SDK/include/libobsensor/h/Frame.h index bf810f1a..bb17e73e 100644 --- a/orbbec_camera/SDK/include/libobsensor/h/Frame.h +++ b/orbbec_camera/SDK/include/libobsensor/h/Frame.h @@ -116,7 +116,7 @@ uint64_t ob_frame_time_stamp_us(ob_frame *frame, ob_error **error); * @return uint64_t 返回帧系统时间戳 * \endif */ -uint64_t ob_frame_system_time_stamp(ob_frame *frame, ob_error **error); +uint64_t ob_frame_system_time_stamp(ob_frame *frame, ob_error **error); /** * \if English @@ -142,8 +142,8 @@ void *ob_frame_data(ob_frame *frame, ob_error **error); * @param[in] frame Frame object * @param[out] error Log error messages * @return uint32_t returns the frame data size - * If it is point cloud data, it returns the number of bytes occupied by all point sets. If you need to find the number of points, you need to divide dataSize by the structure size of the corresponding point type. - * \else + * If it is point cloud data, it returns the number of bytes occupied by all point sets. If you need to find the number of points, you need to divide dataSize + * by the structure size of the corresponding point type. \else * @brief 获取帧数据大小 * * @param[in] frame 帧对象 @@ -430,6 +430,88 @@ ob_gyro_value ob_gyro_frame_value(ob_frame *frame, ob_error **error); */ float ob_gyro_frame_temperature(ob_frame *frame, ob_error **error); +/** + * @brief 增加引用计数 + * + * @param[in] frame 要增加引用计数的帧对象 + * @param[out] error 记录错误信息 + */ +void ob_frame_add_ref(ob_frame *frame, ob_error **error); + +/** + * @brief 创建空的帧对象 + * + * @param[in] frame_format 帧格式 + * @param[in] width 帧宽度 + * @param[in] height 帧高度 + * @param[in] stride_bytes 数据行跨度 + * @param[in] frame_type 帧类型 + * @param[out] error 记录错误信息 + * @return ob_frame* 返回创建的帧对象 + */ +ob_frame *ob_create_frame(ob_format frame_format, int width, int height, int stride_bytes, ob_frame_type frame_type, ob_error **error); + +/** + * @brief 根据外部创建的Buffer创建帧对象 + * + * @param[in] frame_format 帧格式 + * @param[in] frame_width 帧宽度 + * @param[in] frame_height 帧高度 + * @param[in] buffer 帧数据 + * @param[in] buffer_size 帧数据大小 + * @param[in] buffer_destroy_cb 自定义销毁buffer回调 + * @param[in] buffer_destroy_context 自定义销毁buffer回调用户数据 + * @param[out] error 记录错误信息 + * @return ob_frame* 返回创建的帧对象 + */ +ob_frame *ob_create_frame_from_buffer(ob_format frame_format, uint32_t frame_width, uint32_t frame_height, uint8_t *buffer, uint32_t buffer_size, + ob_frame_destroy_callback *buffer_destroy_cb, void *buffer_destroy_context, ob_error **error); + +/** + * @brief 创建空的帧集合 + * + * @param[out] error 记录错误信息 + * @return ob_frame* 返回创建的帧集合对象 + */ +ob_frame *ob_create_frameset(ob_error **error); + +/** + * @brief push帧 + * + * @param[in] frameset 帧集合对象 + * @param[in] type 帧类型 + * @param[in] frame 帧对象 + * @param[out] error 记录错误信息 + */ +void ob_frameset_push_frame(ob_frame *frameset, ob_frame_type type, ob_frame *frame, ob_error **error); + +/** + * @brief 设置帧的系统时间戳 + * + * @param[in] frame 设置的帧对象 + * @param[in] systemTimestamp 设置的系统时间戳 + * @param[out] error 记录错误信息 + */ +void ob_frame_set_system_time_stamp(ob_frame *frame, uint64_t system_timestamp, ob_error **error); + +/** + * @brief 设置帧的设备时间戳 + * + * @param[in] frame 设置的帧对象 + * @param[in] deviceTimestamp 设置的设备时间戳 + * @param[out] error 记录错误信息 + */ +void ob_frame_set_device_time_stamp(ob_frame *frame, uint64_t device_timestamp, ob_error **error); + +/** + * @brief 设置帧的设备时间戳 + * + * @param[in] frame 设置的帧对象 + * @param[in] deviceTimestampUs 设置的设备时间戳(Us) + * @param[out] error 记录错误信息 + */ +void ob_frame_set_device_time_stamp_us(ob_frame *frame, uint64_t device_timestamp_us, ob_error **error); + #ifdef __cplusplus } #endif diff --git a/orbbec_camera/SDK/include/libobsensor/h/ObTypes.h b/orbbec_camera/SDK/include/libobsensor/h/ObTypes.h index 1c71c2f8..535eea4e 100644 --- a/orbbec_camera/SDK/include/libobsensor/h/ObTypes.h +++ b/orbbec_camera/SDK/include/libobsensor/h/ObTypes.h @@ -32,6 +32,8 @@ #define DEPRECATED #endif +#pragma pack(push, 1) // struct 1-byte align + #ifdef __cplusplus extern "C" { #endif @@ -48,7 +50,7 @@ typedef struct SensorImpl ob_sensor; typedef struct SensorListImpl ob_sensor_list; typedef struct StreamProfileImpl ob_stream_profile; typedef struct StreamProfileListImpl ob_stream_profile_list; -typedef struct FrameImpl ob_frame; +typedef struct CFrameImpl ob_frame; typedef struct FilterImpl ob_filter; typedef struct PipelineImpl ob_pipeline; typedef struct ConfigImpl ob_config; @@ -110,15 +112,19 @@ typedef enum { * \endif */ typedef enum { - OB_EXCEPTION_TYPE_UNKNOWN, /**< \if English Unknown error, an error not clearly defined by the SDK \else 未知错误,SDK未明确定义的错误 \endif */ - OB_EXCEPTION_TYPE_CAMERA_DISCONNECTED, /**< \if English SDK device disconnection exception \else SDK的设备断开的异常 \endif */ - OB_EXCEPTION_TYPE_PLATFORM, /**< \if English An error in the SDK adaptation platform layer means an error in the implementation of a specific system platform \else 在SDK适配平台层错误,代表是具体一个系统平台实现上错误 \endif */ - OB_EXCEPTION_TYPE_INVALID_VALUE, /**< \if English Invalid parameter type exception, need to check input parameter \else 无效的参数类型异常,需要检查输入参数 \endif */ + OB_EXCEPTION_TYPE_UNKNOWN, /**< \if English Unknown error, an error not clearly defined by the SDK \else 未知错误,SDK未明确定义的错误 \endif */ + OB_EXCEPTION_TYPE_CAMERA_DISCONNECTED, /**< \if English SDK device disconnection exception \else SDK的设备断开的异常 \endif */ + OB_EXCEPTION_TYPE_PLATFORM, /**< \if English An error in the SDK adaptation platform layer means an error in the implementation of a specific system + platform \else 在SDK适配平台层错误,代表是具体一个系统平台实现上错误 \endif */ + OB_EXCEPTION_TYPE_INVALID_VALUE, /**< \if English Invalid parameter type exception, need to check input parameter \else 无效的参数类型异常,需要检查输入参数 + \endif */ OB_EXCEPTION_TYPE_WRONG_API_CALL_SEQUENCE, /**< \if English Exception caused by API version mismatch\else API版本不匹配带来的异常 \endif */ - OB_EXCEPTION_TYPE_NOT_IMPLEMENTED, /**< \if English SDK and firmware have not yet implemented functions \else SDK及固件还未实现功能 \endif */ - OB_EXCEPTION_TYPE_IO, /**< \if English SDK access IO exception error \else SDK访问IO异常错误 \endif */ - OB_EXCEPTION_TYPE_MEMORY, /**< \if English SDK access and use memory errors, which means that the frame fails to allocate memory \else SDK的访问和使用内存错误,代表桢分配内存失败\endif */ - OB_EXCEPTION_TYPE_UNSUPPORTED_OPERATION, /**< \if English Unsupported operation type error by SDK or RGBD device \else SDK或RGBD设备不支持的操作类型错误 \endif */ + OB_EXCEPTION_TYPE_NOT_IMPLEMENTED, /**< \if English SDK and firmware have not yet implemented functions \else SDK及固件还未实现功能 \endif */ + OB_EXCEPTION_TYPE_IO, /**< \if English SDK access IO exception error \else SDK访问IO异常错误 \endif */ + OB_EXCEPTION_TYPE_MEMORY, /**< \if English SDK access and use memory errors, which means that the frame fails to allocate memory \else + SDK的访问和使用内存错误,代表桢分配内存失败\endif */ + OB_EXCEPTION_TYPE_UNSUPPORTED_OPERATION, /**< \if English Unsupported operation type error by SDK or RGBD device \else SDK或RGBD设备不支持的操作类型错误 + \endif */ } OBExceptionType, ob_exception_type; @@ -130,10 +136,12 @@ typedef enum { * \endif */ typedef struct ob_error { - ob_status status; ///< \if English Describe the status code of the error, as compatible with previous customer status code requirements \else 描述错误的状态码,作为兼容之前客户状态码需求 \endif - char message[256]; ///< \if English Describe the detailed error log \else 描述详细的错误日志 \endif - char function[256]; ///< \if English Describe the name of the function where the error occurred \else 描述出现错误的函数名称 \endif - char args[256]; ///< \if English Describes the parameters passed to the function when an error occurs. Used to check whether the parameter is wrong \else 描述出错时,函数传入的参数。用来检查是不是参数错 \endif + ob_status status; ///< \if English Describe the status code of the error, as compatible with previous customer status code requirements \else + ///< 描述错误的状态码,作为兼容之前客户状态码需求 \endif + char message[256]; ///< \if English Describe the detailed error log \else 描述详细的错误日志 \endif + char function[256]; ///< \if English Describe the name of the function where the error occurred \else 描述出现错误的函数名称 \endif + char args[256]; ///< \if English Describes the parameters passed to the function when an error occurs. Used to check whether the parameter is wrong \else + ///< 描述出错时,函数传入的参数。用来检查是不是参数错 \endif ob_exception_type exception_type; ///< \if English The description is the specific error type of the SDK \else 描述是SDK的具体错误类型 \endif } ob_error; @@ -162,7 +170,8 @@ typedef enum { * \endif */ typedef enum { - OB_STREAM_VIDEO = 0, /**< \if English Video stream (infrared, color, depth streams are all video streams) \else 视频流(红外、彩色、深度流都属于视频流) \endif */ + OB_STREAM_UNKNOWN = -1, /**< \if English Unknown type stream \else 未知类型数据流 \endif */ + OB_STREAM_VIDEO = 0, /**< \if English Video stream (infrared, color, depth streams are all video streams) \else 视频流(红外、彩色、深度流) \endif */ OB_STREAM_IR = 1, /**< \if English IR stream \else 红外流 \endif */ OB_STREAM_COLOR = 2, /**< \if English color stream \else 彩色流 \endif */ OB_STREAM_DEPTH = 3, /**< \if English depth stream \else 深度流 \endif */ @@ -179,11 +188,12 @@ typedef enum { * \endif */ typedef enum { - OB_FRAME_VIDEO = 0, /**< \if English Describes the Frame type enumeration value \else 视频帧(红外、彩色、深度帧都属于视频帧) \endif */ - OB_FRAME_IR = 1, /**< \if English IR frame \else 红外帧 \endif */ - OB_FRAME_COLOR = 2, /**< \if English color stream \else 彩色帧 \endif */ - OB_FRAME_DEPTH = 3, /**< \if English depth stream \else 深度帧 \endif */ - OB_FRAME_ACCEL = 4, /**< \if English Accelerometer data frame \else 加速度计数据帧 \endif */ + OB_FRAME_UNKNOWN = -1, /**< \if English Unknown type frame \else 未知类型数据帧 \endif */ + OB_FRAME_VIDEO = 0, /**< \if English Describes the Frame type enumeration value \else 视频帧(红外、彩色、深度帧都属于视频帧) \endif */ + OB_FRAME_IR = 1, /**< \if English IR frame \else 红外帧 \endif */ + OB_FRAME_COLOR = 2, /**< \if English color stream \else 彩色帧 \endif */ + OB_FRAME_DEPTH = 3, /**< \if English depth stream \else 深度帧 \endif */ + OB_FRAME_ACCEL = 4, /**< \if English Accelerometer data frame \else 加速度计数据帧 \endif */ OB_FRAME_SET = 5, /**< \if English Frame collection (internally contains a variety of data frames) \else 帧集合(内部包含多种数据帧) \endif */ OB_FRAME_POINTS = 6, /**< \if English point cloud frame \else 点云帧 \endif */ OB_FRAME_GYRO = 7, /**< \if English Gyroscope data frame \else 陀螺仪数据帧 \endif */ @@ -198,31 +208,36 @@ typedef enum { * \endif */ typedef enum { - OB_FORMAT_YUYV = 0, /**< \if English YUYV format \else YUYV格式 \endif */ - OB_FORMAT_YUY2 = 1, /**< \if English YUY2 format (the actual format is the same as YUYV) \else YUY2格式(实际格式与YUYV相同) \endif */ - OB_FORMAT_UYVY = 2, /**< \if English UYVY format \else UYVY格式 \endif */ - OB_FORMAT_NV12 = 3, /**< \if English NV12 format \else NV12格式 \endif */ - OB_FORMAT_NV21 = 4, /**< \if English NV21 format \else NV21格式 \endif */ - OB_FORMAT_MJPG = 5, /**< \if English MJPG encoding format \else MJPG编码格式 \endif */ - OB_FORMAT_H264 = 6, /**< \if English H.264 encoding format \else H.264编码格式 \endif */ - OB_FORMAT_H265 = 7, /**< \if English H.265 encoding format \else H.265编码格式 \endif */ - OB_FORMAT_Y16 = 8, /**< \if English Y16 format, single channel 16bit depth \else Y16格式,单通道16bit深度 \endif */ - OB_FORMAT_Y8 = 9, /**< \if English Y8 format, single channel 8bit depth \else Y8格式,单通道8bit深度 \endif */ - OB_FORMAT_Y10 = 10, /**< \if English Y10 format, single channel 10bit depth (SDK will unpack into Y16 by default) \else Y10格式,单通道10bit深度(SDK默认会解包成Y16) \endif */ - OB_FORMAT_Y11 = 11, /**< \if English Y11 format, single channel 11bit depth (SDK will unpack into Y16 by default)\else Y11格式,单通道11bit深度(SDK默认会解包成Y16) \endif */ - OB_FORMAT_Y12 = 12, /**< \if English Y12 format, single channel 12bit depth (SDK will unpack into Y16 by default) \else Y12格式,单通道12bit深度(SDK默认会解包成Y16) \endif */ - OB_FORMAT_GRAY = 13, /**< \if English GRAY (the actual format is the same as YUYV) \else GRAY灰度(实际格式与YUYV相同) \endif */ - OB_FORMAT_HEVC = 14, /**< \if English HEVC encoding format (the actual format is the same as H265) \else HEVC编码格式(实际格式与H265相同) \endif */ - OB_FORMAT_I420 = 15, /**< \if English I420 format \else I420格式 \endif */ - OB_FORMAT_ACCEL = 16, /**< \if English Acceleration data format \else 加速度数据格式 \endif */ - OB_FORMAT_GYRO = 17, /**< \if English Gyroscope Data Format \else 陀螺仪数据格式 \endif */ - OB_FORMAT_POINT = 19, /**< \if English xyz 3D coordinate point format \else 纯x-y-z三维坐标点格式 \endif */ - OB_FORMAT_RGB_POINT = 20, /**< \if English xyz 3D coordinate point format with RGB information \else 带RGB信息的x-y-z三维坐标点格式 \endif */ - OB_FORMAT_RLE = 21, /**< \if English RLE pressure test format (SDK will be unpacked into Y16 by default) \else RLE压测格式(SDK默认会解包成Y16) \endif */ - OB_FORMAT_RGB888 = 22, /**< \if English RGB888 format \else RGB888格式 \endif */ - OB_FORMAT_BGR = 23, /**< \if English BGR format (actual BRG888) \else BGR格式(实际BRG888) \endif */ - OB_FORMAT_Y14 = 24, /**< \if English Y14 format, single channel 14bit depth (SDK will unpack into Y16 by default) \else Y14格式,单通道14bit深度(SDK默认会解包成Y16) \endif */ - OB_FORMAT_UNKNOWN = 0xff, /**< \if English unknown format \else 未知格式 \endif */ + OB_FORMAT_YUYV = 0, /**< \if English YUYV format \else YUYV格式 \endif */ + OB_FORMAT_YUY2 = 1, /**< \if English YUY2 format (the actual format is the same as YUYV) \else YUY2格式(实际格式与YUYV相同) \endif */ + OB_FORMAT_UYVY = 2, /**< \if English UYVY format \else UYVY格式 \endif */ + OB_FORMAT_NV12 = 3, /**< \if English NV12 format \else NV12格式 \endif */ + OB_FORMAT_NV21 = 4, /**< \if English NV21 format \else NV21格式 \endif */ + OB_FORMAT_MJPG = 5, /**< \if English MJPG encoding format \else MJPG编码格式 \endif */ + OB_FORMAT_H264 = 6, /**< \if English H.264 encoding format \else H.264编码格式 \endif */ + OB_FORMAT_H265 = 7, /**< \if English H.265 encoding format \else H.265编码格式 \endif */ + OB_FORMAT_Y16 = 8, /**< \if English Y16 format, single channel 16bit depth \else Y16格式,单通道16bit深度 \endif */ + OB_FORMAT_Y8 = 9, /**< \if English Y8 format, single channel 8bit depth \else Y8格式,单通道8bit深度 \endif */ + OB_FORMAT_Y10 = 10, /**< \if English Y10 format, single channel 10bit depth (SDK will unpack into Y16 by default) \else + Y10格式,单通道10bit深度(SDK默认会解包成Y16) \endif */ + OB_FORMAT_Y11 = 11, /**< \if English Y11 format, single channel 11bit depth (SDK will unpack into Y16 by default)\else + Y11格式,单通道11bit深度(SDK默认会解包成Y16) \endif */ + OB_FORMAT_Y12 = 12, /**< \if English Y12 format, single channel 12bit depth (SDK will unpack into Y16 by default) \else + Y12格式,单通道12bit深度(SDK默认会解包成Y16) \endif */ + OB_FORMAT_GRAY = 13, /**< \if English GRAY (the actual format is the same as YUYV) \else GRAY灰度(实际格式与YUYV相同) \endif */ + OB_FORMAT_HEVC = 14, /**< \if English HEVC encoding format (the actual format is the same as H265) \else HEVC编码格式(实际格式与H265相同) \endif */ + OB_FORMAT_I420 = 15, /**< \if English I420 format \else I420格式 \endif */ + OB_FORMAT_ACCEL = 16, /**< \if English Acceleration data format \else 加速度数据格式 \endif */ + OB_FORMAT_GYRO = 17, /**< \if English Gyroscope Data Format \else 陀螺仪数据格式 \endif */ + OB_FORMAT_POINT = 19, /**< \if English xyz 3D coordinate point format \else 纯x-y-z三维坐标点格式 \endif */ + OB_FORMAT_RGB_POINT = 20, /**< \if English xyz 3D coordinate point format with RGB information \else 带RGB信息的x-y-z三维坐标点格式 \endif */ + OB_FORMAT_RLE = 21, /**< \if English RLE pressure test format (SDK will be unpacked into Y16 by default) \else RLE压测格式(SDK默认会解包成Y16) \endif */ + OB_FORMAT_RGB888 = 22, /**< \if English RGB888 format \else RGB888格式 \endif */ + OB_FORMAT_BGR = 23, /**< \if English BGR format (actual BRG888) \else BGR格式(实际BRG888) \endif */ + OB_FORMAT_Y14 = 24, /**< \if English Y14 format, single channel 14bit depth (SDK will unpack into Y16 by default) \else + Y14格式,单通道14bit深度(SDK默认会解包成Y16) \endif */ + OB_FORMAT_BGRA = 25, /**< BGRA */ + OB_FORMAT_UNKNOWN = 0xff, /**< \if English unknown format \else 未知格式 \endif */ } OBFormat, ob_format; @@ -246,7 +261,7 @@ typedef enum { ERR_IMAGE_SIZE = -5, /**< \if English Image file size error \else 镜像文件大小错误 \endif */ ERR_OTHER = -6, /**< \if English other errors \else 其他错误 \endif */ ERR_DDR = -7, /**< \if English DDR access error \else DDR访问错误 \endif */ - ERR_TIMEOUT = -8 /**< \if English timeout error \else 超时错误 \endif */ + ERR_TIMEOUT = -8 /**< \if English timeout error \else 超时错误 \endif */ } OBUpgradeState, ob_upgrade_state; /** @@ -269,7 +284,7 @@ typedef enum { } OBFileTranState, ob_file_tran_state; -/** +/** * \if English * @brief data transfer status * \else @@ -297,10 +312,10 @@ typedef enum { * \endif */ typedef struct { - void * data; ///< \if English current block data pointer \else 当前块数据指针 \endif - uint32_t size; ///< \if English Current block data length \else 当前块数据长度 \endif - uint32_t offset; ///< \if English The offset of the current data block relative to the complete data \else 当前数据块相对完整数据的偏移 \endif - uint32_t fullDataSize; ///< \if English full data size \else 完整数据大小 \endif + void *data; ///< \if English current block data pointer \else 当前块数据指针 \endif + uint32_t size; ///< \if English Current block data length \else 当前块数据长度 \endif + uint32_t offset; ///< \if English The offset of the current data block relative to the complete data \else 当前数据块相对完整数据的偏移 \endif + uint32_t fullDataSize; ///< \if English full data size \else 完整数据大小 \endif } OBDataChunk, ob_data_chunk; /** @@ -311,11 +326,11 @@ typedef struct { * \endif */ typedef struct { - int32_t cur; ///< \if English current value \else 当前值 \endif - int32_t max; ///< \if English maximum value \else 最大值 \endif - int32_t min; ///< \if English minimum value \else 最小值 \endif - int32_t step; ///< \if English step value \else 步进值 \endif - int32_t def; ///< \if English Default \else 默认值 \endif + int32_t cur; ///< \if English current value \else 当前值 \endif + int32_t max; ///< \if English maximum value \else 最大值 \endif + int32_t min; ///< \if English minimum value \else 最小值 \endif + int32_t step; ///< \if English step value \else 步进值 \endif + int32_t def; ///< \if English Default \else 默认值 \endif } OBIntPropertyRange, ob_int_property_range; /** @@ -326,11 +341,11 @@ typedef struct { * \endif */ typedef struct { - float cur; ///< \if English current value \else 当前值 \endif - float max; ///< \if English maximum value \else 最大值 \endif - float min; ///< \if English minimum value \else 最小值 \endif - float step; ///< \if English step value \else 步进值 \endif - float def; ///< \if English default \else 默认值 \endif + float cur; ///< \if English current value \else 当前值 \endif + float max; ///< \if English maximum value \else 最大值 \endif + float min; ///< \if English minimum value \else 最小值 \endif + float step; ///< \if English step value \else 步进值 \endif + float def; ///< \if English default \else 默认值 \endif } OBFloatPropertyRange, ob_float_property_range; /** @@ -342,10 +357,10 @@ typedef struct { */ typedef struct { bool cur; ///< \if English current value \else 当前值 \endif - bool max; ///< \if English maximum value \else 最大值 \endif - bool min; ///< \if English minimum value \else 最小值 \endif - bool step; ///< \if English step value \else 步进值 \endif - bool def; ///< \if English default \else 默认值 \endif + bool max; ///< \if English maximum value \else 最大值 \endif + bool min; ///< \if English minimum value \else 最小值 \endif + bool step; ///< \if English step value \else 步进值 \endif + bool def; ///< \if English default \else 默认值 \endif } OBBoolPropertyRange, ob_bool_property_range; /** @@ -356,12 +371,12 @@ typedef struct { * \endif */ typedef struct { - float fx; ///< \if English focal length in x direction \else x方向焦距 \endif - float fy; ///< \if English focal length in y direction \else y方向焦距 \endif - float cx; ///< \if English Optical center abscissa \else 光心横坐标 \endif - float cy; ///< \if English Optical center ordinate \else 光心纵坐标 \endif - int16_t width; ///< \if English image width \else 图像宽度 \endif - int16_t height; ///< \if English image height \else 图像高度 \endif + float fx; ///< \if English focal length in x direction \else x方向焦距 \endif + float fy; ///< \if English focal length in y direction \else y方向焦距 \endif + float cx; ///< \if English Optical center abscissa \else 光心横坐标 \endif + float cy; ///< \if English Optical center ordinate \else 光心纵坐标 \endif + int16_t width; ///< \if English image width \else 图像宽度 \endif + int16_t height; ///< \if English image height \else 图像高度 \endif } OBCameraIntrinsic, ob_camera_intrinsic; /** @@ -378,8 +393,8 @@ typedef struct { float k4; ///< \if English Radial distortion factor 4 \else 径向畸变系数4 \endif float k5; ///< \if English Radial distortion factor 5 \else 径向畸变系数5 \endif float k6; ///< \if English Radial distortion factor 6 \else 径向畸变系数6 \endif - float p1; ///< \if English Tangential distortion factor 1 \else 切向畸变系数1 \endif - float p2; ///< \if English Tangential distortion factor 2 \else 切向畸变系数2 \endif + float p1; ///< \if English Tangential distortion factor 1 \else 切向畸变系数1 \endif + float p2; ///< \if English Tangential distortion factor 2 \else 切向畸变系数2 \endif } OBCameraDistortion, ob_camera_distortion; /** @@ -390,8 +405,8 @@ typedef struct { * \endif */ typedef struct { - float rot[9]; ///< \if English Rotation matrix \else 旋转矩阵,行优先\endif - float trans[3]; ///< \if English transformation matrix \else 变化矩阵 \endif + float rot[9]; ///< \if English Rotation matrix \else 旋转矩阵,行优先\endif + float trans[3]; ///< \if English transformation matrix \else 变化矩阵 \endif } OBD2CTransform, ob_d2c_transform; /** @@ -402,12 +417,12 @@ typedef struct { * \endif */ typedef struct { - OBCameraIntrinsic depthIntrinsic; ///< \if English Depth camera internal parameters \else 深度相机内参 \endif - OBCameraIntrinsic rgbIntrinsic; ///< \if English Color camera internal parameters \else 彩色相机内参 \endif - OBCameraDistortion depthDistortion; ///< \if English Depth camera distortion parameters \else 深度相机畸变参数 \endif - OBCameraDistortion rgbDistortion; ///< \if English Color camera distortion parameters 1 \else 彩色相机畸变参数 \endif - OBD2CTransform transform; ///< \if English rotation/transformation matrix \else 旋转/变换矩阵 \endif - bool isMirrored; ///< \if English Whether the image frame corresponding to this group of parameters is mirrored \else 本组参数对应的图像帧是否被镜像 \endif + OBCameraIntrinsic depthIntrinsic; ///< \if English Depth camera internal parameters \else 深度相机内参 \endif + OBCameraIntrinsic rgbIntrinsic; ///< \if English Color camera internal parameters \else 彩色相机内参 \endif + OBCameraDistortion depthDistortion; ///< \if English Depth camera distortion parameters \else 深度相机畸变参数 \endif + OBCameraDistortion rgbDistortion; ///< \if English Color camera distortion parameters 1 \else 彩色相机畸变参数 \endif + OBD2CTransform transform; ///< \if English rotation/transformation matrix \else 旋转/变换矩阵 \endif + bool isMirrored; ///< \if English Whether the image frame corresponding to this group of parameters is mirrored \else 本组参数对应的图像帧是否被镜像 \endif } OBCameraParam, ob_camera_param; /** @@ -432,10 +447,10 @@ typedef enum { * \endif */ typedef struct { - uint32_t x; ///< \if English origin coordinate x \else 原点坐标x \endif - uint32_t y; ///< \if English origin coordinate y \else 原点坐标y \endif - uint32_t width; ///< \if English rectangle width \else 矩形宽度 \endif - uint32_t height; ///< \if English rectangle height \else 矩形高度 \endif + uint32_t x; ///< \if English origin coordinate x \else 原点坐标x \endif + uint32_t y; ///< \if English origin coordinate y \else 原点坐标y \endif + uint32_t width; ///< \if English rectangle width \else 矩形宽度 \endif + uint32_t height; ///< \if English rectangle height \else 矩形高度 \endif } OBRect, ob_rect; /** @@ -454,6 +469,9 @@ typedef enum { FORMAT_RGB888_TO_BGR, /**< \if English RGB888 to BGR \else RGB888转换为BGR \endif */ FORMAT_MJPEG_TO_NV21, /**< \if English MJPG to NV21 \else MJPG转换为NV21 \endif */ FORMAT_MJPEG_TO_RGB888, /**< \if English MJPG to RGB888 \else MJPG转换为RGB888 \endif */ + FORMAT_MJPEG_TO_BGR888, /**< \if English MJPG to BGR888 \else MJPG转换为BGR888 \endif */ + FORMAT_MJPEG_TO_BGRA, /**< \if English MJPG to BGRA \else MJPG转换为BGRA \endif */ + FORMAT_UYVY_TO_RGB888, /**< \if English UYVY to RGB888 \else MJPG转换为RGB888 \endif */ } OBConvertFormat, ob_convert_format; @@ -526,24 +544,15 @@ typedef enum { * \endif */ typedef struct { - float x; ///< \if English x-direction component \else x方向分量 \endif - float y; ///< \if English y-direction component \else y方向分量 \endif - float z; ///< \if English z-direction component \else z方向分量 \endif + float x; ///< \if English x-direction component \else x方向分量 \endif + float y; ///< \if English y-direction component \else y方向分量 \endif + float z; ///< \if English z-direction component \else z方向分量 \endif } OBAccelValue, OBGyroValue, ob_accel_value, ob_gyro_value; /** - * \if English - * @brief Device state enumeration - * \else - * @brief 设备状态枚举 - * \endif + * @brief 设备状态码 */ -typedef enum { - OB_DEVICE_STATE_NULL = 0x0000, /**< \if English No status or LOG information update \else 无状态或LOG信息更新 \endif */ - OPEN_STREAM_OPERATION_ERROR = 0x0001, /**< \if English Open current exception \else 开流异常 \endif */ - OB_DEVICE_STATE_INFO = 0x7fff /**< \if English LOG information update \else LOG信息更新 \endif */ -} OBDeviceState, - ob_device_state; +typedef uint64_t OBDeviceState, ob_device_state; /** * \if English @@ -553,13 +562,13 @@ typedef enum { * \endif */ typedef struct { - float cpuTemp; ///< \if English CPU temperature \else cpu温度 \endif - float irTemp; ///< \if English IR temperature \else IR温度 \endif - float ldmTemp; ///< \if English laser temperature \else 激光温度 \endif - float mainBoardTemp; ///< \if English motherboard temperature \else 主板温度 \endif - float tecTemp; ///< \if English TEC temperature \else TEC温度 \endif - float imuTemp; ///< \if English IMU temperature \else IMU温度 \endif - float rgbTemp; ///< \if English RGB temperature \else RGB温度 \endif + float cpuTemp; ///< \if English CPU temperature \else cpu温度 \endif + float irTemp; ///< \if English IR temperature \else IR温度 \endif + float ldmTemp; ///< \if English laser temperature \else 激光温度 \endif + float mainBoardTemp; ///< \if English motherboard temperature \else 主板温度 \endif + float tecTemp; ///< \if English TEC temperature \else TEC温度 \endif + float imuTemp; ///< \if English IMU temperature \else IMU温度 \endif + float rgbTemp; ///< \if English RGB temperature \else RGB温度 \endif } OBDeviceTemperature, ob_device_temperature, DEVICE_TEMPERATURE; /** @@ -598,17 +607,17 @@ typedef enum { * \endif */ typedef enum { - OB_MEDIA_COLOR_STREAM = 1, /**< \if English color stream \else 彩色流\endif */ + OB_MEDIA_COLOR_STREAM = 1, /**< \if English color stream \else 彩色流\endif */ OB_MEDIA_DEPTH_STREAM = 2, /**< \if English depth stream \else 深度流 \endif */ OB_MEDIA_IR_STREAM = 4, /**< \if English IR stream \else 红外流 \endif */ OB_MEDIA_GYRO_STREAM = 8, /**< \if English gyro stream \else 陀螺仪数据流 \endif */ - OB_MEDIA_ACCEL_STREAM = 16, /**< \if English accel stream \else 加速度计数据流 \endif */ - OB_MEDIA_CAMERA_PARAM = 32, /**< \if English camera parameter \else 相机参数 \endif */ + OB_MEDIA_ACCEL_STREAM = 16, /**< \if English accel stream \else 加速度计数据流 \endif */ + OB_MEDIA_CAMERA_PARAM = 32, /**< \if English camera parameter \else 相机参数 \endif */ OB_MEDIA_DEVICE_INFO = 64, /**< \if English device information \else 设备信息 \endif */ - OB_MEDIA_STREAM_INFO = 128, /**< \if English stream information \else 流信息 \endif */ + OB_MEDIA_STREAM_INFO = 128, /**< \if English stream information \else 流信息 \endif */ OB_MEDIA_ALL = OB_MEDIA_COLOR_STREAM | OB_MEDIA_DEPTH_STREAM | OB_MEDIA_IR_STREAM | OB_MEDIA_GYRO_STREAM | OB_MEDIA_ACCEL_STREAM | OB_MEDIA_CAMERA_PARAM - | OB_MEDIA_DEVICE_INFO | OB_MEDIA_STREAM_INFO, /**< \if English All media data types \else 所有媒体数据类型 \endif */ + | OB_MEDIA_DEVICE_INFO | OB_MEDIA_STREAM_INFO, /**< \if English All media data types \else 所有媒体数据类型 \endif */ } OBMediaType, ob_media_type, OB_MEDIA_TYPE; @@ -620,9 +629,9 @@ typedef enum { * \endif */ typedef enum { - OB_MEDIA_BEGIN = 0, /**< \if English begin \else 开始 \endif */ - OB_MEDIA_PAUSE, /**< \if English pause \else 暂停 \endif */ - OB_MEDIA_RESUME, /**< \if English resume \else 继续 \endif */ + OB_MEDIA_BEGIN = 0, /**< \if English begin \else 开始 \endif */ + OB_MEDIA_PAUSE, /**< \if English pause \else 暂停 \endif */ + OB_MEDIA_RESUME, /**< \if English resume \else 继续 \endif */ OB_MEDIA_END, /**< \if English end \else 终止 \endif */ } OBMediaState, ob_media_state, OB_MEDIA_STATE_EM; @@ -630,9 +639,8 @@ typedef enum { /** * \if English * @brief depth accuracy class - * @attention The depth accuracy level does not completely determine the depth unit and real accuracy, and the influence of the data packaging format needs to be considered. - * The specific unit can be obtained through getValueScale() of DepthFrame - * \else + * @attention The depth accuracy level does not completely determine the depth unit and real accuracy, and the influence of the data packaging format needs to + * be considered. The specific unit can be obtained through getValueScale() of DepthFrame \else * @brief 深度精度等级 * @attention 深度精度等级并不完全决定深度的单位和真实精度,需要考虑数据打包格式的影响, * 具体单位可通过DepthFrame的getValueScale()获取 @@ -655,7 +663,7 @@ typedef enum { * \endif */ typedef enum { - OB_TOF_FILTER_RANGE_CLOSE = 0, /**< \if English close range \else 近距离范围 \endif */ + OB_TOF_FILTER_RANGE_CLOSE = 0, /**< \if English close range \else 近距离范围 \endif */ OB_TOF_FILTER_RANGE_MIDDLE = 1, /**< \if English middle range \else 中距离范围 \endif */ OB_TOF_FILTER_RANGE_LONG = 2, /**< \if English long range \else 远距离范围 \endif */ OB_TOF_FILTER_RANGE_DEBUG = 100, /**< \if English debug range \else Debug模式 \endif */ @@ -670,9 +678,9 @@ typedef enum { * \endif */ typedef struct { - float x; ///< \if English x coordinate \else X坐标 \endif - float y; ///< \if English y coordinate \else Y坐标 \endif - float z; ///< \if English z coordinate \else Z坐标 \endif + float x; ///< \if English x coordinate \else X坐标 \endif + float y; ///< \if English y coordinate \else Y坐标 \endif + float z; ///< \if English z coordinate \else Z坐标 \endif } OBPoint, ob_point; /** @@ -683,12 +691,12 @@ typedef struct { * \endif */ typedef struct { - float x; ///< \if English x coordinate \else X坐标 \endif - float y; ///< \if English y coordinate \else Y坐标 \endif - float z; ///< \if English z coordinate \else Z坐标 \endif - float r; ///< \if English red channel component \else 红色通道分量 \endif - float g; ///< \if English green channel component \else 绿色通道分量 \endif - float b; ///< \if English blue channel component\else 蓝色通道分量 \endif + float x; ///< \if English x coordinate \else X坐标 \endif + float y; ///< \if English y coordinate \else Y坐标 \endif + float z; ///< \if English z coordinate \else Z坐标 \endif + float r; ///< \if English red channel component \else 红色通道分量 \endif + float g; ///< \if English green channel component \else 绿色通道分量 \endif + float b; ///< \if English blue channel component\else 蓝色通道分量 \endif } OBColorPoint, ob_color_point; /** @@ -699,11 +707,12 @@ typedef struct { * \endif */ typedef enum { - OB_SYNC_STOP = 0x00, /**< \if English turn off sync \else 关闭同步 \endif */ - OB_SYNC_SINGLE_MODE = 0x01, /**< \if English single device mode \else single device模式 \endif */ - OB_SYNC_ONLINE_HOST_MODE = 0x02, /**< \if English The single device mode is also the host mode, which is dominated by ir \else single device模式,也是host模式,是ir作主的 \endif */ + OB_SYNC_STOP = 0x00, /**< \if English turn off sync \else 关闭同步 \endif */ + OB_SYNC_SINGLE_MODE = 0x01, /**< \if English single device mode \else single device模式 \endif */ + OB_SYNC_ONLINE_HOST_MODE = 0x02, /**< \if English The single device mode is also the host mode, which is dominated by ir \else single + device模式,也是host模式,是ir作主的 \endif */ OB_SYNC_ONLINE_SLAVE_MODE = 0x03, /**< \if English slave mode (ext_in --> rgb、tof、ext_out) \else slave模式 (ext_in --> rgb、tof、ext_out) \endif */ - OB_SYNC_ONLY_MCU_MODE = 0x04, /**< \if English MCU as host mode \else mcu作host的模式 \endif */ + OB_SYNC_ONLY_MCU_MODE = 0x04, /**< \if English MCU as host mode \else mcu作host的模式 \endif */ OB_SYNC_ONLY_IR_MODE = 0x05, /**< \if English IR as host mode\else ir作host的模式 \endif */ } OBSyncMode, ob_sync_mode, OB_SYNC_MODE; @@ -728,15 +737,36 @@ typedef struct { * \endif */ typedef struct { - OBSyncMode syncMode; ///< \if English Sync mode \else 同步模式 \endif - uint16_t tofPhaseDelay; ///< \if English Tof trigger signal delay us. \else Tof触发信号延时 us \endif - uint16_t rgbPhaseDelay; ///< \if English rgb trigger signal delay us \else rgb触发信号延时 us \endif - uint16_t outPhaseDelay; ///< \if English Output signal delay us \else 输出信号延时 us \endif - uint16_t outOCPolarity; ///< \if English 0: Positive pulse, 1: Negative pulse \else 0:正向脉冲, 1: 负向脉冲 \endif - uint16_t mcuHostFps; ///< \if English Trigger frame rate in mcu master mode \else mcu主模式时的触发帧率 \endif - uint16_t curDevId; ///< \if English Current device number \else 当前设备编号 \endif + OBSyncMode syncMode; ///< \if English Sync mode \else 同步模式 \endif + uint16_t tofPhaseDelay; ///< \if English Tof trigger signal delay us. \else Tof触发信号延时 us \endif + uint16_t rgbPhaseDelay; ///< \if English rgb trigger signal delay us \else rgb触发信号延时 us \endif + uint16_t outPhaseDelay; ///< \if English Output signal delay us \else 输出信号延时 us \endif + uint16_t outOCPolarity; ///< \if English 0: Positive pulse, 1: Negative pulse \else 0:正向脉冲, 1: 负向脉冲 \endif + uint16_t mcuHostFps; ///< \if English Trigger frame rate in mcu master mode \else mcu主模式时的触发帧率 \endif + uint16_t curDevId; ///< \if English Current device number \else 当前设备编号 \endif } OBMultiDeviceSyncConfig, ob_multi_device_sync_config, OB_MULTI_DEVICE_SYNC_CONFIG; +/** + * @brief 网络设备的IP地址配置(ipv4) + * + */ +typedef struct { + uint16_t dhcp; ///< dhcp 动态ip配置开关; 0:关; 1: 开 + uint8_t address[4]; ///< ip地址(大端模式, 如192.168.1.1,则address[0]==192) + uint8_t mask[4]; ///< 子网掩码(大端模式) + uint8_t gateway[4]; ///< 网关(大端模式) +} OBDeviceIpAddrConfig, ob_device_ip_addr_config, DEVICE_IP_ADDR_CONFIG; + +/** + * @brief 设备通信模式 + * + */ +typedef enum { + OB_COMM_USB = 0x00, /**< USB */ + OB_COMM_NET = 0x01, /**< 网络 */ +} OBCommunicationType, + ob_communication_type, OB_COMMUNICATION_TYPE; + /** * \if English * @brief file transfer callback @@ -871,6 +901,16 @@ typedef void (*ob_frame_callback)(ob_frame *frame, void *user_data); */ typedef void (*ob_frameset_callback)(ob_frame *frameset, void *user_data); +/** + * @brief 自定义删除回调,当引用计数为0时主动调用 + * @param buffer 需要被删除的数据 + * @param context 用户传入的数据 + * + */ +typedef void(ob_frame_destroy_callback)(void *buffer, void *context); + #ifdef __cplusplus } #endif + +#pragma pack(pop) \ No newline at end of file diff --git a/orbbec_camera/SDK/include/libobsensor/h/Pipeline.h b/orbbec_camera/SDK/include/libobsensor/h/Pipeline.h index 97672b28..613be45f 100644 --- a/orbbec_camera/SDK/include/libobsensor/h/Pipeline.h +++ b/orbbec_camera/SDK/include/libobsensor/h/Pipeline.h @@ -1,9 +1,9 @@ /** * \if English * @file Pipeline.h - * @brief The SDK's advanced API can quickly implement functions such as switching streaming, frame synchronization, software filtering, etc., suitable for applications, and the algorithm focuses on rgbd data stream scenarios. - * If you are on real-time or need to handle synchronization separately, align the scene. Please use the interface of Device's Lower API. - * \else + * @brief The SDK's advanced API can quickly implement functions such as switching streaming, frame synchronization, software filtering, etc., suitable for + * applications, and the algorithm focuses on rgbd data stream scenarios. If you are on real-time or need to handle synchronization separately, align the scene. + * Please use the interface of Device's Lower API. \else * @file Pipeline.h * @brief SDK的高级API,可以快速实现开关流,帧同步,软件滤波等功能,适用于应用,算法重点关于rgbd数据流场景。如果对实时性或需要单独 * 处理的同步,对齐的场景。请使用Device的Lower API的接口。 @@ -168,13 +168,13 @@ ob_config *ob_pipeline_get_config(ob_pipeline *pipeline, ob_error **error); /** * \if English - * @brief Waiting for the return of a set of frames in the form of synchronous blocking + * @brief Waiting for the return of a set of frames in the form of synchronous blocking * * @param[in] pipeline pipeline object * @param[in] timeout_ms Waiting timeout (ms) * @param[out] error Log error messages - * @return ob_frame* returns the waiting frameset, frameset is a special frame, you can use the frameset related interface to obtain the independent frame in the set - * \else + * @return ob_frame* returns the waiting frameset, frameset is a special frame, you can use the frameset related interface to obtain the independent frame in + * the set \else * @brief 以同步阻塞的形式等待返回一组帧集合 * * @param[in] pipeline pipeline对象 @@ -204,7 +204,7 @@ ob_device *ob_pipeline_get_device(ob_pipeline *pipeline, ob_error **error); /** * \if English - * @brief Get playback object from pipeline + * @brief Get playback object from pipeline * * @param[in] pipeline pipeline objet * @param[out] error Log error messages @@ -221,7 +221,7 @@ ob_playback *ob_pipeline_get_playback(ob_pipeline *pipeline, ob_error **error); /** * \if English - * @brief Get stream profile from the pipeline + * @brief Get stream profile from the pipeline * * @param[in] pipeline pipeline object * @param[in] sensor_type sensor type, the sensor_type type supported by the camera can be obtained through the ob_device_get_sensor_list() interface @@ -308,7 +308,7 @@ ob_camera_param ob_pipeline_get_camera_param(ob_pipeline *pipeline, ob_error **e /** * \if English - * @brief Returns a list of D2C-enabled depth sensor resolutions corresponding to the input color sensor resolution + * @brief Returns a list of D2C-enabled depth sensor resolutions corresponding to the input color sensor resolution * * @param[in] pipeline pipeline object * @param[in] color_profile Input resolution of Color Sensor @@ -325,18 +325,18 @@ ob_camera_param ob_pipeline_get_camera_param(ob_pipeline *pipeline, ob_error **e * @return ob_stream_profile_list* * \endif */ -ob_stream_profile_list *ob_get_d2c_depth_profile_list(ob_pipeline *pipeline, ob_stream_profile *color_profile,ob_align_mode align_mode, ob_error **error); +ob_stream_profile_list *ob_get_d2c_depth_profile_list(ob_pipeline *pipeline, ob_stream_profile *color_profile, ob_align_mode align_mode, ob_error **error); /** * \if English - * @brief Get valid area after D2C + * @brief Get valid area after D2C (DEPRECATED) * * @param[in] pipeline pipeline object * @param[in] distance working distance * @param[out] error Log error messages * @return ob_rect returns the area information valid after D2C at working distance * \else - * @brief 获取D2C后有效的区域 + * @brief 获取D2C后有效的区域 (废弃接口) * * @param[in] pipeline pipeline对象 * @param[in] distance 工作距离 @@ -346,6 +346,28 @@ ob_stream_profile_list *ob_get_d2c_depth_profile_list(ob_pipeline *pipeline, ob_ */ ob_rect ob_get_d2c_valid_area(ob_pipeline *pipeline, uint32_t distance, ob_error **error); +/** + * \if English + * @brief Get valid area between minimum distance and maximum distance after D2C + * + * @param[in] pipeline pipeline object + * @param[in] minimum_distance minimum working distance + * @param[in] maximum_distance maximum working distance + * @param[out] error Log error messages + * @return ob_rect returns the area information valid after D2C at working distance + * \else + * @brief 获取D2C后有效的区域。 + * 如果需要获取指定距离D2C后的ROI区域,将minimum_distance与maximum_distance设置成一样或者将maximum_distance设置成0 + * + * @param[in] pipeline pipeline对象 + * @param[in] minimum_distance 最小工作距离 + * @param[in] maximum_distance 最大工作距离 + * @param[out] error 记录错误信息 + * @return ob_rect 返回在工作距离下D2C后有效的区域信息 + * \endif + */ +ob_rect ob_get_d2c_range_valid_area(ob_pipeline *pipeline, uint32_t minimum_distance,uint32_t maximum_distance, ob_error **error); + /** * \if English * @brief Start recording @@ -442,7 +464,7 @@ void ob_config_enable_all_stream(ob_config *config, ob_error **error); /** * \if English - * @brief Configure the stream to be disabled + * @brief Configure the stream to be disabled * * @param[in] config Configuration of pipeline * @param[in] profile The configuration of the stream to be closed @@ -459,7 +481,7 @@ void ob_config_disable_stream(ob_config *config, ob_stream_type type, ob_error * /** * \if English - * @brief Configure all streams to be disabled + * @brief Configure all streams to be disabled * * @param[in] config Configuration of pipeline * @param[out] error Log error messages @@ -489,6 +511,44 @@ void ob_config_disable_all_stream(ob_config *config, ob_error **error); */ void ob_config_set_align_mode(ob_config *config, ob_align_mode mode, ob_error **error); + +/** + * \if English + * @brief Whether scale depth frame after D2C + * + * @param[in] config config object + * @param[in] enable Scale or not + * @param[out] error Log error messages + * \else + * @brief 设置D2C后是否需要缩放深度 + * + * @param[in] config config对象 + * @param[in] enable 是否需要缩放 + * @param[out] error 记录错误信息 + * \endif + */ +void ob_config_set_depth_scale_require(ob_config *config,bool enable,ob_error **error); + +/** + * \if English + * @brief + * + * @param[in] config config object + * @param[in] d2c_target_width D2C target width + * @param[in] d2c_target_height D2C target height + * @param[out] error Log error messages + * \else + * @brief 设置D2C目标分辨率,适用于未使用OrbbecSDK开启Color流,且需要对深度进行D2C的情况 + * 注意:当使用OrbbecSDK开启Color流时,同时使用了此接口设置了D2C目标分辨率时。优先使用开启的Color流的配置进行D2C。 + * + * @param[in] config config对象 + * @param[in] d2c_target_width D2C目标分辨率宽 + * @param[in] d2c_target_height D2C目标分辨率高 + * @param[out] error 记录错误信息 + * \endif + */ +void ob_config_set_d2c_target_resolution(ob_config *config,uint32_t d2c_target_width,uint32_t d2c_target_height,ob_error **error); + #ifdef __cplusplus } #endif \ No newline at end of file diff --git a/orbbec_camera/SDK/include/libobsensor/h/Property.h b/orbbec_camera/SDK/include/libobsensor/h/Property.h index f4f11554..1dbdc7a4 100644 --- a/orbbec_camera/SDK/include/libobsensor/h/Property.h +++ b/orbbec_camera/SDK/include/libobsensor/h/Property.h @@ -28,54 +28,69 @@ extern "C" { * \endif */ typedef enum { - OB_PROP_LDP_BOOL = 2, /**< \if English LDP switch \else LDP开关 \endif */ - OB_PROP_LASER_BOOL = 3, /**< \if English Laser switch \else 激光开关 \endif */ - OB_PROP_LASER_PULSE_WIDTH_INT = 4, /**< \if English Read and write laser Time value (pulse width) \else 读写激光Time值(脉宽) \endif */ - OB_PROP_LASER_CURRENT_FLOAT = 5, /**< \if English Laser current \else 激光电流 \endif */ - OB_PROP_FLOOD_BOOL = 6, /**< \if English IR flood switch \else 泛光灯开关 \endif */ - OB_PROP_FLOOD_LEVEL_INT = 7, /**< \if English IR flood level \else 泛光灯等级 \endif */ - OB_PROP_DEPTH_MIRROR_BOOL = 14, /**< \if English Depth mirror \else 深度镜像 \endif */ - OB_PROP_DEPTH_FLIP_BOOL = 15, /**< \if English Depth flip \else 深度翻转 \endif */ - OB_PROP_DEPTH_POSTFILTER_BOOL = 16, /**< \if English Depth Postfilter \else 深度Postfilter \endif */ - OB_PROP_DEPTH_HOLEFILTER_BOOL = 17, /**< \if English Depth Holefilter \else 深度Holefilter \endif */ - OB_PROP_IR_MIRROR_BOOL = 18, /**< \if English IR mirror \else IR 镜像 \endif */ - OB_PROP_IR_FLIP_BOOL = 19, /**< \if English IR flip \else IR 翻转 \endif */ - OB_PROP_MIN_DEPTH_INT = 22, /**< \if English Minimum depth threshold \else 最小深度阈值 \endif */ - OB_PROP_MAX_DEPTH_INT = 23, /**< \if English Maximum depth threshold \else 最大深度阈值 \endif */ - OB_PROP_DEPTH_SOFT_FILTER_BOOL = 24, /**< \if English Software filter switch \else 软件滤波开关 \endif */ - OB_PROP_LDP_STATUS_BOOL = 32, /**< \if English LDP status \else LDP状态 \endif */ - OB_PROP_DEPTH_MAX_DIFF_INT = 40, /**< soft filter maxdiff param */ - OB_PROP_DEPTH_MAX_SPECKLE_SIZE_INT = 41, /**< soft filter maxSpeckleSize */ - OB_PROP_DEPTH_ALIGN_HARDWARE_BOOL = 42, /**< \if English Hardware d2c is on \else 硬件d2c开 \endif */ - OB_PROP_TIMESTAMP_OFFSET_INT = 43, /**< \if English Timestamp adjustment \else 时间戳调校 \endif */ - OB_PROP_HARDWARE_DISTORTION_SWITCH_BOOL = 61, /**< \if English Hardware distortion switch Rectify \else 硬件去畸变开关 Rectify \endif */ - OB_PROP_FAN_WORK_MODE_INT = 62, /**< \if English Fan mode switch \else 风扇开关模式 \endif */ - OB_PROP_DEPTH_ALIGN_HARDWARE_MODE_INT = 63, /**< \if English Multi-resolution D2C mode \else 多分辨率D2C模式 \endif */ + OB_PROP_LDP_BOOL = 2, /**< \if English LDP switch \else LDP开关 \endif */ + OB_PROP_LASER_BOOL = 3, /**< \if English Laser switch \else 激光开关 \endif */ + OB_PROP_LASER_PULSE_WIDTH_INT = 4, /**< \if English Read and write laser Time value (pulse width) \else 读写激光Time值(脉宽) \endif */ + OB_PROP_LASER_CURRENT_FLOAT = 5, /**< \if English Laser current \else 激光电流 \endif */ + OB_PROP_FLOOD_BOOL = 6, /**< \if English IR flood switch \else 泛光灯开关 \endif */ + OB_PROP_FLOOD_LEVEL_INT = 7, /**< \if English IR flood level \else 泛光灯等级 \endif */ + OB_PROP_DEPTH_MIRROR_BOOL = 14, /**< \if English Depth mirror \else 深度镜像 \endif */ + OB_PROP_DEPTH_FLIP_BOOL = 15, /**< \if English Depth flip \else 深度翻转 \endif */ + OB_PROP_DEPTH_POSTFILTER_BOOL = 16, /**< \if English Depth Postfilter \else 深度Postfilter \endif */ + OB_PROP_DEPTH_HOLEFILTER_BOOL = 17, /**< \if English Depth Holefilter \else 深度Holefilter \endif */ + OB_PROP_IR_MIRROR_BOOL = 18, /**< \if English IR mirror \else IR 镜像 \endif */ + OB_PROP_IR_FLIP_BOOL = 19, /**< \if English IR flip \else IR 翻转 \endif */ + OB_PROP_MIN_DEPTH_INT = 22, /**< \if English Minimum depth threshold \else 最小深度阈值 \endif */ + OB_PROP_MAX_DEPTH_INT = 23, /**< \if English Maximum depth threshold \else 最大深度阈值 \endif */ + OB_PROP_DEPTH_SOFT_FILTER_BOOL = 24, /**< \if English Software filter switch \else 软件滤波开关 \endif */ + OB_PROP_LDP_STATUS_BOOL = 32, /**< \if English LDP status \else LDP状态 \endif */ + OB_PROP_DEPTH_MAX_DIFF_INT = 40, /**< soft filter maxdiff param */ + OB_PROP_DEPTH_MAX_SPECKLE_SIZE_INT = 41, /**< soft filter maxSpeckleSize */ + OB_PROP_DEPTH_ALIGN_HARDWARE_BOOL = 42, /**< \if English Hardware d2c is on \else 硬件d2c开 \endif */ + OB_PROP_TIMESTAMP_OFFSET_INT = 43, /**< \if English Timestamp adjustment \else 时间戳调校 \endif */ + OB_PROP_HARDWARE_DISTORTION_SWITCH_BOOL = 61, /**< \if English Hardware distortion switch Rectify \else 硬件去畸变开关 Rectify \endif */ + OB_PROP_FAN_WORK_MODE_INT = 62, /**< \if English Fan mode switch \else 风扇开关模式 \endif */ + OB_PROP_DEPTH_ALIGN_HARDWARE_MODE_INT = 63, /**< \if English Multi-resolution D2C mode \else 多分辨率D2C模式 \endif */ OB_PROP_ANTI_COLLUSION_ACTIVATION_STATUS_BOOL = 64, /**< \if English Anti_collusion activation status \else 防串货状态 \endif */ - OB_PROP_DEPTH_PRECISION_LEVEL_INT = 75, /**< \if English The depth precision level, which may change the depth frame data unit, needs to be confirmed through the ValueScale interface of DepthFrame \else 深度精度等级,可能会改变深度帧数据单位,需要通过DepthFrame的ValueScale接口确认 \endif */ - OB_PROP_TOF_FILTER_RANGE_INT = 76, /**< \if English tof filter range configuration \else tof滤波场景范围配置 \endif */ - OB_PROP_LASER_MODE_INT = 79, /**< \if English laser mode, the firmware terminal currently only returns 1: IR Drive, 2: Torch \else 激光点亮模式,固件端目前只返回 1: IR Drive, 2: Torch \endif */ - OB_PROP_RECTIFY2_BOOL = 80, /**< \if English brt2r-rectify function switch (brt2r is a special module on mx6600), 0: Disable, 1: Rectify Enable \else brt2r-rectify功能开关(brt2r是mx6600上的一个特殊模块),0:关闭, 1:打开 \endif */ - OB_PROP_COLOR_MIRROR_BOOL = 81, /**< \if English Color mirror \else 彩色镜像 \endif */ - OB_PROP_COLOR_FLIP_BOOL = 82, /**< \if English Color flip \else 彩色翻转 \endif */ - OB_PROP_INDICATOR_LIGHT_BOOL = 83, /**< \if English Indicator switch, 0: Disable, 1: Enable \else 指示灯开关,0:关闭, 1:打开 \endif */ - OB_PROP_DISPARITY_TO_DEPTH_BOOL = 85, /**< \if English Disparity to depth switch, 0: off, the depth stream outputs the disparity map; 1. On, the depth stream outputs the depth map. \else 视差转深度开关, 0:关闭,深度流输出视差图; 1. 打开,深度流输出深度图 \endif */ - OB_PROP_BRT_BOOL = 86, /**< \if English BRT function switch (anti-background interference), 0: Disable, 1: Enable \else BRT功能开关(抗背景干扰),0:关闭, 1:打开 \endif */ - OB_PROP_WATCHDOG_BOOL = 87, /**< \if English Watchdog function switch, 0: Disable, 1: Enable \else 看门狗功能开关,0:关闭, 1:打开 \endif */ - OB_PROP_EXTERNAL_SIGNAL_RESET_BOOL = 88, /**< \if English External signal trigger restart function switch, 0: Disable, 1: Enable \else 外部信号触发重启功能开关,0:关闭, 1:打开 \endif */ - OB_PROP_HEARTBEAT_BOOL = 89, /**< \if English Heartbeat monitoring function switch, 0: Disable, 1: Enable \else 心跳监测功能开关,0:关闭, 1:打开 \endif */ - OB_PROP_DEPTH_CROPPING_MODE_INT = 90, /**< \if English Depth cropping mode device: OB_DEPTH_CROPPING_MODE \else 深度裁剪模式设备: OB_DEPTH_CROPPING_MODE \endif */ - OB_PROP_D2C_PREPROCESS_BOOL = 91, /**< \if English D2C preprocessing switch (such as RGB cropping), 0: off, 1: on \else D2C前处理开关(如RGB裁剪),0:关闭,1:打开 \endif */ - OB_PROP_RGB_CUSTOM_CROP_BOOL = 94, /**< \if English Custom RGB cropping switch, 0 is off, 1 is on custom cropping, and the ROI cropping area is issued \else 自定义RGB裁剪开关,0为关闭,1为开启自定义裁剪,下发ROI裁剪区域\endif */ - OB_PROP_DEVICE_WORK_MODE_INT = 95, /**< \if English Device operating mode (power consumption) \else 设备工作模式(功耗) \endif */ + OB_PROP_DEPTH_PRECISION_LEVEL_INT = + 75, /**< \if English The depth precision level, which may change the depth frame data unit, needs to be confirmed through the ValueScale interface of + DepthFrame \else 深度精度等级,可能会改变深度帧数据单位,需要通过DepthFrame的ValueScale接口确认 \endif */ + OB_PROP_TOF_FILTER_RANGE_INT = 76, /**< \if English tof filter range configuration \else tof滤波场景范围配置 \endif */ + OB_PROP_LASER_MODE_INT = 79, /**< \if English laser mode, the firmware terminal currently only returns 1: IR Drive, 2: Torch \else + 激光点亮模式,固件端目前只返回 1: IR Drive, 2: Torch \endif */ + OB_PROP_RECTIFY2_BOOL = 80, /**< \if English brt2r-rectify function switch (brt2r is a special module on mx6600), 0: Disable, 1: Rectify Enable \else + brt2r-rectify功能开关(brt2r是mx6600上的一个特殊模块),0:关闭, 1:打开 \endif */ + OB_PROP_COLOR_MIRROR_BOOL = 81, /**< \if English Color mirror \else 彩色镜像 \endif */ + OB_PROP_COLOR_FLIP_BOOL = 82, /**< \if English Color flip \else 彩色翻转 \endif */ + OB_PROP_INDICATOR_LIGHT_BOOL = 83, /**< \if English Indicator switch, 0: Disable, 1: Enable \else 指示灯开关,0:关闭, 1:打开 \endif */ + OB_PROP_DISPARITY_TO_DEPTH_BOOL = + 85, /**< \if English Disparity to depth switch, 0: off, the depth stream outputs the disparity map; 1. On, the depth stream outputs the depth map. \else + 视差转深度开关, 0:关闭,深度流输出视差图; 1. 打开,深度流输出深度图 \endif */ + OB_PROP_BRT_BOOL = + 86, /**< \if English BRT function switch (anti-background interference), 0: Disable, 1: Enable \else BRT功能开关(抗背景干扰),0:关闭, 1:打开 \endif */ + OB_PROP_WATCHDOG_BOOL = 87, /**< \if English Watchdog function switch, 0: Disable, 1: Enable \else 看门狗功能开关,0:关闭, 1:打开 \endif */ + OB_PROP_EXTERNAL_SIGNAL_RESET_BOOL = + 88, /**< \if English External signal trigger restart function switch, 0: Disable, 1: Enable \else 外部信号触发重启功能开关,0:关闭, 1:打开 \endif */ + OB_PROP_HEARTBEAT_BOOL = 89, /**< \if English Heartbeat monitoring function switch, 0: Disable, 1: Enable \else 心跳监测功能开关,0:关闭, 1:打开 \endif */ + OB_PROP_DEPTH_CROPPING_MODE_INT = + 90, /**< \if English Depth cropping mode device: OB_DEPTH_CROPPING_MODE \else 深度裁剪模式设备: OB_DEPTH_CROPPING_MODE \endif */ + OB_PROP_D2C_PREPROCESS_BOOL = + 91, /**< \if English D2C preprocessing switch (such as RGB cropping), 0: off, 1: on \else D2C前处理开关(如RGB裁剪),0:关闭,1:打开 \endif */ + OB_PROP_RGB_CUSTOM_CROP_BOOL = 94, /**< \if English Custom RGB cropping switch, 0 is off, 1 is on custom cropping, and the ROI cropping area is issued \else + 自定义RGB裁剪开关,0为关闭,1为开启自定义裁剪,下发ROI裁剪区域\endif */ + OB_PROP_DEVICE_WORK_MODE_INT = 95, /**< \if English Device operating mode (power consumption) \else 设备工作模式(功耗) \endif */ + OB_PROP_DEVICE_COMMUNICATION_TYPE_INT = 97, /**< 设备通信方式 0: USB; 1: Ethernet(RTSP)*/ + OB_PROP_SWITCH_IR_MODE_INT = 98, /**< 切换IR模式,0为主动IR模式,1为被动IR模式*/ OB_STRUCT_BASELINE_CALIBRATION_PARAM = 1002, /**< \if English Baseline calibration parameters \else 基线标定参数 \endif */ OB_STRUCT_DEVICE_TEMPERATURE = 1003, /**< \if English Device temperature information \else 设备温度信息 \endif */ OB_STRUCT_TOF_EXPOSURE_THRESHOLD_CONTROL = 1024, /**< \if English TOF exposure threshold range \else TOF曝光阈值范围 \endif */ OB_STRUCT_DEVICE_SERIAL_NUMBER = 1035, /**< \if English get/set serial number \else 获取/设置序列号 \endif */ - OB_STRUCT_DEVICE_TIME = 1037, /**< \if English get/set device time \else 获取/设置设备时间 \endif */ - OB_STRUCT_MULTI_DEVICE_SYNC_CONFIG = 1038, /**< \if English Multi-device synchronization mode and parameter configuration \else 多设备同步模式和参数配置 \endif */ - OB_STRUCT_RGB_CROP_ROI = 1040, /**< \if English RGB cropping ROI \else RGB裁剪ROI \endif */ + OB_STRUCT_DEVICE_TIME = 1037, /**< \if English get/set device time \else 获取/设置设备时间 \endif */ + OB_STRUCT_MULTI_DEVICE_SYNC_CONFIG = + 1038, /**< \if English Multi-device synchronization mode and parameter configuration \else 多设备同步模式和参数配置 \endif */ + OB_STRUCT_RGB_CROP_ROI = 1040, /**< \if English RGB cropping ROI \else RGB裁剪ROI \endif */ + OB_STRUCT_DEVICE_IP_ADDR_CONFIG = 1041, /**< 设备ip地址配置 */ OB_PROP_COLOR_AUTO_EXPOSURE_BOOL = 2000, /**< \if English Color camera auto exposure \else 彩色相机自动曝光 \endif */ OB_PROP_COLOR_EXPOSURE_INT = 2001, /**< \if English Color camera exposure adjustment \else 彩色相机曝光调节 \endif */ @@ -92,17 +107,27 @@ typedef enum { OB_PROP_COLOR_BACKLIGHT_COMPENSATION_INT = 2013, /**< \if English Color camera brightness compensation \else 彩色相机亮度补偿 \endif */ OB_PROP_COLOR_HUE_INT = 2014, /**< \if English color camera color tint \else 彩色相机彩色色调 \endif */ OB_PROP_COLOR_POWER_LINE_FREQUENCY_INT = 2015, /**< \if English Color Camera Power Line Frequency \else 彩色相机电力线路频率 \endif */ - OB_PROP_DEPTH_AUTO_EXPOSURE_BOOL = 2016, /**< \if English Automatic exposure of depth camera (infrared camera will be set synchronously under some models of devices) \else 深度相机自动曝光(某些型号设备下会同步设置红外相机) \endif */ - OB_PROP_DEPTH_EXPOSURE_INT = 2017, /**< \if English Depth camera exposure adjustment (infrared cameras will be set synchronously under some models of devices) \else 深度相机曝光调节(某些型号设备下会同步设置红外相机) \endif */ - OB_PROP_DEPTH_GAIN_INT = 2018, /**< \if English Depth camera gain adjustment (infrared cameras will be set synchronously under some models of devices) \else 深度相机增益调节(某些型号设备下会同步设置红外相机) \endif */ - OB_PROP_IR_AUTO_EXPOSURE_BOOL = 2025, /**< \if English Infrared camera auto exposure (depth camera will be set synchronously under some models of devices) \else 红外相机自动曝光(某些型号设备下会同步设置深度相机) \endif */ - OB_PROP_IR_EXPOSURE_INT = 2026, /**< \if English Infrared camera exposure adjustment (some models of devices will set the depth camera synchronously) \else 红外相机曝光调节(某些型号设备下会同步设置深度相机) \endif */ - OB_PROP_IR_GAIN_INT = 2027, /**< \if English Infrared camera gain adjustment (the depth camera will be set synchronously under some models of devices) \else 红外相机增益调节(某些型号设备下会同步设置深度相机) \endif */ + OB_PROP_DEPTH_AUTO_EXPOSURE_BOOL = 2016, /**< \if English Automatic exposure of depth camera (infrared camera will be set synchronously under some models of + devices) \else 深度相机自动曝光(某些型号设备下会同步设置红外相机) \endif */ + OB_PROP_DEPTH_EXPOSURE_INT = 2017, /**< \if English Depth camera exposure adjustment (infrared cameras will be set synchronously under some models of + devices) \else 深度相机曝光调节(某些型号设备下会同步设置红外相机) \endif */ + OB_PROP_DEPTH_GAIN_INT = 2018, /**< \if English Depth camera gain adjustment (infrared cameras will be set synchronously under some models of devices) \else + 深度相机增益调节(某些型号设备下会同步设置红外相机) \endif */ + OB_PROP_IR_AUTO_EXPOSURE_BOOL = 2025, /**< \if English Infrared camera auto exposure (depth camera will be set synchronously under some models of devices) + \else 红外相机自动曝光(某些型号设备下会同步设置深度相机) \endif */ + OB_PROP_IR_EXPOSURE_INT = 2026, /**< \if English Infrared camera exposure adjustment (some models of devices will set the depth camera synchronously) \else + 红外相机曝光调节(某些型号设备下会同步设置深度相机) \endif */ + OB_PROP_IR_GAIN_INT = 2027, /**< \if English Infrared camera gain adjustment (the depth camera will be set synchronously under some models of devices) \else + 红外相机增益调节(某些型号设备下会同步设置深度相机) \endif */ + OB_PROP_IR_SWITCH_INT = 2028, + /**< 双目红外相机左右IR切换 */ // todo: id有冲突@千手修罗 OB_PROP_SDK_DISPARITY_TO_DEPTH_BOOL = 3004, /**< 视差转深度 */ OB_PROP_SDK_DEPTH_FRAME_UNPACK_BOOL = 3007, /**< Depth数据解包功能开关(每次开流都会默认打开,支持RLE/Y10/Y11/Y12/Y14格式) */ OB_PROP_SDK_IR_FRAME_UNPACK_BOOL = 3008, /**< Ir数据解包功能开关(每次开流都会默认打开,支持RLE/Y10/Y11/Y12/Y14格式) */ + OB_RAW_DATA_CAMERA_CALIB_JSON_FILE = 4029, /**< 从设备端读取的标定Json文件(Femto Mega, read only)*/ + OB_RAW_DATA_D2C_ROT_LUT_FILE = 4030, /**< D2C初始化表文件(Femto Mega)*/ OB_STRUCT_DEBUG_SENSOR_EXPOSURE_TIME = 5504, /**< \if English LDP status \else 曝光时间读写 \endif */ } OBPropertyID, @@ -132,7 +157,7 @@ typedef enum OBPropertyType { */ typedef struct OBPropertyItem { OBPropertyID id; ///< \if English Property id \else 属性id \endif - const char *name; ///< \if English Property name \else 属性名字 \endif + const char * name; ///< \if English Property name \else 属性名字 \endif OBPropertyType type; ///< \if English Property type \else 属性类型 \endif OBPermissionType permission; ///< \if English Property read and write permission \else 属性读写权限 \endif } OBPropertyItem, ob_property_item; diff --git a/orbbec_camera/SDK/include/libobsensor/h/Sensor.h b/orbbec_camera/SDK/include/libobsensor/h/Sensor.h index 138127b6..1b0da737 100644 --- a/orbbec_camera/SDK/include/libobsensor/h/Sensor.h +++ b/orbbec_camera/SDK/include/libobsensor/h/Sensor.h @@ -38,9 +38,9 @@ ob_sensor_type ob_sensor_get_type(ob_sensor *sensor, ob_error **error); * * @param[in] sensor Sensor object * @param[out] error Log error messages - * @return ob_stream_profile** returns a list of stream profiles + * @return ob_stream_profile_list* returns a list of stream profiles * \else - * @brief 获取传感器支持的所有流的配置 + * @brief 获取传感器支持的所有流的配置列表 * * @param[in] sensor 传感器对象 * @param[out] error 记录错误信息 @@ -119,7 +119,7 @@ void ob_delete_sensor_list(ob_sensor_list *sensor_list, ob_error **error); /** * \if English - * @brief Get the number of sensors in the sensor list + * @brief Get the number of sensors in the sensor list * * @param[in] sensor_list List of sensor objects to delete * @param[in] count Number of sensors diff --git a/orbbec_camera/SDK/include/libobsensor/h/StreamProfile.h b/orbbec_camera/SDK/include/libobsensor/h/StreamProfile.h index b9a4329e..2f619050 100644 --- a/orbbec_camera/SDK/include/libobsensor/h/StreamProfile.h +++ b/orbbec_camera/SDK/include/libobsensor/h/StreamProfile.h @@ -91,7 +91,7 @@ uint32_t ob_video_stream_profile_width(ob_stream_profile *profile, ob_error **er * @param[in] profile Stream configuration object, if the configuration is not a video stream configuration, an error will be returned * @param[out] error Log error messages * @return uint32_t returns the height of the stream - * \else + * \else * @brief 获取视频流配置的高 * * @param[in] profile 流配置对象, 如果该配置不是视频流配置,将会返错误 @@ -120,7 +120,7 @@ ob_accel_full_scale_range ob_accel_stream_profile_full_scale_range(ob_stream_pro /** * \if English - * @brief Get sampling frequency of the accelerometer frame + * @brief Get sampling frequency of the accelerometer frame * * @param[in] profile Stream configuration object, if the configuration is not the accelerometer stream configuration, an error will be returned * @param[out] error Log error messages @@ -154,7 +154,7 @@ ob_gyro_full_scale_range ob_gyro_stream_profile_full_scale_range(ob_stream_profi /** * \if English - * @brief Get the sampling frequency of the gyro flow configuration + * @brief Get the sampling frequency of the gyro flow configuration * * @param[in] profile Stream configuration object, if the configuration is not a gyroscope stream configuration, an error will be returned * @param[out] error Log error messages @@ -171,7 +171,8 @@ ob_gyro_sample_rate ob_gyro_stream_profile_sample_rate(ob_stream_profile *profil /** * \if English - * @brief Match the corresponding ob_stream_profile through the passed parameters. If there are multiple matches, the first one in the list will be returned by default. + * @brief Match the corresponding ob_stream_profile through the passed parameters. If there are multiple matches, the first one in the list will be returned by + * default. * * @param profile_list Resolution list * @param width Width, if you don't need to add matching conditions, you can pass 0 @@ -200,7 +201,7 @@ ob_stream_profile *ob_stream_profile_list_get_video_stream_profile(ob_stream_pro * @brief Get the corresponding StreamProfile by subscripting * * @param[in] profile_list StreamProfile lists - * @param[in] index + * @param[in] index * @param[out] error Log error messages * @return ob_stream_profile* returns the matching profile * \else @@ -248,7 +249,7 @@ void ob_delete_stream_profile_list(ob_stream_profile_list *profile_list, ob_erro /** *\if English - * @brief Delete stream configuration + * @brief Delete stream configuration * * @param[in] profile Stream configuration object * @param[out] error Log error messages diff --git a/orbbec_camera/SDK/include/libobsensor/hpp/Context.hpp b/orbbec_camera/SDK/include/libobsensor/hpp/Context.hpp index d346f2e7..b6a2d75a 100644 --- a/orbbec_camera/SDK/include/libobsensor/hpp/Context.hpp +++ b/orbbec_camera/SDK/include/libobsensor/hpp/Context.hpp @@ -30,8 +30,8 @@ public: /** * \if English * @brief Context is a management class that describes the runtime of the SDK. It is responsible for the applying and releasing of resources for the SDK. - * The context has the ability to manage multiple devices, is responsible for enumerating devices, monitoring device callbacks, and enabling functions such as multi-device synchronization. - * \else + * The context has the ability to manage multiple devices, is responsible for enumerating devices, monitoring device callbacks, and enabling functions such + * as multi-device synchronization. \else * @brief context是描述SDK的runtime一个管理类,负责SDK的资源申请与释放 * context具备多设备的管理能力,负责枚举设备,监听设备回调,启用多设备同步等功能 * \endif @@ -53,8 +53,16 @@ public: */ std::shared_ptr queryDeviceList(); - using DeviceChangedCallback = std::function removedList, std::shared_ptr addedList)>; + /** + * @brief 创建网络设备对象 + * + * @param address ip 地址 + * @param port 端口号 + * @return std::shared_ptr 返回创建好的设备对象 + */ + std::shared_ptr createNetDevice(const char *address, uint16_t port); + using DeviceChangedCallback = std::function removedList, std::shared_ptr addedList)>; /** * \if English * @brief Set device plug-in callback function @@ -72,8 +80,8 @@ public: * \if English * @brief Activate the multi-device synchronization function to synchronize the clock of the created device(the device needs support this function) * - * @param repeatInterval synchronization time interval (unit: ms; if repeatInterval=0, it means that it will only be synchronized once and will not be executed regularly) - * \else + * @param repeatInterval synchronization time interval (unit: ms; if repeatInterval=0, it means that it will only be synchronized once and will not be + * executed regularly) \else * @brief 启动多设备同步功能,同步已创建设备的时钟(需要使用的设备支持该功能) * * @param repeatInterval 定时同步时间间隔(单位ms;如果repeatInterval=0,表示只同步一次,不再定时执行) @@ -82,43 +90,43 @@ public: void enableMultiDeviceSync(uint64_t repeatInterval); /** - * \if English - * @brief Set the level of the global log will affect both the log level output to the terminal and output to the file + * \if English + * @brief Set the level of the global log will affect both the log level output to the terminal and output to the file * * @param severity log output level - * \else + * \else * @brief 设置全局日志的等级,会同时作用于输出到终端和输出到文件的日志等级 * * @param severity 日志输出等级 - * \endif + * \endif */ static void setLoggerSeverity(OBLogSeverity severity); /** - * \if English + * \if English * @brief Set log output to file * * @param severity log level output to file - * @param directory The log file output path. If the path is empty, the existing settings will continue to be used (if the existing configuration is also empty, the log will not be output to the file) - * \else + * @param directory The log file output path. If the path is empty, the existing settings will continue to be used (if the existing configuration is also + * empty, the log will not be output to the file) \else * @brief 设置日志输出到文件 * * @param severity 输出到文件的日志等级 * @param directory 日志文件输出路径,如果路径为空,则继续使用已有设置(已有配置也为空则不输出日志到文件) - * \endif + * \endif */ static void setLoggerToFile(OBLogSeverity severity, const char *directory); /** - * \if English + * \if English * @brief Set log output to terminal * * @param severity log level output to the terminal - * \else + * \else * @brief 设置日志输出到终端 * * @param severity 输出到终端的日志等级 - * \endif + * \endif */ static void setLoggerToConsole(OBLogSeverity severity); }; diff --git a/orbbec_camera/SDK/include/libobsensor/hpp/Device.hpp b/orbbec_camera/SDK/include/libobsensor/hpp/Device.hpp index b3e5f45c..f57e5356 100644 --- a/orbbec_camera/SDK/include/libobsensor/hpp/Device.hpp +++ b/orbbec_camera/SDK/include/libobsensor/hpp/Device.hpp @@ -221,7 +221,7 @@ public: * \if English * @brief AHB register write * - * @param reg Register to be written + * @param reg Register to be written * @param mask The mask to be writen * @param value The value to be written * \else @@ -374,7 +374,7 @@ public: void getRawData(OBPropertyID propertyId, GetDataCallback callback, bool async = false); /** - * \if English + * \if English * @brief Set structured data type of device property * * @param propertyId Property id @@ -404,7 +404,7 @@ public: * @param data 获取的属性数据 * @param dataSize 获取的属性大小 * \endif - */ + */ void getStructuredData(OBPropertyID propertyId, void *data, uint32_t *dataSize); /** @@ -436,19 +436,19 @@ public: OBPropertyItem getSupportedProperty(uint32_t index); /** - * \if English - * @brief Judge property permission support + * \if English + * @brief Judge property permission support * * @param propertyId Property id * @param permission Types of read and write permissions that need to be interpreted * @return bool returns whether it is supported - * \else + * \else * @brief 判断属性权限支持情况 * * @param propertyId 属性id * @param permission 需要判读的读写权限类型 * @return bool 返回是否支持 - * \endif + * \endif */ bool isPropertySupported(OBPropertyID propertyId, OBPermissionType permission); @@ -514,8 +514,8 @@ public: * \if English * @brief Set the device state changed callbacks * - * @param callback The callback function that is triggered when the device status changes (for example, the frame rate is automatically reduced or the stream is closed due to high temperature, etc.) - * \else + * @param callback The callback function that is triggered when the device status changes (for example, the frame rate is automatically reduced or the + * stream is closed due to high temperature, etc.) \else * @brief 设置设备状态改变回调函数 * * @param callback 设备状态改变(如,由于温度过高自动降低帧率或关流等)时触发的回调函数 @@ -548,30 +548,31 @@ public: void writeAuthorizationCode(const char *authCodeStr); /** - * \if English - * @brief Get the original parameter list of camera calibration saved in the device. The parameters in the list do not correspond to the current open-current configuration. - * You need to select the parameters according to the actual situation, and may need to do scaling, mirroring and other processing. Non-professional users are recommended to use the Pipeline::getCameraParam() interface. + * \if English + * @brief Get the original parameter list of camera calibration saved in the device. The parameters in the list do not correspond to the current + * open-current configuration. You need to select the parameters according to the actual situation, and may need to do scaling, mirroring and other + * processing. Non-professional users are recommended to use the Pipeline::getCameraParam() interface. * * @return std::shared_ptr camera parameter list - * \else + * \else * @brief 获取设备内保存的相机标定的原始参数列表,列表内参数不与当前开流配置相对应, * 需要自行根据实际情况选用参数并可能需要做缩放、镜像等处理。非专业用户建议使用Pipeline::getCameraParam()接口。 * * @return std::shared_ptr 相机参数列表 - * \endif + * \endif */ std::shared_ptr getCalibrationCameraParamList(); /** - * \if English - * @brief Device restart - * @attention The device will be disconnected and reconnected. After the device is disconnected, the access to the Device object interface may be abnormal. + * \if English + * @brief Device restart + * @attention The device will be disconnected and reconnected. After the device is disconnected, the access to the Device object interface may be abnormal. * Please delete the object directly and obtain it again after the device is reconnected. - * \else + * \else * @brief 设备重启 * @attention 设备会掉线重连,设备掉线后对Device对象接口访问可能会发生异常,请直接删除该对象, * 待设备重连后可重新获取。 - * \endif + * \endif */ void reboot(); @@ -674,11 +675,11 @@ public: /** * \if English - * @brief Get usb connection type + * @brief Get usb connection type (DEPRECATED) * * @return const char* returns usb connection type * \else - * @brief 获取usb连接类型 + * @brief 获取usb连接类型 (废弃接口) * * @return const char* 返回usb连接类型 * \endif @@ -699,54 +700,54 @@ public: const char *connectionType(); /** - * \if English - * @brief Get the version number of the hardware + * \if English + * @brief Get the version number of the hardware * * @return const char* returns the version number of the hardware - * \else + * \else * @brief 获取硬件的版本号 * * @return const char* 返回硬件的版本号 - * \endif + * \endif */ const char *hardwareVersion(); /** - * \if English - * @brief Get the minimum version number of the SDK supported by the device + * \if English + * @brief Get the minimum version number of the SDK supported by the device * * @return const char* returns the minimum SDK version number supported by the device - * \else + * \else * @brief 获取设备支持的SDK最小版本号 * * @return const char* 返回设备支持的SDK最小版本号 - * \endif + * \endif */ const char *supportedMinSdkVersion(); /** - * \if English - * @brief Get chip type name + * \if English + * @brief Get chip type name * * @return const char* returns the chip type name - * \else + * \else * @brief 获取芯片类型名称 * * @return const char* 返回芯片类型名称 - * \endif + * \endif */ const char *asicName(); /** - * \if English - * @brief Get device type + * \if English + * @brief Get device type * * @return OBDeviceType returns the device type - * \else + * \else * @brief 获取设备类型 * * @return OBDeviceType 返回设备类型 - * \endif + * \endif */ OBDeviceType deviceType(); @@ -778,18 +779,18 @@ public: /** * \if English - * @brief Get the name of the specified device + * @brief Get the name of the specified device (DEPRECATED) * * @param index Device index * @return int returns the name of the device * \else - * @brief 获取指定设备的名称 + * @brief 获取指定设备的名称 (废弃接口) * * @param index 设备索引 * @return int 返回设备的名称 * \endif */ - const char *name(uint32_t index); + DEPRECATED const char *name(uint32_t index); /** * \if English @@ -832,67 +833,67 @@ public: * * @param index 设备索引 * @return const char * 返回设备的uid - * \endif + * \endif */ const char *uid(uint32_t index); /** - * \if English + * \if English * @brief Get the serial number of the specified device * * @param index device index * @return const char * returns the serial number of the device - * \else - * @brief 获取指定设备的序列号 + * \else + * @brief 获取指定设备的序列号 * * @param index 设备索引 * @return const char * 返回设备的序列号 - * \endif + * \endif */ const char *serialNumber(uint32_t index); /** - * \if English + * \if English * @brief Get the specified device object from the device list * @attention If the device has been acquired and created elsewhere, repeated acquisition will throw an exception * @param index index of the device to create * @return std::shared_ptr returns the device object - * \else + * \else * @brief 从设备列表中获取指定设备对象, * @attention 如果设备有在其他地方被获取创建,重复获取将会抛异常 * @param index 要创建设备的索引 * @return std::shared_ptr 返回设备对象 - * \endif + * \endif */ std::shared_ptr getDevice(uint32_t index); /** - * \if English + * \if English * @brief Get the specified device object from the device list * @attention If the device has been acquired and created elsewhere, repeated acquisition will throw an exception * @param serialNumber The serial number of the device to be created * @return std::shared_ptr returns the device object - * \else + * \else * @brief 从设备列表中获取指定设备对象 * @attention 如果设备有在其他地方被获取创建,重复获取将会抛异常 * @param serialNumber 要创建设备的序列号 * @return std::shared_ptr 返回设备对象 - * \endif + * \endif */ std::shared_ptr getDeviceBySN(const char *serialNumber); /** - * \if English - * @brief Get the specified device object from the device list + * \if English + * @brief Get the specified device object from the device list * @attention If the device has been acquired and created elsewhere, repeated acquisition will throw an exception * @param uid If the device has been acquired and created elsewhere, repeated acquisition will throw an exception * @return std::shared_ptr If the device has been acquired and created elsewhere, repeated acquisition will throw an exception - * \else + * \else * @brief 从设备列表中获取指定设备对象 * @attention 如果设备有在其他地方被获取创建,重复获取将会抛异常 * @param uid 要创建设备的uid * @return std::shared_ptr 返回设备对象 - * \endif + * \endif */ std::shared_ptr getDeviceByUid(const char *uid); }; @@ -905,30 +906,30 @@ public: CameraParamList(std::unique_ptr impl); ~CameraParamList() noexcept; /** - * \if English - * @brief Number of camera parameter groups + * \if English + * @brief Number of camera parameter groups * * @return uint32_t returns the number of camera parameter groups - * \else + * \else * @brief 相机参数组数 * * @return uint32_t 返回相机参数组数 - * \endif + * \endif */ uint32_t count(); /** - * \if English - * @brief Get camera parameters + * \if English + * @brief Get camera parameters * * @param index parameter index * @return OBCameraParam returns the corresponding group parameters - * \else + * \else * @brief 获取相机参数 * * @param index 参数索引 * @return OBCameraParam 返回对应组参数 - * \endif + * \endif */ OBCameraParam getCameraParam(uint32_t index); }; diff --git a/orbbec_camera/SDK/include/libobsensor/hpp/Error.hpp b/orbbec_camera/SDK/include/libobsensor/hpp/Error.hpp index a8cdb0a3..8767d5e0 100644 --- a/orbbec_camera/SDK/include/libobsensor/hpp/Error.hpp +++ b/orbbec_camera/SDK/include/libobsensor/hpp/Error.hpp @@ -35,10 +35,10 @@ public: const char *getMessage() const noexcept; /** - * \if English - * @brief Get the exception type of the error, and determine which module is abnormal. + * \if English + * @brief Get the exception type of the error, and determine which module is abnormal. * @return OBExceptionType - * \else + * \else * @brief 获取该错误的异常类型,判断是具体哪个模块异常。 * @return OBExceptionType */ diff --git a/orbbec_camera/SDK/include/libobsensor/hpp/Filter.hpp b/orbbec_camera/SDK/include/libobsensor/hpp/Filter.hpp index 8844e1c9..eb425236 100644 --- a/orbbec_camera/SDK/include/libobsensor/hpp/Filter.hpp +++ b/orbbec_camera/SDK/include/libobsensor/hpp/Filter.hpp @@ -25,53 +25,53 @@ public: virtual ~Filter() = default; /** - * \if English - * @brief filter reset, free the internal cache, stop the processing thread and clear the pending buffer frame when asynchronous processing - * \else + * \if English + * @brief filter reset, free the internal cache, stop the processing thread and clear the pending buffer frame when asynchronous processing + * \else * @brief filter重置,释放内部缓存,异步处理时停止处理线程并清空待处理的缓存帧 * \endif */ virtual void reset(); /** - * \if English + * \if English * @brief Processing frames (synchronous interface) * * @param frame frame to be processed * @return std::shared_ptr< Frame > processed frame - * \else + * \else * @brief 处理帧(同步接口) * * @param frame 需要处理的frame * @return std::shared_ptr< Frame > 处理后的frame - * \endif + * \endif */ virtual std::shared_ptr process(std::shared_ptr frame); /** - * \if English - * @brief Push the pending frame into the cache (asynchronous callback interface) + * \if English + * @brief Push the pending frame into the cache (asynchronous callback interface) * * @param frame The pending frame processing result is returned by the callback function - * \else + * \else * @brief 压入待处理frame到缓存(异步回调接口) * * @param frame 待处理的frame处理结果通过回调函数返回 - * \endif + * \endif */ virtual void pushFrame(std::shared_ptr frame); /** - * \if English - * @brief Set the callback function (asynchronous callback interface) + * \if English + * @brief Set the callback function (asynchronous callback interface) * * @param callback Processing result callback - * \else + * \else * @brief 设置回调函数(异步回调接口) * * @param callback 处理结果回调 - * \endif + * \endif */ virtual void setCallBack(FilterCallback callback); @@ -83,58 +83,85 @@ class OB_EXTENSION_API PointCloudFilter : public Filter { public: PointCloudFilter(); /** - * \if English + * \if English * @brief Set point cloud type parameters * * @param type Point cloud type depth point cloud or RGBD point cloud - * \else + * \else * @brief 设置点云类型参数 * * @param type 点云类型 深度点云或RGBD点云 - * \endif + * \endif */ void setCreatePointFormat(OBFormat type); /** - * \if English - * @brief Set camera parameters + * \if English + * @brief Set camera parameters * * @param param Camera internal and external parameters - * \else + * \else * @brief 设置相机参数 * * @param param 相机内外参数 - * \endif + * \endif */ void setCameraParam(OBCameraParam param); /** - * \if English - * @brief Set the frame alignment state that will be input to generate point cloud (it needs to be enabled in D2C mode, as the basis for the algorithm to select the set of camera internal parameters) + * \if English + * @brief Set the frame alignment state that will be input to generate point cloud (it needs to be enabled in D2C mode, as the basis for the algorithm to + * select the set of camera internal parameters) * * @param state Alignment status, True: enable alignment; False: disable alignment - * \else + * \else * @brief 设置将要输入的用于生成点云的帧对齐状态(D2C模式下需要开启,作为算法选用那组相机内参的依据) * * @param state 对齐状态,True:开启对齐; False:关闭对齐 - * \endif + * \endif */ void setFrameAlignState(bool state); + + /** + * \if English + * @brief Set point cloud position data scale ratio + * + * @param scale scale ratio + * \else + * @brief 设置点云坐标数据缩放比例 + * + * @param scale 缩放比例 + * \endif + */ + void setPositionDataScaled(float scale); + + /** + * \if English + * @brief Set point cloud color data normalization + * + * @param state Whether to normalize + * \else + * @brief 设置点云颜色数据归一化 + * + * @param state 是否需要归一化 + * \endif + */ + void setColorDataNormalization(bool state); }; class OB_EXTENSION_API FormatConvertFilter : public Filter { public: FormatConvertFilter(); /** - * \if English - * @brief Set format conversion type + * \if English + * @brief Set format conversion type * * @param type Format conversion type - * \else + * \else * @brief 设置格式转化类型 * * @param type 格式转化类型 - * \endif + * \endif */ void setFormatConvertType(OBConvertFormat type); }; diff --git a/orbbec_camera/SDK/include/libobsensor/hpp/Frame.hpp b/orbbec_camera/SDK/include/libobsensor/hpp/Frame.hpp index 282729c0..93d86c23 100644 --- a/orbbec_camera/SDK/include/libobsensor/hpp/Frame.hpp +++ b/orbbec_camera/SDK/include/libobsensor/hpp/Frame.hpp @@ -34,6 +34,9 @@ struct FrameImpl; namespace ob { class StreamProfile; class Filter; +class FrameHelper; + +typedef std::function BufferDestroyCallback; class OB_EXTENSION_API Frame : public std::enable_shared_from_this { protected: @@ -97,17 +100,17 @@ public: virtual void *data(); /** - * \if English + * \if English * @brief Get the frame data size * * @return uint32_t returns the frame data size - * If it is point cloud data, it returns the number of bytes occupied by all point sets. If you need to find the number of points, you need to divide the dataSize by the structure size of the corresponding point type. - * \else + * If it is point cloud data, it returns the number of bytes occupied by all point sets. If you need to find the number of points, you need to divide the + * dataSize by the structure size of the corresponding point type. \else * @brief 获取帧数据大小 * * @return uint32_t 返回帧数据的大小 * 如果是点云数据返回的是所有点集合占的字节数,若需要求出点的个数需要将dataSize除以对应的点类型的结构体大小 - * \endif + * \endif */ virtual uint32_t dataSize(); @@ -188,6 +191,7 @@ public: private: friend class Filter; friend class Recorder; + friend class FrameHelper; }; class OB_EXTENSION_API VideoFrame : public Frame { @@ -248,17 +252,17 @@ public: uint32_t metadataSize(); /** - * \if English + * \if English * @brief Get the effective number of pixels (such as Y16 format frame, but only the lower 10 bits are valid bits, and the upper 6 bits are filled with 0) * @attention Only valid for Y8/Y10/Y11/Y12/Y14/Y16 format * * @return uint8_t returns the effective number of pixels in the pixel, or 0 if it is an unsupported format - * \else + * \else * @brief 获取像素有效位数(如Y16格式帧,每个像素占16bit,但实际只有低10位是有效位,高6位填充0) * @attention 仅对Y8/Y10/Y11/Y12/Y14/Y16格式有效 * * @return uint8_t 返回像素有效位数,如果是不支持的格式,返回0 - * \endif + * \endif */ uint8_t pixelAvailableBitSize(); }; @@ -459,6 +463,64 @@ public: float temperature(); }; +class OB_EXTENSION_API FrameHelper { +public: + FrameHelper(); + ~FrameHelper(); + /** + * @brief 根据外部创建的Buffer创建帧对象 + * + * @param format 帧对象格式 + * @param frameWidth 帧对象宽 + * @param frameHeight 帧对象高 + * @param buffer 帧对象数据 + * @param bufferSize 帧对象数据大小 + * @return std::shared_ptr 返回帧对象 + */ + static std::shared_ptr createFrameFromBuffer(OBFormat format, uint32_t frameWidth, uint32_t frameHeight, uint8_t *buffer, uint32_t bufferSize, + BufferDestroyCallback destroyCallback, void *destroyCallbackContext); + + /** + * @brief 创建空的帧集合对象 + * + * @return std::shared_ptr 返回帧集合对象 + */ + static std::shared_ptr createFrameSet(); + + /** + * @brief 往帧集合中填入对应类型的帧 + * + * @param frameSet 帧集合对象 + * @param frameType 填入帧的类型 + * @param frame 填入帧的对象 + */ + static void pushFrame(std::shared_ptr frameSet, OBFrameType frameType, std::shared_ptr frame); + + /** + * @brief 设置帧的系统时间戳 + * + * @param frame 设置的帧对象 + * @param systemTimestamp 设置的系统时间戳 + */ + static void setFrameSystemTimestamp(std::shared_ptr frame, uint64_t systemTimestamp); + + /** + * @brief 设置帧的设备时间戳 + * + * @param frame 设置的帧对象 + * @param deviceTimestamp 设置的设备时间戳 + */ + static void setFrameDeviceTimestamp(std::shared_ptr frame, uint64_t deviceTimestamp); + + /** + * @brief 设置帧的设备时间戳 + * + * @param frame 设置的帧对象 + * @param deviceTimestampUs 设置的设备时间戳(Us) + */ + static void setFrameDeviceTimestampUs(std::shared_ptr frame, uint64_t deviceTimestampUs); +}; + template bool Frame::is() { switch(this->type()) { case OB_FRAME_IR: diff --git a/orbbec_camera/SDK/include/libobsensor/hpp/Pipeline.hpp b/orbbec_camera/SDK/include/libobsensor/hpp/Pipeline.hpp index 434e478f..9be510d3 100644 --- a/orbbec_camera/SDK/include/libobsensor/hpp/Pipeline.hpp +++ b/orbbec_camera/SDK/include/libobsensor/hpp/Pipeline.hpp @@ -1,8 +1,8 @@ /** * \if English * @file Pipeline.hpp - * @brief The SDK's advanced API type can quickly implement switching streaming, frame synchronization, software filtering, and generating point cloud operations. - * \else + * @brief The SDK's advanced API type can quickly implement switching streaming, frame synchronization, software filtering, and generating point cloud + * operations. \else * @file Pipeline.hpp * @brief SDK的高级API类型,可以快速实现开关流,帧同步,软件滤波,生成点云等操作 * \endif @@ -36,10 +36,9 @@ private: public: /** * \if English - * @brief Pipeline is a high-level interface for applications, algorithms related RGBD data streams. Pipeline can provide alignment inside and synchronized FrameSet. - * Pipeline() no parameter version, which opens the first device in the list of devices connected to the OS by default. If the application has obtained the device through the DeviceList, - * opening the Pipeline() at this time will throw an exception that the device has been created. - * \else + * @brief Pipeline is a high-level interface for applications, algorithms related RGBD data streams. Pipeline can provide alignment inside and synchronized + * FrameSet. Pipeline() no parameter version, which opens the first device in the list of devices connected to the OS by default. If the application has + * obtained the device through the DeviceList, opening the Pipeline() at this time will throw an exception that the device has been created. \else * @brief Pipeline 是SDK的高级接口,适用于应用,算法等重点关注RGBD数据流常见,Pipeline在SDK内部可以提供对齐,同步后的FrameSet桢集合 * 直接方便客户使用。 * Pipeline()无参数版本,默认打开连接到OS的设备列表中的第一个设备。若应用已经通过DeviceList获取设备,此时打开Pipeline()会抛出设备已经创建异常。 @@ -50,8 +49,8 @@ public: /** * \if English * @brief - * Pipeline(std::shared_ptr< Device > device ) Function for multi-device operations. Multiple devices need to be obtained through DeviceList, and the device and pipeline are bound through this interface. - * \else + * Pipeline(std::shared_ptr< Device > device ) Function for multi-device operations. Multiple devices need to be obtained through DeviceList, and the device + * and pipeline are bound through this interface. \else * @brief * Pipeline(std::shared_ptr< Device > device )函数,适用于多设备操作常见,此时需要通过DeviceList获取多个设备,通过该接口实现device和pipeline绑定。 * \endif @@ -59,15 +58,15 @@ public: Pipeline(std::shared_ptr device); /** - * \if English + * \if English * @brief Create a pipeline for playback of recorded stream files * * @param filename Playback file path - * \else + * \else * @brief 创建pipeline用于回放录制好的流文件 * * @param filename 回放文件路径 - * \endif + * \endif */ Pipeline(const char *filename); ~Pipeline() noexcept; @@ -151,15 +150,15 @@ public: std::shared_ptr getDevice(); /** - * \if English - * @brief Get playback object + * \if English + * @brief Get playback object * * @return std::shared_ptr returns the playback object - * \else + * \else * @brief 获取回放对象 * * @return std::shared_ptr 返回回放对象 - * \endif + * \endif */ std::shared_ptr getPlayback(); @@ -199,82 +198,85 @@ public: void disableFrameSync(); /** - * \if English - * @brief Get camera parameters + * \if English + * @brief Get camera parameters * @attention If D2C is enabled, it will return the camera parameters after D2C, if not, it will return to the default parameters * * @return OBCameraParam returns camera parameters - * \else + * \else * @brief 获取相机参数 * @attention 如果开启了D2C将返回D2C后的相机参数,如果没有将返回默认参数 * * @return OBCameraParam返回相机参数 - * \endif + * \endif */ OBCameraParam getCameraParam(); /** - * \if English - * @brief Return a list of D2C-enabled depth sensor resolutions corresponding to the input color sensor resolution + * \if English + * @brief Return a list of D2C-enabled depth sensor resolutions corresponding to the input color sensor resolution * @param colorProfile Input color sensor resolution * @param alignMode Input align mode * * @return std::shared_ptr returns a list of depth sensor resolutions - * \else + * \else * @brief 返回与输入的彩色传感器分辨率对应的支持D2C的深度传感器分辨率列表 * @param colorProfile 输入的彩色传感器分辨率 * @param alignMode 输入的对齐模式 * * @return std::shared_ptr 返回深度传感器分辨率列表 - * \endif + * \endif */ - std::shared_ptr getD2CDepthProfileList(std::shared_ptr colorProfile,OBAlignMode alignMode); + std::shared_ptr getD2CDepthProfileList(std::shared_ptr colorProfile, OBAlignMode alignMode); /** * \if English - * @brief Valid area after getting D2C + * @brief Get valid area between minimum distance and maximum distance after D2C * - * @param depthDistance working distance + * @param minimumDistance minimum working distance + * @param maximumDistance maximum working distance * @return OBRect returns the area information valid after D2C at the working distance * \else - * @brief 获取D2C后有效的区域 + * @brief 获取D2C后给定工作范围的有效区域 + * 如果需要获取指定距离D2C后的ROI区域,将minimum_distance与maximum_distance设置成一样或者将maximum_distance设置成0 * - * @param depthDistance 工作距离 + * @param minimumDistance 最小工作距离 + * @param maximumDistance 最大工作距离 * @return OBRect 返回在工作距离下D2C后有效的区域信息 - * \endif + * \endif */ - OBRect getD2CValidArea(uint32_t depthDistance); + OBRect getD2CValidArea(uint32_t minimumDistance,uint32_t maximumDistance = 0); /** - * \if English - * @brief Dynamically switch the corresponding config configuration + * \if English + * @brief Dynamically switch the corresponding config configuration * * @param config Updated config configuration - * \else + * \else * @brief 动态切换对应的config配置 * * @param config 更新后的config配置 - * \endif + * \endif */ void switchConfig(std::shared_ptr config); /** - * \if English - * @brief start recording + * \if English + * @brief start recording * * @param filename Record file name - * \else + * \else * @brief 开始录制 * * @param filename 录制文件名 - * \endif + * \endif */ void startRecord(const char *filename); /** - * \if English - * @brief Stop recording - * \else + * \if English + * @brief Stop recording + * \else * @brief 停止录制 * \endif */ @@ -331,18 +333,47 @@ public: void disableAllStream(); /** - * \if English - * @brief Set the alignment mode + * \if English + * @brief Set the alignment mode * * @param mode Align State Mode - * \else + * \else * @brief 设置对齐模式 * * @param mode 对齐状态模式 - * \endif + * \endif */ void setAlignMode(OBAlignMode mode); + /** + * \if English + * @brief Whether scale depth frame after D2C + * + * @param enable Scale or not + * \else + * @brief 设置D2C后是否需要缩放深度 + * + * @param enable 是否需要缩放 + * \endif + */ + void setDepthScaleRequire(bool enable); + + /** + * \if English + * @brief + * + * @param d2cTargetWidth D2C target width + * @param d2cTargetHeight D2C target height + * \else + * @brief 设置D2C目标分辨率,适用于未使用OrbbecSDK开启Color流,且需要对深度进行D2C的情况 + * 注意:当使用OrbbecSDK开启Color流时,同时使用了此接口设置了D2C目标分辨率时。优先使用开启的Color流的配置进行D2C。 + * + * @param d2cTargetWidth D2C目标分辨率宽 + * @param d2cTargetHeight D2C目标分辨率高 + * \endif + */ + void setD2CTargetResolution(uint32_t d2cTargetWidth,uint32_t d2cTargetHeight); + friend class Pipeline; }; diff --git a/orbbec_camera/SDK/include/libobsensor/hpp/RecordPlayback.hpp b/orbbec_camera/SDK/include/libobsensor/hpp/RecordPlayback.hpp index 6acd8fae..130b5c84 100644 --- a/orbbec_camera/SDK/include/libobsensor/hpp/RecordPlayback.hpp +++ b/orbbec_camera/SDK/include/libobsensor/hpp/RecordPlayback.hpp @@ -29,9 +29,9 @@ private: public: /** - * \if English - * @brief Create a recorder for data recording - * \else + * \if English + * @brief Create a recorder for data recording + * \else * @brief 创建录制器用于数据的录制 * \endif */ @@ -39,10 +39,10 @@ public: Recorder(std::unique_ptr impl); /** - * \if English - * @brief Create a recorder for data recording + * \if English + * @brief Create a recorder for data recording * @param device Devices that need to record device information - * \else + * \else * @brief 创建录制器用于数据的录制 * @param device 需要录制设备信息的设备 * \endif @@ -52,39 +52,39 @@ public: virtual ~Recorder() noexcept; /** - * \if English - * @brief Enable the recorder, throw an exception after failure + * \if English + * @brief Enable the recorder, throw an exception after failure * * @param filename Recorded file name * @param async Whether to execute asynchronously - * \else + * \else * @brief 开启录制器,失败后抛出异常 * * @param filename 录制的文件名称 * @param async 是否异步执行 - * \endif + * \endif */ void start(const char *filename, bool async = false); /** - * \if English - * @brief Stop the recorder, throw an exception on failure - * \else + * \if English + * @brief Stop the recorder, throw an exception on failure + * \else * @brief 停止录制器,失败后抛出异常 * \endif */ void stop(); /** - * \if English - * @brief Write frame data to the recorder + * \if English + * @brief Write frame data to the recorder * * @param frame Write frame data - * \else + * \else * @brief 向录制器内写入帧数据 * * @param frame 写入的帧数据 - * \endif + * \endif */ void write(std::shared_ptr frame); }; @@ -95,76 +95,76 @@ private: public: /** - * \if English - * @brief Create playback object + * \if English + * @brief Create playback object * @param filename Playback filename - * \else + * \else * @brief 创建回放对象 * @param filename 回放的文件名 - * \endif + * \endif */ Playback(const char *filename); Playback(std::unique_ptr impl); virtual ~Playback() noexcept; /** - * \if English - * @brief Start playback, the playback data is returned from the callback, and an exception is thrown after failure + * \if English + * @brief Start playback, the playback data is returned from the callback, and an exception is thrown after failure * @param filename Playback filename * @param callback Callback for playback data * @param type Type of playback data - * \else + * \else * @brief 开启回放,回放数据从回调中返回,失败后抛出异常 * @param filename 回放的文件名 * @param callback 回放数据的回调 * @param type 回放数据的类型 - * \endif + * \endif */ void start(PlaybackCallback callback, OBMediaType type = OB_MEDIA_ALL); /** - * \if English - * @brief Stop playback and throw an exception if it fails - * \else + * \if English + * @brief Stop playback and throw an exception if it fails + * \else * @brief 停止回放,失败后抛出异常 * \endif */ void stop(); /** - * \if English - * @brief Set playback state + * \if English + * @brief Set playback state * @param state playback status callback - * \else + * \else * @brief 设置回放状态 * @param state 回放状态回调 - * \endif + * \endif */ void setPlaybackStateCallback(MediaStateCallback state); /** - * \if English - * @brief Get the device information in the recording file + * \if English + * @brief Get the device information in the recording file * * @return DeviceInfo returns device information - * \else + * \else * @brief 获取录制文件内的设备信息 * * @return DeviceInfo 返回的设备信息 - * \endif + * \endif */ std::shared_ptr getDeviceInfo(); /** - * \if English - * @brief Get the intrinsic and extrinsic parameter information in the recording file + * \if English + * @brief Get the intrinsic and extrinsic parameter information in the recording file * * @return OBCameraParam returns internal and external parameter information - * \else + * \else * @brief 获取录制文件内的内外参信息 * * @return OBCameraParam 返回的内外参信息 - * \endif + * \endif */ OBCameraParam getCameraParam(); }; diff --git a/orbbec_camera/SDK/include/libobsensor/hpp/Sensor.hpp b/orbbec_camera/SDK/include/libobsensor/hpp/Sensor.hpp index c9754134..696e1fd7 100644 --- a/orbbec_camera/SDK/include/libobsensor/hpp/Sensor.hpp +++ b/orbbec_camera/SDK/include/libobsensor/hpp/Sensor.hpp @@ -95,15 +95,15 @@ public: void stop(); /** - * \if English - * @brief Dynamically switch resolutions + * \if English + * @brief Dynamically switch resolutions * * @param streamProfile Resolution to switch - * \else + * \else * @brief 动态切换分辨率 * * @param streamProfile 需要切换的分辨率 - * \endif + * \endif */ void switchProfile(std::shared_ptr streamProfile); }; diff --git a/orbbec_camera/SDK/include/libobsensor/hpp/StreamProfile.hpp b/orbbec_camera/SDK/include/libobsensor/hpp/StreamProfile.hpp index 0b89e92b..73ceb72f 100644 --- a/orbbec_camera/SDK/include/libobsensor/hpp/StreamProfile.hpp +++ b/orbbec_camera/SDK/include/libobsensor/hpp/StreamProfile.hpp @@ -258,15 +258,16 @@ public: const std::shared_ptr getProfile(uint32_t index); /** - * \if English - * @brief Match the corresponding streamprofile through the passed in parameters. If there are multiple matches, the first one in the list will be returned by default. + * \if English + * @brief Match the corresponding streamprofile through the passed in parameters. If there are multiple matches, the first one in the list will be returned + * by default. * * @param width Width. If no matching condition is required, it can be passed to 0 * @param height Height. If no matching condition is required, it can be passed to 0 * @param format Type. If no matching condition is required, it can be passed to OB_FORMAT_UNKNOWN * @param fps Frame rate. If no matching condition is required, it can be passed to 0 * @return std::shared_ptr Returns the matching resolution - * \else + * \else * @brief 通过传入的参数进行匹配对应的StreamProfile,若有多个匹配项默认返回列表中的第一个 * * @param width 宽度,如不要求加入匹配条件,可传0 @@ -274,7 +275,7 @@ public: * @param format 类型,如不要求加入匹配条件,可传OB_FORMAT_UNKNOWN * @param fps 帧率,如不要求加入匹配条件,可传0 * @return std::shared_ptr 返回匹配的分辨率 - * \endif + * \endif */ const std::shared_ptr getVideoStreamProfile(int width = 0, int height = 0, OBFormat format = OB_FORMAT_UNKNOWN, int fps = 0); }; diff --git a/orbbec_camera/SDK/include/libobsensor/hpp/Types.hpp b/orbbec_camera/SDK/include/libobsensor/hpp/Types.hpp index a584613f..ed1dc376 100644 --- a/orbbec_camera/SDK/include/libobsensor/hpp/Types.hpp +++ b/orbbec_camera/SDK/include/libobsensor/hpp/Types.hpp @@ -1,4 +1,4 @@ -/** +/** * \if English * \file Types.hpp * \brief Provide SDK structure and enumeration constant definition (depending on libobsensor/h/ObTypes.h) diff --git a/orbbec_camera/SDK/include/libobsensor/hpp/Version.hpp b/orbbec_camera/SDK/include/libobsensor/hpp/Version.hpp index 89434fc6..f2e93518 100644 --- a/orbbec_camera/SDK/include/libobsensor/hpp/Version.hpp +++ b/orbbec_camera/SDK/include/libobsensor/hpp/Version.hpp @@ -24,7 +24,7 @@ public: * \endif */ static int getMajor(); - /** + /** * \if English * @brief Get the SDK minor version number * diff --git a/orbbec_camera/SDK/lib/libOrbbecSDK.so b/orbbec_camera/SDK/lib/libOrbbecSDK.so deleted file mode 100644 index dfd7b764..00000000 --- a/orbbec_camera/SDK/lib/libOrbbecSDK.so +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:a495e0a6de14bb0814011391631c9ab1f889d66167652166c52357185c3f8206 -size 52655616 diff --git a/orbbec_camera/SDK/lib/libOrbbecSDK.so.1.3 b/orbbec_camera/SDK/lib/libOrbbecSDK.so.1.3 deleted file mode 100644 index dfd7b764..00000000 --- a/orbbec_camera/SDK/lib/libOrbbecSDK.so.1.3 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:a495e0a6de14bb0814011391631c9ab1f889d66167652166c52357185c3f8206 -size 52655616 diff --git a/orbbec_camera/SDK/lib/libOrbbecSDK.so.1.3.1 b/orbbec_camera/SDK/lib/libOrbbecSDK.so.1.3.1 deleted file mode 100644 index dfd7b764..00000000 --- a/orbbec_camera/SDK/lib/libOrbbecSDK.so.1.3.1 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:a495e0a6de14bb0814011391631c9ab1f889d66167652166c52357185c3f8206 -size 52655616 diff --git a/orbbec_camera/SDK/lib/libpostfilter.so b/orbbec_camera/SDK/lib/libpostfilter.so deleted file mode 100644 index 9d4dc2e1..00000000 --- a/orbbec_camera/SDK/lib/libpostfilter.so +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:b7da0ca8328798b9709b1ddd794163cf18a4d966534e65efc0f29998dc458a03 -size 21961