mirror of
https://github.com/orbbec/OrbbecSDK_ROS2.git
synced 2026-10-03 19:47:46 +08:00
update SDK to v1.6.1
This commit is contained in:
@@ -1,17 +1,13 @@
|
||||
/* License: Apache 2.0. See LICENSE file in root directory.
|
||||
Copyright(c) 2020 Orbbec Corporation. All Rights Reserved. */
|
||||
Copyright(c) 2020 Orbbec Corporation. All Rights Reserved. */
|
||||
|
||||
/**
|
||||
* \if English
|
||||
* \file ObSensor.h
|
||||
* \brief libobsensor C entrance
|
||||
* \else
|
||||
* \file ObSensor.h
|
||||
* \brief libobsensor的C的入口
|
||||
* \endif
|
||||
*
|
||||
* \brief This file serves as the C entrance for the OrbbecSDK library.
|
||||
* It includes all necessary header files for OrbbecSDK usage.
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include <libobsensor/h/Context.h>
|
||||
#include <libobsensor/h/Device.h>
|
||||
#include <libobsensor/h/Error.h>
|
||||
|
||||
@@ -1,16 +1,10 @@
|
||||
/* License: Apache 2.0. See LICENSE file in root directory.
|
||||
Copyright(c) 2020 Orbbec Corporation. All Rights Reserved. */
|
||||
Copyright(c) 2020 Orbbec Corporation. All Rights Reserved. */
|
||||
|
||||
/**
|
||||
* \if English
|
||||
* \file ObSensor.hpp
|
||||
* \brief
|
||||
* libobsensor pure C ++ entry document
|
||||
* \else
|
||||
* \file ObSensor.hpp
|
||||
* \brief
|
||||
* libobsensor的纯C++的入口文件
|
||||
* \endif
|
||||
* \brief This is the main entry point for the OrbbecSDK C++ library.
|
||||
* It includes all necessary header files for using the library.
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
|
||||
@@ -1,13 +1,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
|
||||
* @file Context.h
|
||||
* @brief context是描述SDK的runtime一个管理类,负责SDK的资源申请与释放
|
||||
* context具备多设备的管理能力,负责枚举设备,监听设备回调,启用多设备同步等功能
|
||||
* \endif
|
||||
* @brief Context is a management class that describes the runtime of the SDK and is responsible for resource allocation 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.
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
@@ -18,169 +13,136 @@ extern "C" {
|
||||
#include "ObTypes.h"
|
||||
|
||||
/**
|
||||
* \if English
|
||||
* @brief create context api
|
||||
* @brief Create a context object
|
||||
*
|
||||
* @param[out] error record the error information
|
||||
* @return ob_context* return the context that created
|
||||
* \else
|
||||
* @brief 创建context的接口函数
|
||||
*
|
||||
* @param[out] error 记录错误信息
|
||||
* @return ob_context* 返回上下文环境
|
||||
* \endif
|
||||
* @param[out] error Pointer to an error object that will be populated if an error occurs during context creation
|
||||
* @return Pointer to the created context object
|
||||
*/
|
||||
ob_context *ob_create_context(ob_error **error);
|
||||
|
||||
/**
|
||||
* \if English
|
||||
* @brief create context with config
|
||||
* @brief Create a context object with a specified configuration file
|
||||
*
|
||||
* @param[in] config_path Configure the path of the file, and return null if the default path is used.
|
||||
* @param[out] error Log error messages
|
||||
* @return ob_context* returns the context
|
||||
* \else
|
||||
* @brief 创建context的接口函数
|
||||
*
|
||||
* @param[in] config_path 配置文件的路径,如果使用默认路径则传NULL
|
||||
* @param[out] error 记录错误信息
|
||||
* @return ob_context* 返回上下文环境
|
||||
* \endif
|
||||
* @param[in] config_path Path to the configuration file. If NULL, the default configuration file will be used.
|
||||
* @param[out] error Pointer to an error object that will be populated if an error occurs during context creation
|
||||
* @return Pointer to the created context object
|
||||
*/
|
||||
ob_context *ob_create_context_with_config(const char *config_path, ob_error **error);
|
||||
|
||||
/**
|
||||
* \if English
|
||||
* @brief Delete context
|
||||
* @brief Delete a context object
|
||||
*
|
||||
* @param[in] context The context to delete
|
||||
* @param[out] error Log error messages
|
||||
* \else
|
||||
* @brief 删除上下文环境
|
||||
*
|
||||
* @param[in] context 要删除的上下文环境
|
||||
* @param[out] error 记录错误信息
|
||||
* \endif
|
||||
* @param[in] context Pointer to the context object to be deleted
|
||||
* @param[out] error Pointer to an error object that will be populated if an error occurs during context deletion
|
||||
*/
|
||||
void ob_delete_context(ob_context *context, ob_error **error);
|
||||
|
||||
/**
|
||||
* \if English
|
||||
* @brief Get the list of enumerated devices
|
||||
* @brief Get a list of enumerated devices
|
||||
*
|
||||
* @param[in] context Context
|
||||
* @param[out] error Log error messages
|
||||
* @return ob_device_list* return device list object
|
||||
* \else
|
||||
* @brief 枚举设备列表
|
||||
*
|
||||
* @param[in] context 上下文环境
|
||||
* @param[out] error 记录错误信息
|
||||
* @return ob_device_list* 返回设备列表对象
|
||||
* \endif
|
||||
* @param[in] context Pointer to the context object
|
||||
* @param[out] error Pointer to an error object that will be populated if an error occurs during device enumeration
|
||||
* @return Pointer to the device list object
|
||||
*/
|
||||
ob_device_list *ob_query_device_list(ob_context *context, ob_error **error);
|
||||
|
||||
/**
|
||||
* @brief 创建网络设备
|
||||
* @brief Create a network device object
|
||||
*
|
||||
* @param[in] context 上下文环境
|
||||
* @param[in] address 设备ip地址
|
||||
* @param[in] port 设备端口
|
||||
* @param[out] error 记录错误信息
|
||||
* @return[out] ob_device* 返回设备对象
|
||||
* @param[in] context Pointer to the context object
|
||||
* @param[in] address IP address of the device
|
||||
* @param[in] port Port number of the device
|
||||
* @param[out] error Pointer to an error object that will be populated if an error occurs during device creation
|
||||
* @return Pointer to the created device object
|
||||
*/
|
||||
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
|
||||
* @attention The added and removed device list returned through the callback interface need to be released manually
|
||||
* @brief Set a device plug-in callback function
|
||||
* @attention The added and removed device lists returned through the callback interface need to be released manually
|
||||
*
|
||||
* @param[in] context Context
|
||||
* @param[in] callback Callback triggered when the device is plugged and unplugged
|
||||
* @param[in] user_data You can pass in any user data and get it from the callback
|
||||
* @param[out] error Log error messages
|
||||
* \else
|
||||
* @brief 设置设备插拔回调函数
|
||||
* @attention 通过回调接口返回的added和removed设备列表,需要手动释放设备列表
|
||||
*
|
||||
* @param[in] context 上下文环境
|
||||
* @param[in] callback 设备插拔时触发的回调
|
||||
* @param[in] user_data 可以传入任意用户数据,并从回调中获取
|
||||
* @param[out] error 记录错误信息
|
||||
* \endif
|
||||
* @param[in] context Pointer to the context object
|
||||
* @param[in] callback Pointer to the callback function triggered when a device is plugged or unplugged
|
||||
* @param[in] user_data Pointer to user data that can be passed to and retrieved from the callback function
|
||||
* @param[out] error Pointer to an error object that will be populated if an error occurs during callback function setting
|
||||
*/
|
||||
void ob_set_device_changed_callback(ob_context *context, ob_device_changed_callback callback, void *user_data, ob_error **error);
|
||||
|
||||
/**
|
||||
* \if English
|
||||
* @brief Activate the multi-device synchronization function to synchronize the clock of the created device(the device needs to support this function)
|
||||
* @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[out] error Log error messages
|
||||
* \else
|
||||
* @brief 启动多设备同步功能,同步已创建设备的时钟(需要使用的设备支持该功能)
|
||||
*
|
||||
* @param[in] context 上下文环境
|
||||
* @param[in] repeatInterval 定时同步时间间隔(单位ms;如果repeatInterval=0,表示只同步一次,不再定时执行)
|
||||
* @param[out] error 记录错误信息
|
||||
* \endif
|
||||
* @param[in] context Pointer to the context object
|
||||
* @param[in] repeatInterval Synchronization time interval in milliseconds. If repeatInterval=0, synchronization will only occur once and will not be
|
||||
* executed regularly.
|
||||
* @param[out] error Pointer to an error object that will be populated if an error occurs during multi-device synchronization activation
|
||||
*/
|
||||
void ob_enable_multi_device_sync(ob_context *context, uint64_t repeatInterval, ob_error **error);
|
||||
|
||||
/**
|
||||
* \if English
|
||||
* @brief Set the global log level and this will affect both the log level output to the console and the log output to the file
|
||||
* @brief Free idle memory from the internal frame memory pool
|
||||
*
|
||||
* @param[in] severity Output log level
|
||||
* @param[out] error Log error messages
|
||||
* \else
|
||||
* @brief 设置全局日志的等级,会同时作用于输出到console和输出到文件的日志等级
|
||||
* @param[in] context Pointer to the context object
|
||||
* @param[out] error Pointer to an error object that will be populated if an error occurs during memory freeing
|
||||
*/
|
||||
void ob_free_idle_memory(ob_context *context, ob_error **error);
|
||||
|
||||
/**
|
||||
* @brief Set the global log level
|
||||
*
|
||||
* @param[in] severity 输出日志等级
|
||||
* @param[out] error 记录错误信息
|
||||
* \endif
|
||||
* @attention This interface setting will affect the output level of all logs (terminal, file, callback)
|
||||
*
|
||||
* @param[in] severity Log level to set
|
||||
* @param[out] error Pointer to an error object that will be populated if an error occurs during log level setting
|
||||
*/
|
||||
void ob_set_logger_severity(ob_log_severity severity, ob_error **error);
|
||||
|
||||
/**
|
||||
* \if English
|
||||
* @brief Set output log to file
|
||||
* @brief Set the log output to a 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[out] error Log error messages
|
||||
* \else
|
||||
* @brief 设置输出日志到文件
|
||||
*
|
||||
* @param[in] severity 输出到文件的日志等级
|
||||
* @param[in] directory 日志文件输出路径,如果路径为空,则继续使用已有设置(已有配置也为空则不输出日志到文件)
|
||||
* @param[out] error 记录错误信息
|
||||
* \endif
|
||||
* @param[in] severity Log level to output to file
|
||||
* @param[in] directory Path to the log file output directory. 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 Pointer to an error object that will be populated if an error occurs during log output setting
|
||||
*/
|
||||
void ob_set_logger_to_file(ob_log_severity severity, const char *directory, ob_error **error);
|
||||
|
||||
/**
|
||||
* \if English
|
||||
/**
|
||||
* \if English
|
||||
* @brief Set the output log to the console
|
||||
* @brief Set the log callback function
|
||||
*
|
||||
* @param[in] log Log level
|
||||
* @param[out] error Log error messages
|
||||
* \else
|
||||
* @brief 设置输出日志到控制台
|
||||
* @param[in] severity Log level to set for the callback function
|
||||
* @param[in] callback Pointer to the callback function
|
||||
* @param[in] user_data Pointer to user data that can be passed to and retrieved from the callback function
|
||||
* @param[out] error Pointer to an error object that will be populated if an error occurs during log callback function setting
|
||||
*/
|
||||
void ob_set_logger_callback(ob_log_severity severity, ob_log_callback callback, void *user_data, ob_error **error);
|
||||
|
||||
/**
|
||||
* @brief Set the log output to the console
|
||||
*
|
||||
* @param[in] severity 日志的等级
|
||||
* @param[out] error 记录错误信息
|
||||
* \endif
|
||||
* @param[in] severity Log level to output to the console
|
||||
* @param[out] error Pointer to an error object that will be populated if an error occurs during log output setting
|
||||
*/
|
||||
void ob_set_logger_to_console(ob_log_severity severity, ob_error **error);
|
||||
|
||||
/**
|
||||
* @brief Load a license file
|
||||
*
|
||||
* @param[in] filePath Path to the license file
|
||||
* @param[in] key Decryption key. "OB_DEFAULT_DECRYPT_KEY" can be used to represent the default key.
|
||||
* @param[out] error Pointer to an error object that will be populated if an error occurs during license loading
|
||||
*/
|
||||
void ob_load_license(const char *filePath, const char *key, ob_error **error);
|
||||
|
||||
/**
|
||||
* @brief Load a license from data
|
||||
*
|
||||
* @param[in] data Pointer to the license data
|
||||
* @param[in] dataLen Length of the license data
|
||||
* @param[in] key Decryption key. "OB_DEFAULT_DECRYPT_KEY" can be used to represent the default key.
|
||||
* @param[out] error Pointer to an error object that will be populated if an error occurs during license loading
|
||||
*/
|
||||
void ob_load_license_from_data(const char *data, uint32_t dataLen, const char *key, ob_error **error);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,11 +1,6 @@
|
||||
/**
|
||||
* \if English
|
||||
* @file Error.h
|
||||
* @brief Error handling related functions, mainly used to obtain error messages
|
||||
* \else
|
||||
* @file Error.h
|
||||
* @brief 错误处理相关函数,主要用于获取错误信息
|
||||
* \endif
|
||||
* @brief Functions for handling errors, mainly used for obtaining error messages.
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
@@ -16,85 +11,49 @@ extern "C" {
|
||||
#include "ObTypes.h"
|
||||
|
||||
/**
|
||||
* \if English
|
||||
* @brief Get error status
|
||||
* @brief Get the error status.
|
||||
*
|
||||
* @param[in] error Error object
|
||||
* @return ob_status returns error status
|
||||
* \else
|
||||
* @brief 获取错误状态
|
||||
*
|
||||
* @param[in] error 错误对象
|
||||
* @return ob_status 返回错误状态
|
||||
* \endif
|
||||
* @param[in] error The error object.
|
||||
* @return The error status.
|
||||
*/
|
||||
ob_status ob_error_status(ob_error *error);
|
||||
|
||||
/**
|
||||
* \if English
|
||||
* @brief Get error information
|
||||
* @brief Get the error message.
|
||||
*
|
||||
* @param[in] error Error object
|
||||
* @return const char* returns an error message
|
||||
* \else
|
||||
* @brief 获取错误信息
|
||||
*
|
||||
* @param[in] error 错误对象
|
||||
* @return const char* 返回错误信息
|
||||
* \endif
|
||||
* @param[in] error The error object.
|
||||
* @return The error message.
|
||||
*/
|
||||
const char *ob_error_message(ob_error *error);
|
||||
|
||||
/**
|
||||
* \if English
|
||||
* @brief Get error API function name
|
||||
* @brief Get the name of the API function that caused the error.
|
||||
*
|
||||
* @param[in] error Error object
|
||||
* @return const char* returns error function
|
||||
* \else
|
||||
* @brief 获取出现错误的API函数名称
|
||||
*
|
||||
* @param[in] error 错误对象
|
||||
* @return const char* 返回错误函数
|
||||
* \endif
|
||||
* @param[in] error The error object.
|
||||
* @return The name of the API function.
|
||||
*/
|
||||
const char *ob_error_function(ob_error *error);
|
||||
|
||||
/**
|
||||
* \if English
|
||||
* @brief Get error parameters
|
||||
* @brief Get the error parameters.
|
||||
*
|
||||
* @param[in] error Error object
|
||||
* @return const char* returns the error parameter
|
||||
* \else
|
||||
* @brief 获取错误参数
|
||||
*
|
||||
* @param[in] error 错误对象
|
||||
* @return const char* 返回错误参数
|
||||
* \endif
|
||||
* @param[in] error The error object.
|
||||
* @return The error parameters.
|
||||
*/
|
||||
const char *ob_error_args(ob_error *error);
|
||||
|
||||
/**
|
||||
* \if English
|
||||
* @brief Get error exception type
|
||||
* @brief Get the type of exception that caused the error.
|
||||
*
|
||||
* @param[in] error Error object
|
||||
* @return ob_exception_type returns the error exception type
|
||||
* \else
|
||||
* @brief 获取错误异常类型
|
||||
*
|
||||
* @param[in] error 错误对象
|
||||
* @return ob_exception_type 返回错误异常类型
|
||||
* \endif
|
||||
* @param[in] error The error object.
|
||||
* @return The type of exception.
|
||||
*/
|
||||
ob_exception_type ob_error_exception_type(ob_error *error);
|
||||
|
||||
/**
|
||||
* \if English
|
||||
* @brief Delete the error object
|
||||
* @brief Delete the error object.
|
||||
*
|
||||
* @param[in] error The error object to delete
|
||||
* \else
|
||||
* @brief 删除错误对象
|
||||
*
|
||||
* @param[in] error 要删除的错误对象
|
||||
* \endif
|
||||
* @param[in] error The error object to delete.
|
||||
*/
|
||||
void ob_delete_error(ob_error *error);
|
||||
|
||||
|
||||
@@ -1,12 +1,6 @@
|
||||
/**
|
||||
* \if English
|
||||
* @file Filter.h
|
||||
* @brief The processing unit of the SDK can perform point cloud generation, format conversion and other functions.
|
||||
|
||||
* \else
|
||||
* @file Filter.h
|
||||
* @brief SDK的处理单元,可以进行点云的生成,格式转换等功能
|
||||
* \endif
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
@@ -17,278 +11,161 @@ extern "C" {
|
||||
#include "ObTypes.h"
|
||||
|
||||
/**
|
||||
* \if English
|
||||
* @brief Create PointCloud Filter
|
||||
* @brief Create a PointCloud Filter.
|
||||
*
|
||||
* @param[out] error Log error messages
|
||||
* @param[out] error Log error messages.
|
||||
*
|
||||
* @return filter pointcloud_filter object
|
||||
* \else
|
||||
* @brief 创建PointCloud Filter
|
||||
*
|
||||
* @param[out] error 记录错误信息
|
||||
*
|
||||
* @return filter pointcloud_filter对象
|
||||
* \endif
|
||||
* @return A pointcloud_filter object.
|
||||
*/
|
||||
ob_filter *ob_create_pointcloud_filter(ob_error **error);
|
||||
|
||||
/**
|
||||
* \if English
|
||||
* @brief PointCloud Filter device camera parameters
|
||||
* @brief Set the camera parameters for the PointCloud Filter.
|
||||
*
|
||||
* @param[in] filter pointcloud_filter object
|
||||
* @param[in] param Camera parameters
|
||||
* @param[out] error Log error messages
|
||||
* \else
|
||||
* @brief PointCloud Filter设备相机参数
|
||||
*
|
||||
* @param[in] filter pointcloud_filter对象
|
||||
* @param[in] param 相机参数
|
||||
* @param[out] error 记录错误信息
|
||||
* \endif
|
||||
* @param[in] filter A pointcloud_filter object.
|
||||
* @param[in] param Camera parameters.
|
||||
* @param[out] error Log error messages.
|
||||
*/
|
||||
void ob_pointcloud_filter_set_camera_param(ob_filter *filter, ob_camera_param param, ob_error **error);
|
||||
|
||||
/**
|
||||
* \if English
|
||||
* @brief Set point cloud type parameters
|
||||
* @brief Set the point cloud type parameters for the PointCloud Filter.
|
||||
*
|
||||
* @param[in] filter pointcloud_filter object
|
||||
* @param[in] type Point cloud type: depth point cloud or RGBD point cloud
|
||||
* @param[out] error Log error messages
|
||||
* \else
|
||||
* @brief 设置点云类型参数
|
||||
*
|
||||
* @param[in] filter pointcloud_filter对象
|
||||
* @param[in] type 点云类型 深度点云或RGBD点云
|
||||
* @param[out] error 记录错误信息
|
||||
* \endif
|
||||
* @param[in] filter A pointcloud_filter object.
|
||||
* @param[in] type Point cloud type: depth point cloud or RGBD point cloud.
|
||||
* @param[out] error Log error messages.
|
||||
*/
|
||||
void ob_pointcloud_filter_set_point_format(ob_filter *filter, ob_format type, ob_error **error);
|
||||
|
||||
/**
|
||||
* \if English
|
||||
* @brief Set the alignment state of the frames that will be input to produce the point cloud
|
||||
* @param[in] filter pointcloud_filter object
|
||||
* @param[in] state Alignment status, True: aligned; False: unaligned
|
||||
* @param[out] error Log error messages
|
||||
* \else
|
||||
* @brief 设置将要输入用于生产点云的帧的对齐状态
|
||||
* @param[in] filter pointcloud_filter对象
|
||||
* @param[in] state 对齐状态,True:已对齐; False:未对齐
|
||||
* @param[out] error 记录错误信息
|
||||
* \endif
|
||||
* @brief Set the alignment state of the frames that will be input to produce the point cloud.
|
||||
*
|
||||
* @param[in] filter A pointcloud_filter object.
|
||||
* @param[in] state Alignment status, True: aligned; False: unaligned.
|
||||
* @param[out] error Log error messages.
|
||||
*/
|
||||
void ob_pointcloud_filter_set_frame_align_state(ob_filter *filter, bool state, ob_error **error);
|
||||
|
||||
/**
|
||||
* \if English
|
||||
* @brief Set the point cloud data scaling factor
|
||||
* @brief Set the point cloud data scaling factor.
|
||||
*
|
||||
* @attention Calling this function to set the scale will change the point coordinate scaling factor of the output point cloud frame: posScale = posScale /
|
||||
* scale.The point coordinate scaling factor for the output point cloud frame can be obtained via @ref ob_points_frame_get_position_value_scale function
|
||||
* @param[in] filter object
|
||||
* @param[in] scale Set the point cloud coordinate data zoom factor
|
||||
* @param[out] error Log error messages
|
||||
* \else
|
||||
* @brief 设置点云数据缩放比例
|
||||
* scale. The point coordinate scaling factor for the output point cloud frame can be obtained via the @ref ob_points_frame_get_position_value_scale function.
|
||||
*
|
||||
* @attention 调用该函数设置缩放比例会改变输出点云帧的点坐标缩放系数:posScale = posScale / scale;
|
||||
* 输出点云帧的点坐标缩放系数可通过 @ref ob_points_frame_get_position_value_scale 函数获取
|
||||
*
|
||||
* @param[in] filter pointcloud_filter对象
|
||||
* @param[in] scale 设置点云坐标数据缩放比例
|
||||
* @param[out] error 记录错误信息
|
||||
* \endif
|
||||
* @param[in] filter A pointcloud_filter object.
|
||||
* @param[in] scale Set the point cloud coordinate data zoom factor.
|
||||
* @param[out] error Log error messages.
|
||||
*/
|
||||
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 object
|
||||
* @param[in] state Sets whether the point cloud color data is normalized
|
||||
* @param[out] error Log error messages
|
||||
* \else
|
||||
* @brief 设置点云颜色数据归一化
|
||||
* @param[in] filter pointcloud_filter对象
|
||||
* @param[in] state 设置点云颜色数据是否归一化
|
||||
* @param[out] error 记录错误信息
|
||||
* \endif
|
||||
* @brief Set the point cloud color data normalization.
|
||||
*
|
||||
* @param[in] filter A pointcloud_filter object.
|
||||
* @param[in] state Sets whether the point cloud color data is normalized.
|
||||
* @param[out] error Log error messages.
|
||||
*/
|
||||
void ob_pointcloud_filter_set_color_data_normalization(ob_filter *filter, bool state, ob_error **error);
|
||||
|
||||
/**
|
||||
* \if English
|
||||
* @brief Create FormatConvet Filter
|
||||
* @brief Set the point cloud coordinate system.
|
||||
*
|
||||
* @param[out] error Log error messages
|
||||
* @param[in] filter A pointcloud_filter object.
|
||||
* @param[in] type Coordinate system type.
|
||||
* @param[out] error Log error messages.
|
||||
*/
|
||||
void ob_pointcloud_filter_set_coordinate_system(ob_filter *filter, ob_coordinate_system_type type, ob_error **error);
|
||||
|
||||
/**
|
||||
* @brief Create a format convert Filter.
|
||||
*
|
||||
* @return filter format_convert object
|
||||
* \else
|
||||
* @brief 创建FormatConvet Filter
|
||||
* @param[out] error Log error messages.
|
||||
*
|
||||
* @param[out] error 记录错误信息
|
||||
*
|
||||
* @return filter format_convert 对象
|
||||
* \endif
|
||||
* @return A format_convert object.
|
||||
*/
|
||||
ob_filter *ob_create_format_convert_filter(ob_error **error);
|
||||
|
||||
/**
|
||||
* \if English
|
||||
* @brief Set the type of format conversion
|
||||
* @brief Set the type of format conversion for the format convert Filter.
|
||||
*
|
||||
* @param[in] filter formatconvet_filter object
|
||||
* @param[in] type Format conversion type
|
||||
* @param[out] error Log error messages
|
||||
* \else
|
||||
* @brief 设置格式转化的类型
|
||||
*
|
||||
* @param[in] filter formatconvet_filter对象
|
||||
* @param[in] type 格式转化类型
|
||||
* @param[out] error 记录错误信息
|
||||
* \endif
|
||||
* @param[in] filter A format convert filter object.
|
||||
* @param[in] type Format conversion type.
|
||||
* @param[out] error Log error messages.
|
||||
*/
|
||||
void ob_format_convert_filter_set_format(ob_filter *filter, ob_convert_format type, ob_error **error);
|
||||
|
||||
/**
|
||||
* \if English
|
||||
* @brief Create compression Filter
|
||||
* @brief Create a compression Filter.
|
||||
*
|
||||
* @param[out] error Log error messages
|
||||
* @param[out] error Log error messages.
|
||||
*
|
||||
* @return filter depth_filter object
|
||||
* \else
|
||||
* @brief 创建compression Filter
|
||||
*
|
||||
* @param[out] error 记录错误信息
|
||||
*
|
||||
* @return filter depth_filter 对象
|
||||
* \endif
|
||||
* @return A depth_filter object.
|
||||
*/
|
||||
ob_filter *ob_create_compression_filter(ob_error **error);
|
||||
|
||||
/**
|
||||
* \if English
|
||||
* @brief Set compression parameters
|
||||
* @brief Set the compression parameters for the compression Filter.
|
||||
*
|
||||
* @param[in] filter compression_filter object
|
||||
* @param[in] mode Compression mode OB_COMPRESSION_LOSSLESS or OB_COMPRESSION_LOSSY
|
||||
* @param[in] params Compression params, struct ob_compression_params, when mode is OB_COMPRESSION_LOSSLESS, params is NULL
|
||||
* @param[out] error Log error messages
|
||||
* \else
|
||||
* @brief 设置压缩类型
|
||||
*
|
||||
* @param[in] filter compression_filter对象
|
||||
* @param[in] mode 压缩模式 OB_COMPRESSION_LOSSLESS or OB_COMPRESSION_LOSSY
|
||||
* @param[in] params 压缩参数,结构体 ob_compression_params,当mode为OB_COMPRESSION_LOSSLESS时,params为NULL
|
||||
* @param[out] error 记录错误信息
|
||||
* \endif
|
||||
* @param[in] filter A compression_filter object.
|
||||
* @param[in] mode Compression mode OB_COMPRESSION_LOSSLESS or OB_COMPRESSION_LOSSY.
|
||||
* @param[in] params Compression params, struct ob_compression_params, when mode is OB_COMPRESSION_LOSSLESS, params is NULL.
|
||||
* @param[out] error Log error messages.
|
||||
*/
|
||||
void ob_compression_filter_set_compression_params(ob_filter *filter, ob_compression_mode mode, void *params, ob_error **error);
|
||||
|
||||
/**
|
||||
* \if English
|
||||
* @brief Create decompression Filter
|
||||
* @brief Create a decompression Filter.
|
||||
*
|
||||
* @param[out] error Log error messages
|
||||
* @param[out] error Log error messages.
|
||||
*
|
||||
* @return filter decompression Filter object
|
||||
* \else
|
||||
* @brief 创建decompressionr Filter
|
||||
*
|
||||
* @param[out] error 记录错误信息
|
||||
*
|
||||
* @return filter decompression Filter 对象
|
||||
* \endif
|
||||
* @return A decompression Filter object.
|
||||
*/
|
||||
|
||||
ob_filter *ob_create_decompression_filter(ob_error **error);
|
||||
|
||||
/**
|
||||
* \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 Reset the filter, clears the cache, and resets the state. 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
|
||||
* \else
|
||||
* @brief Filter重置, 缓存清空,状态复位。如果是使用异步方式接口,还会停止处理线程,清空待处理的缓存帧
|
||||
*
|
||||
* @param[in] filter filter对象
|
||||
* @param[out] error 记录错误信息
|
||||
* \endif
|
||||
* @param[in] filter A filter object.
|
||||
* @param[out] error Log error messages.
|
||||
*/
|
||||
void ob_filter_reset(ob_filter *filter, ob_error **error);
|
||||
|
||||
/**
|
||||
* \if English
|
||||
* @brief Filter processing (synchronous interface)
|
||||
* @brief Process the frame (synchronous interface).
|
||||
*
|
||||
* @param[in] filter filter object
|
||||
* @param[in] frame pointer to the frame object to be processed
|
||||
* @param[out] error Log error messages
|
||||
* @param[in] filter A filter object.
|
||||
* @param[in] frame Pointer to the frame object to be processed.
|
||||
* @param[out] error Log error messages.
|
||||
*
|
||||
* @return ob_frame The frame object processed by the filter
|
||||
* \else
|
||||
* @brief Filter 处理(同步接口)
|
||||
*
|
||||
* @param[in] filter filter对象
|
||||
* @param[in] frame 需要被处理的frame对象指针
|
||||
* @param[out] error 记录错误信息
|
||||
*
|
||||
* @return ob_frame filter处理后的frame对象
|
||||
* \endif
|
||||
* @return The frame object processed by the filter.
|
||||
*/
|
||||
ob_frame *ob_filter_process(ob_filter *filter, ob_frame *frame, ob_error **error);
|
||||
|
||||
/**
|
||||
* \if English
|
||||
* @brief Filter Set the processing result callback function (asynchronous callback interface)
|
||||
* @brief Set the processing result callback function for the filter (asynchronous callback interface).
|
||||
*
|
||||
* @param[in] filter filter object
|
||||
* @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
|
||||
* @brief Filter 设置处理结果回调函数(异步回调接口)
|
||||
*
|
||||
* @param[in] filter filter对象
|
||||
* @param[in] callback 回调函数
|
||||
* @param[in] user_data 可以传入任意用户数据指针,并从回调返回该数据指针
|
||||
* @param[out] error 记录错误信息
|
||||
* \endif
|
||||
* @param[in] filter A filter object.
|
||||
* @param[in] callback Callback function.
|
||||
* @param[in] user_data Arbitrary user data pointer can be passed in and returned from the callback.
|
||||
* @param[out] error Log error messages.
|
||||
*/
|
||||
void ob_filter_set_callback(ob_filter *filter, ob_filter_callback callback, void *user_data, ob_error **error);
|
||||
|
||||
/**
|
||||
* \if English
|
||||
* @brief filter Push the frame into the pending cache (asynchronous callback interface)
|
||||
* @brief Push the frame into the pending cache for the filter (asynchronous callback interface).
|
||||
*
|
||||
* @param[in] filter filter object
|
||||
* @param[out] error Log error messages
|
||||
* \else
|
||||
* @brief filter 压入frame到待处理缓存(异步回调接口)
|
||||
*
|
||||
* @param[in] filter filter对象
|
||||
* @param[out] error 记录错误信息
|
||||
* \endif
|
||||
* @param[in] filter A filter object.
|
||||
* @param[in] frame Pointer to the frame object to be processed.
|
||||
* @param[out] error Log error messages.
|
||||
*/
|
||||
void ob_filter_push_frame(ob_filter *filter, ob_frame *frame, ob_error **error);
|
||||
|
||||
/**
|
||||
* \if English
|
||||
* @brief Delete Filter
|
||||
* @brief Delete the filter.
|
||||
*
|
||||
* @param[in] filter filter object
|
||||
* @param[out] error Log error messages
|
||||
* \else
|
||||
* @brief 删除Filter
|
||||
*
|
||||
* @param[in] filter filter 对象
|
||||
* @param[out] error 记录错误信息
|
||||
* \endif
|
||||
* @param[in] filter A filter object.
|
||||
* @param[out] error Log error messages.
|
||||
*/
|
||||
void ob_delete_filter(ob_filter *filter, ob_error **error);
|
||||
|
||||
|
||||
@@ -1,11 +1,6 @@
|
||||
/**
|
||||
* \if English
|
||||
* @file Frame.h
|
||||
* @brief Frame related function is mainly used to obtain frame data and frame information
|
||||
* \else
|
||||
* @file Frame.h
|
||||
* @brief 帧相关函数,主要用于获取帧数据及帧的信息
|
||||
* \endif
|
||||
*
|
||||
*/
|
||||
#pragma once
|
||||
@@ -17,529 +12,334 @@ extern "C" {
|
||||
#include "ObTypes.h"
|
||||
|
||||
/**
|
||||
* \if English
|
||||
* @brief Get the frame index
|
||||
*
|
||||
* @param[in] frame Frame object
|
||||
* @param[out] error Log wrong message
|
||||
* @return uint64_t returns the frame index
|
||||
* \else
|
||||
* @brief 获取帧索引
|
||||
*
|
||||
* @param[in] frame 帧对象
|
||||
* @param[out] error 记录错误信息
|
||||
* @return uint64_t 返回帧索引
|
||||
* \endif
|
||||
* @return uint64_t return the frame index
|
||||
*/
|
||||
uint64_t ob_frame_index(ob_frame *frame, ob_error **error);
|
||||
|
||||
/**
|
||||
* \if English
|
||||
* @brief Get the frame format
|
||||
*
|
||||
* @param[in] frame Frame object
|
||||
* @param[out] error Log error messages
|
||||
* @return ob_format returns the frame format
|
||||
* \else
|
||||
* @brief 获取帧格式
|
||||
*
|
||||
* @param[in] frame 帧对象
|
||||
* @param[out] error 记录错误信息
|
||||
* @return ob_format 返回帧格式
|
||||
* \endif
|
||||
* @return ob_format return the frame format
|
||||
*/
|
||||
ob_format ob_frame_format(ob_frame *frame, ob_error **error);
|
||||
|
||||
/**
|
||||
* \if English
|
||||
* @brief Get the frame type
|
||||
*
|
||||
* @param[in] frame Frame object
|
||||
* @param[out] error Log error messages
|
||||
* @return ob_frame_type returns the frame type
|
||||
* \else
|
||||
* @brief 获取帧类型
|
||||
*
|
||||
* @param[in] frame 帧对象
|
||||
* @param[out] error 记录错误信息
|
||||
* @return ob_frame_type 返回帧类型
|
||||
* \endif
|
||||
* @return ob_frame_type return the frame type
|
||||
*/
|
||||
ob_frame_type ob_frame_get_type(ob_frame *frame, ob_error **error);
|
||||
|
||||
/**
|
||||
* \if English
|
||||
* @brief Get frame time stamp (hardware)
|
||||
* @brief Get the hardware timestamp of the frame in milliseconds.
|
||||
* @brief The hardware timestamp is the time point when the frame was captured by the device, on device clock domain.
|
||||
*
|
||||
* @param[in] frame Frame object
|
||||
* @param[out] error Log error messages
|
||||
* @return uint64_t returns the frame hardware timestamp
|
||||
* \else
|
||||
* @brief 获取帧硬件时间戳
|
||||
*
|
||||
* @param[in] frame 帧对象
|
||||
* @param[out] error 记录错误信息
|
||||
* @return uint64_t 返回帧硬件时间戳
|
||||
* \endif
|
||||
* @return uint64_t return the frame hardware timestamp in milliseconds
|
||||
*/
|
||||
uint64_t ob_frame_time_stamp(ob_frame *frame, ob_error **error);
|
||||
|
||||
/**
|
||||
* \if English
|
||||
* @brief Get frame time stamp (hardware) us
|
||||
* @brief Get the hardware timestamp of the frame in microseconds.
|
||||
* @brief The hardware timestamp is the time point when the frame was captured by the device, on device clock domain.
|
||||
*
|
||||
* @param[in] frame Frame object
|
||||
* @param[out] error Log error messages
|
||||
* @return uint64_t returns the frame hardware timestamp, unit us
|
||||
* \else
|
||||
* @brief 获取帧硬件时间戳us
|
||||
*
|
||||
* @param[in] frame 帧对象
|
||||
* @param[out] error 记录错误信息
|
||||
* @return uint64_t 返回帧硬件时间戳,单位us
|
||||
* \endif
|
||||
* @return uint64_t return the frame hardware timestamp in microseconds
|
||||
*/
|
||||
uint64_t ob_frame_time_stamp_us(ob_frame *frame, ob_error **error);
|
||||
|
||||
/**
|
||||
* \if English
|
||||
* @brief Get frame time stamp (system)
|
||||
* @brief Get the system timestamp of the frame in milliseconds.
|
||||
* @brief The system timestamp is the time point when the frame was received by the host, on host clock domain.
|
||||
*
|
||||
* @param[in] frame Frame object
|
||||
* @param[out] error Log error messages
|
||||
* @return uint64_t returns the frame system timestamp
|
||||
* \else
|
||||
* @brief 获取帧系统时间戳
|
||||
*
|
||||
* @param[in] frame 帧对象
|
||||
* @param[out] error 记录错误信息
|
||||
* @return uint64_t 返回帧系统时间戳
|
||||
* \endif
|
||||
* @return uint64_t return the frame system timestamp in milliseconds
|
||||
*/
|
||||
uint64_t ob_frame_system_time_stamp(ob_frame *frame, ob_error **error);
|
||||
|
||||
/**
|
||||
* \if English
|
||||
* @brief Get frame data
|
||||
*
|
||||
* @param[in] frame Frame object
|
||||
* @param[out] error Log error messages
|
||||
* @return void* * returns frame data pointer
|
||||
* \else
|
||||
* @brief 获取帧数据
|
||||
*
|
||||
* @param[in] frame 帧对象
|
||||
* @param[out] error 记录错误信息
|
||||
* @return void* 返回帧数据指针
|
||||
* \endif
|
||||
* @return void* * return frame data pointer
|
||||
*/
|
||||
void *ob_frame_data(ob_frame *frame, ob_error **error);
|
||||
|
||||
/**
|
||||
* \if English
|
||||
* @brief Get the frame data size
|
||||
*
|
||||
* @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
|
||||
* @brief 获取帧数据大小
|
||||
*
|
||||
* @param[in] frame 帧对象
|
||||
* @param[out] error 记录错误信息
|
||||
* @return uint32_t 返回帧数据大小
|
||||
* 如果是点云数据返回的是所有点集合占的字节数,若需要求出点的个数需要将dataSize除以对应的点类型的结构体大小
|
||||
* \endif
|
||||
* @return uint32_t return the frame data size
|
||||
* If it is point cloud data, it return 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.
|
||||
*/
|
||||
uint32_t ob_frame_data_size(ob_frame *frame, ob_error **error);
|
||||
|
||||
/**
|
||||
* \if English
|
||||
* @brief Get video frame width
|
||||
*
|
||||
* @param[in] frame Frame object
|
||||
* @param[out] error Log error messages
|
||||
* @return uint32_t returns the frame width
|
||||
* \else
|
||||
* @brief 获取视频帧宽
|
||||
*
|
||||
* @param[in] frame 帧对象
|
||||
* @param[out] error 记录错误信息
|
||||
* @return uint32_t 返回帧宽
|
||||
* \endif
|
||||
* @return uint32_t return the frame width
|
||||
*/
|
||||
uint32_t ob_video_frame_width(ob_frame *frame, ob_error **error);
|
||||
|
||||
/**
|
||||
* \if English
|
||||
* @brief Get video frame height
|
||||
*
|
||||
* @param[in] frame Frame object
|
||||
* @param[out] error Log error messages
|
||||
* @return uint32_t returns the frame height
|
||||
* \else
|
||||
* @brief 获取视频帧高
|
||||
*
|
||||
* @param[in] frame 帧对象
|
||||
* @param[out] error 记录错误信息
|
||||
* @return uint32_t 返回帧高
|
||||
* \endif
|
||||
* @return uint32_t return the frame height
|
||||
*/
|
||||
uint32_t ob_video_frame_height(ob_frame *frame, ob_error **error);
|
||||
|
||||
/**
|
||||
*\if English
|
||||
* @brief Get the metadata of the frame
|
||||
*
|
||||
* @param[in] frame Video frame object
|
||||
* @param[out] error Log error messages
|
||||
* @return void* returns the metadata pointer of the frame
|
||||
* \else
|
||||
* @brief 获取帧的元数据
|
||||
*
|
||||
* @param[in] frame 视频帧对象
|
||||
* @param[out] error 记录错误信息
|
||||
* @return void* 返回帧的元数据指针
|
||||
* \endif
|
||||
* @return void* return the metadata pointer of the frame
|
||||
*/
|
||||
void *ob_video_frame_metadata(ob_frame *frame, ob_error **error);
|
||||
|
||||
/**
|
||||
* \if English
|
||||
* @brief Get the metadata size of the frame
|
||||
*
|
||||
* @param[in] frame Video frame object
|
||||
* @param[out] error Log error messages
|
||||
* @return uint32_t returns the metadata size of the frame
|
||||
* \else
|
||||
* @brief 获取帧的元数据大小
|
||||
*
|
||||
* @param[in] frame 视频帧对象
|
||||
* @param[out] error 记录错误信息
|
||||
* @return uint32_t 返回帧的元数据大小
|
||||
* \endif
|
||||
* @return uint32_t return the metadata size of the frame
|
||||
*/
|
||||
uint32_t ob_video_frame_metadata_size(ob_frame *frame, ob_error **error);
|
||||
|
||||
/**
|
||||
* \if English
|
||||
* @brief Get the effective number of pixels (such as Y16 format frame, but only the lower 10 bits are effective bits, and the upper 6 bits are filled with 0)
|
||||
* @attention Only valid for Y8/Y10/Y11/Y12/Y14/Y16 format
|
||||
*
|
||||
* @param[in] frame video frame object
|
||||
* @param[out] error log error messages
|
||||
* @return uint8_t return the effective number of pixels in the pixel, or 0 if it is an unsupported format
|
||||
* \else
|
||||
* @brief 获取像素有效位数(如Y16格式帧,每个像素占16bit,但实际只有低10位是有效位,高6位填充0)
|
||||
* @attention 仅对Y8/Y10/Y11/Y12/Y14/Y16格式有效
|
||||
*
|
||||
* @param[in] frame 视频帧对象
|
||||
* @param[out] error 记录错误信息
|
||||
* @return uint8_t 返回像素有效位数,如果是不支持的格式,返回0
|
||||
* \endif
|
||||
*/
|
||||
uint8_t ob_video_frame_pixel_available_bit_size(ob_frame *frame, ob_error **error);
|
||||
|
||||
/* @brief 查询IR frame的最原始数据来源(即使回放视频,其原始的数据源也是sensor)
|
||||
* @param[in] frame 视频帧对象
|
||||
* @param[out] error 记录错误信息
|
||||
* @return uint8_t 返回
|
||||
* \endif
|
||||
/**
|
||||
* @brief Get the source sensor type of the ir frame (left or right for dual camera)
|
||||
*
|
||||
* @param frame Frame object
|
||||
* @param ob_error Log error messages
|
||||
* @return ob_sensor_type return the source sensor type of the ir frame
|
||||
*/
|
||||
ob_sensor_type ob_ir_frame_get_source_sensor_type(ob_frame *frame, ob_error **ob_error);
|
||||
|
||||
/**
|
||||
* \if English
|
||||
* @brief Get the value scale of the depth frame. The pixel value of depth frame is multiplied by the scale to give a depth value in millimeter.
|
||||
* such as valueScale=0.1, and a certain coordinate pixel value is pixelValue=10000, then the depth value = pixelValue*valueScale = 10000*0.1=1000mm。
|
||||
* @brief Get the value scale of the depth frame. The pixel value of the depth frame is multiplied by the scale to give a depth value in millimeters.
|
||||
* For example, if valueScale=0.1 and a certain coordinate pixel value is pixelValue=10000, then the depth value = pixelValue*valueScale = 10000*0.1=1000mm.
|
||||
*
|
||||
* @param[in] frame Frame object
|
||||
* @param[out] error Log error messages
|
||||
* @return float value scale
|
||||
* \else
|
||||
* @brief 获取深度帧的值缩放系数,深度像素值乘以缩放系数后,可以得到单位为毫米的深度值; 如valueScale=0.1, 某坐标像素值为pixelValue=10000,
|
||||
* 则表示深度值value = pixelValue*valueScale = 10000*0.1=1000mm。
|
||||
*
|
||||
* @param[in] frame 帧对象
|
||||
* @param[out] error 记录错误信息
|
||||
* @return float 缩放系数
|
||||
* \endif
|
||||
* @return float The value scale of the depth frame
|
||||
*/
|
||||
float ob_depth_frame_get_value_scale(ob_frame *frame, ob_error **error);
|
||||
|
||||
/**
|
||||
* \if English
|
||||
* @brief Get the point position value scale of the points frame. the point position value of points frame is multiplied by the scale to give a position value
|
||||
* in millimeter. such as scale=0.1, The x-coordinate value of a point is x = 10000, which means that the actual x-coordinate value = x*scale = 10000*0.1 =
|
||||
* 1000mm.
|
||||
* @brief Get the point position value scale of the points frame. The point position value of the points frame is multiplied by the scale to give a position
|
||||
* value in millimeters. For example, if scale=0.1, the x-coordinate value of a point is x = 10000, which means that the actual x-coordinate value = x*scale =
|
||||
* 10000*0.1 = 1000mm.
|
||||
*
|
||||
* @param[in] frame Frame object
|
||||
* @param[out] error Log error messages
|
||||
* @return float position value scale
|
||||
* \else
|
||||
* @brief 获取点云帧的点坐标值缩放系数,点坐标值乘以缩放系数后,可以得到单位为毫米的坐标值; 如scale=0.1, 某个点的x坐标值为x=10000,
|
||||
* 则表示实际x坐标value = x*scale = 10000*0.1=1000mm。
|
||||
*
|
||||
* @param[in] frame 点云帧对象
|
||||
* @param[out] error 记录错误信息
|
||||
* @return float 缩放系数
|
||||
* \endif
|
||||
* @return float The position value scale of the points frame
|
||||
*/
|
||||
float ob_points_frame_get_position_value_scale(ob_frame *frame, ob_error **error);
|
||||
|
||||
/**
|
||||
* \if English
|
||||
* @brief Delete frame
|
||||
* @brief Delete a frame object
|
||||
*
|
||||
* @param[in] frame The frame object to delete
|
||||
* @param[in] frame The frame object to delete
|
||||
* @param[out] error Log error messages
|
||||
* \else
|
||||
* @brief 删除帧
|
||||
*
|
||||
* @param[in] frame 要删除的帧对象
|
||||
* @param[out] error 记录错误信息
|
||||
* \endif
|
||||
*/
|
||||
void ob_delete_frame(ob_frame *frame, ob_error **error);
|
||||
|
||||
/**
|
||||
* \if English
|
||||
* @brief Get the number of frames contained in the frameset
|
||||
*
|
||||
* @param[in] frameset frameset object
|
||||
* @param[out] error Log error messages
|
||||
* @return uint32_t returns the number of frames
|
||||
* \else
|
||||
* @brief 获取帧集合包含的帧数量
|
||||
*
|
||||
* @param[in] frameset 帧集合对象
|
||||
* @param[out] error 记录错误信息
|
||||
* @return uint32_t 返回帧数量
|
||||
* \endif
|
||||
* @return uint32_t return the number of frames
|
||||
*/
|
||||
uint32_t ob_frameset_frame_count(ob_frame *frameset, ob_error **error);
|
||||
|
||||
/**
|
||||
* \if English
|
||||
* @brief Get the depth frame from the frameset
|
||||
* @brief Get the depth frame from the frameset.
|
||||
*
|
||||
* @param[in] frameset Frameset object
|
||||
* @param[out] error Log error messages
|
||||
* @return ob_frame* returns the depth frame
|
||||
* \else
|
||||
* @brief 从帧集合中获取深度帧
|
||||
*
|
||||
* @param[in] frameset 帧集合对象
|
||||
* @param[out] error 记录错误信息
|
||||
* @return ob_frame* 返回深度帧
|
||||
* \endif
|
||||
* @param[in] frameset Frameset object.
|
||||
* @param[out] error Log error messages.
|
||||
* @return ob_frame* Return the depth frame.
|
||||
*/
|
||||
ob_frame *ob_frameset_depth_frame(ob_frame *frameset, ob_error **error);
|
||||
|
||||
/**
|
||||
* \if English
|
||||
* @brief Get the color frame from the frameset
|
||||
* @brief Get the color frame from the frameset.
|
||||
*
|
||||
* @param[in] frameset Frameset object
|
||||
* @param[out] error Log error messages
|
||||
* @return ob_frame* returns the color frame
|
||||
* \else
|
||||
* @brief 从帧集合中获取彩色帧
|
||||
*
|
||||
* @param[in] frameset 帧集合对象
|
||||
* @param[out] error 记录错误信息
|
||||
* @return ob_frame* 返回彩色帧
|
||||
* \endif
|
||||
* @param[in] frameset Frameset object.
|
||||
* @param[out] error Log error messages.
|
||||
* @return ob_frame* Return the color frame.
|
||||
*/
|
||||
ob_frame *ob_frameset_color_frame(ob_frame *frameset, ob_error **error);
|
||||
|
||||
/**
|
||||
* \if English
|
||||
* @brief Get the infrared frame from the frameset
|
||||
* @brief Get the infrared frame from the frameset.
|
||||
*
|
||||
* @param[in] frameset Frameset object
|
||||
* @param[out] error Log error messages
|
||||
* @return ob_frame* returns the infrared frame
|
||||
* \else
|
||||
* @brief 从帧集合中获取红外帧
|
||||
*
|
||||
* @param[in] frameset 帧集合对象
|
||||
* @param[out] error 记录错误信息
|
||||
* @return ob_frame* 返回红外帧
|
||||
* \endif
|
||||
* @param[in] frameset Frameset object.
|
||||
* @param[out] error Log error messages.
|
||||
* @return ob_frame* Return the infrared frame.
|
||||
*/
|
||||
ob_frame *ob_frameset_ir_frame(ob_frame *frameset, ob_error **error);
|
||||
|
||||
/**
|
||||
* \if English
|
||||
* @brief Get point cloud data from the frameset
|
||||
* @brief Get point cloud data from the frameset.
|
||||
*
|
||||
* @param[in] frameset Frameset object
|
||||
* @param[out] error Log error messages
|
||||
* @return ob_frame* returns the point cloud frame
|
||||
* \else
|
||||
* @brief 从帧集合中获取点云数据
|
||||
*
|
||||
* @param[in] frameset 帧集合对象
|
||||
* @param[out] error 记录错误信息
|
||||
* @return ob_frame* 返回点云帧
|
||||
* \endif
|
||||
* @param[in] frameset Frameset object.
|
||||
* @param[out] error Log error messages.
|
||||
* @return ob_frame* Return the point cloud frame.
|
||||
*/
|
||||
ob_frame *ob_frameset_points_frame(ob_frame *frameset, ob_error **error);
|
||||
|
||||
/**
|
||||
* 获取指定类型的frame
|
||||
* @brief Get a frame of a specific type from the frameset.
|
||||
*
|
||||
* @param[in] frameset Frameset object.
|
||||
* @param[in] frame_type Frame type.
|
||||
* @param[out] error Log error messages.
|
||||
* @return ob_frame* Return the frame of the specified type, or nullptr if it does not exist.
|
||||
*/
|
||||
ob_frame *ob_frameset_get_frame(ob_frame *frameset, ob_frame_type frame_type, ob_error **error);
|
||||
|
||||
/**
|
||||
* \if English
|
||||
* @brief Get accelerometer frame data
|
||||
* @brief Get accelerometer frame data.
|
||||
*
|
||||
* @param[in] frame Accelerometer frame
|
||||
* @param[out] error Log error messages
|
||||
* @return ob_accel_value accelerometer data
|
||||
* \else
|
||||
* @brief 获取加速度帧数据
|
||||
*
|
||||
* @param[in] frame 加速度帧
|
||||
* @param[out] error 记录错误信息
|
||||
* @return ob_accel_value 加速度数据
|
||||
* \endif
|
||||
* @param[in] frame Accelerometer frame.
|
||||
* @param[out] error Log error messages.
|
||||
* @return ob_accel_value Return the accelerometer data.
|
||||
*/
|
||||
ob_accel_value ob_accel_frame_value(ob_frame *frame, ob_error **error);
|
||||
|
||||
/**
|
||||
* \if English
|
||||
* @brief Get the temperature when acquiring the accelerometer frame
|
||||
* @brief Get the temperature when acquiring the accelerometer frame.
|
||||
*
|
||||
* @param[in] frame Accelerometer frame
|
||||
* @param[out] error Log error messages
|
||||
* @return float return value
|
||||
* \else
|
||||
* @brief 获取加速度帧采样时温度
|
||||
*
|
||||
* @param[in] frame 加速度帧
|
||||
* @param[out] error 记录错误信息
|
||||
* @return float 返回数值
|
||||
* \endif
|
||||
* @param[in] frame Accelerometer frame.
|
||||
* @param[out] error Log error messages.
|
||||
* @return float Return the temperature value.
|
||||
*/
|
||||
float ob_accel_frame_temperature(ob_frame *frame, ob_error **error);
|
||||
|
||||
/**
|
||||
* \if English
|
||||
* @brief Get gyroscope frame data
|
||||
* @brief Get gyroscope frame data.
|
||||
*
|
||||
* @param[in] frame Gyro Frame
|
||||
* @param[out] error Log error messages
|
||||
* @return ob_gyro_value gyroscope data
|
||||
* \else
|
||||
* @brief 获取陀螺仪帧数据
|
||||
*
|
||||
* @param[in] frame 陀螺仪帧
|
||||
* @param[out] error 记录错误信息
|
||||
* @return ob_gyro_value 陀螺仪数据
|
||||
* \endif
|
||||
* @param[in] frame Gyroscope frame.
|
||||
* @param[out] error Log error messages.
|
||||
* @return ob_gyro_value Return the gyroscope data.
|
||||
*/
|
||||
ob_gyro_value ob_gyro_frame_value(ob_frame *frame, ob_error **error);
|
||||
|
||||
/**
|
||||
*\if English
|
||||
* @brief Get the temperature when acquiring the gyroscope frame
|
||||
* @brief Get the temperature when acquiring the gyroscope frame.
|
||||
*
|
||||
* @param[in] frame Accelerometer frame
|
||||
* @param[out] error Log error messages
|
||||
* @return float return value
|
||||
* \else
|
||||
* @brief 获取加速度帧采样时温度
|
||||
*
|
||||
* @param[in] frame 加速度帧
|
||||
* @param[out] error 记录错误信息
|
||||
* @return float 返回数值
|
||||
* \endif
|
||||
* @param[in] frame Gyroscope frame.
|
||||
* @param[out] error Log error messages.
|
||||
* @return float Return the temperature value.
|
||||
*/
|
||||
float ob_gyro_frame_temperature(ob_frame *frame, ob_error **error);
|
||||
|
||||
/**
|
||||
* @brief 增加引用计数
|
||||
* @brief Increase the reference count of a frame object.
|
||||
*
|
||||
* @param[in] frame 要增加引用计数的帧对象
|
||||
* @param[out] error 记录错误信息
|
||||
* @param[in] frame Frame object to increase the reference count.
|
||||
* @param[out] error Log error messages.
|
||||
*/
|
||||
void ob_frame_add_ref(ob_frame *frame, ob_error **error);
|
||||
|
||||
/**
|
||||
* @brief 创建空的帧对象
|
||||
* @brief Create an empty frame object based on the specified parameters.
|
||||
*
|
||||
* @param[in] frame_format 帧格式
|
||||
* @param[in] width 帧宽度
|
||||
* @param[in] height 帧高度
|
||||
* @param[in] stride_bytes 数据行跨度
|
||||
* @param[in] frame_type 帧类型
|
||||
* @param[out] error 记录错误信息
|
||||
* @return ob_frame* 返回创建的帧对象
|
||||
* @param[in] frame_format Frame object format.
|
||||
* @param[in] width Frame object width.
|
||||
* @param[in] height Frame object height.
|
||||
* @param[in] stride_bytes Buffer row span.
|
||||
* @param[in] frame_type Frame object type.
|
||||
* @param[out] error Log error messages.
|
||||
* @return ob_frame* Return an empty frame object.
|
||||
*/
|
||||
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创建帧对象
|
||||
* @brief Create a frame object based on an externally created 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* 返回创建的帧对象
|
||||
* @param[in] frame_format Frame object format.
|
||||
* @param[in] frame_width Frame object width.
|
||||
* @param[in] frame_height Frame object height.
|
||||
* @param[in] buffer Frame object buffer.
|
||||
* @param[in] buffer_size Frame object buffer size.
|
||||
* @param[in] buffer_destroy_cb Destroy callback.
|
||||
* @param[in] buffer_destroy_context Destroy context.
|
||||
* @param[out] error Log error messages.
|
||||
* @return ob_frame* Return the frame object.
|
||||
*/
|
||||
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 创建空的帧集合
|
||||
* @brief Create an empty frameset object.
|
||||
*
|
||||
* @param[out] error 记录错误信息
|
||||
* @return ob_frame* 返回创建的帧集合对象
|
||||
* @param[out] error Log error messages.
|
||||
* @return ob_frame* Return the frameset object.
|
||||
*/
|
||||
ob_frame *ob_create_frameset(ob_error **error);
|
||||
|
||||
/**
|
||||
* @brief push帧
|
||||
* @brief Add a frame of the specified type to the frameset.
|
||||
*
|
||||
* @param[in] frameset 帧集合对象
|
||||
* @param[in] type 帧类型
|
||||
* @param[in] frame 帧对象
|
||||
* @param[out] error 记录错误信息
|
||||
* @param[in] frameset Frameset object.
|
||||
* @param[in] type Type of frame to add.
|
||||
* @param[in] frame Frame object to add.
|
||||
* @param[out] error Log error messages.
|
||||
*/
|
||||
void ob_frameset_push_frame(ob_frame *frameset, ob_frame_type type, ob_frame *frame, ob_error **error);
|
||||
|
||||
/**
|
||||
* @brief 设置帧的系统时间戳
|
||||
* @brief Set the system timestamp of a frameset object.
|
||||
*
|
||||
* @param[in] frame 设置的帧对象
|
||||
* @param[in] systemTimestamp 设置的系统时间戳
|
||||
* @param[out] error 记录错误信息
|
||||
* @param[in] frame Frameset object to set the system timestamp for.
|
||||
* @param[in] system_timestamp System timestamp to set in milliseconds.
|
||||
* @param[out] error Log error messages.
|
||||
*/
|
||||
void ob_frame_set_system_time_stamp(ob_frame *frame, uint64_t system_timestamp, ob_error **error);
|
||||
|
||||
/**
|
||||
* @brief 设置帧的设备时间戳
|
||||
* @brief Set the device timestamp of a frameset object.
|
||||
*
|
||||
* @param[in] frame 设置的帧对象
|
||||
* @param[in] deviceTimestamp 设置的设备时间戳
|
||||
* @param[out] error 记录错误信息
|
||||
* @param[in] frame Frameset object to set the device timestamp.
|
||||
* @param[in] device_timestamp Device timestamp to set in milliseconds.
|
||||
* @param[out] error Log error messages.
|
||||
*/
|
||||
void ob_frame_set_device_time_stamp(ob_frame *frame, uint64_t device_timestamp, ob_error **error);
|
||||
|
||||
/**
|
||||
* @brief 设置帧的设备时间戳
|
||||
* @brief Set the device timestamp of a frameset object.
|
||||
*
|
||||
* @param[in] frame 设置的帧对象
|
||||
* @param[in] deviceTimestampUs 设置的设备时间戳(Us)
|
||||
* @param[out] error 记录错误信息
|
||||
* @param[in] frame Frameset object to set the device timestamp for.
|
||||
* @param[in] device_timestamp_us Device timestamp to set in microseconds.
|
||||
* @param[out] error Log error messages.
|
||||
*/
|
||||
void ob_frame_set_device_time_stamp_us(ob_frame *frame, uint64_t device_timestamp_us, ob_error **error);
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,13 +1,8 @@
|
||||
/**
|
||||
* \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
|
||||
* @file Pipeline.h
|
||||
* @brief SDK的高级API,可以快速实现开关流,帧同步,软件滤波等功能,适用于应用,算法重点关于rgbd数据流场景。如果对实时性或需要单独
|
||||
* 处理的同步,对齐的场景。请使用Device的Lower API的接口。
|
||||
* \endif
|
||||
* Please use the interface of Device's Lower API.
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
@@ -18,556 +13,295 @@ extern "C" {
|
||||
#include "ObTypes.h"
|
||||
|
||||
/**
|
||||
* \if English
|
||||
* @brief Create a pipeline object
|
||||
*
|
||||
* @param[out] error Log error messages
|
||||
* @return ob_pipeline* returns the pipeline object
|
||||
* \else
|
||||
* @brief 创建pipeline对象
|
||||
*
|
||||
* @param[out] error 记录错误信息
|
||||
* @return ob_pipeline* 返回pipeline对象
|
||||
* \endif
|
||||
* @return ob_pipeline* return the pipeline object
|
||||
*/
|
||||
ob_pipeline *ob_create_pipeline(ob_error **error);
|
||||
|
||||
/**
|
||||
* \if English
|
||||
* @brief Using device objects to create pipeline objects
|
||||
*
|
||||
* @param[in] dev Device object used to create pipeline
|
||||
* @param[out] error Log error messages
|
||||
* @return ob_pipeline* returns the pipeline object
|
||||
* \else
|
||||
* @brief 使用设备对象来创建pipeline对象
|
||||
*
|
||||
* @param[in] dev 用于创建pipeline的设备对象
|
||||
* @param[out] error 记录错误信息
|
||||
* @return ob_pipeline* 返回pipeline对象
|
||||
* \endif
|
||||
* @return ob_pipeline* return the pipeline object
|
||||
*/
|
||||
ob_pipeline *ob_create_pipeline_with_device(ob_device *dev, ob_error **error);
|
||||
|
||||
/**
|
||||
* \if English
|
||||
* @brief Use the playback file to create a pipeline object
|
||||
*
|
||||
* @param[in] file_name The playback file path used to create the pipeline
|
||||
* @param[out] error Log error messages
|
||||
* @return ob_pipeline* returns the pipeline object
|
||||
* \else
|
||||
* @brief 使用回放文件来创建pipeline对象
|
||||
*
|
||||
* @param[in] file_name 用于创建pipeline的回放文件路径
|
||||
* @param[out] error 记录错误信息
|
||||
* @return ob_pipeline* 返回pipeline对象
|
||||
* \endif
|
||||
* @return ob_pipeline* return the pipeline object
|
||||
*/
|
||||
ob_pipeline *ob_create_pipeline_with_playback_file(const char *file_name, ob_error **error);
|
||||
|
||||
/**
|
||||
* \if English
|
||||
* @brief Delete pipeline objects
|
||||
*
|
||||
* @param[in] pipeline The pipeline object to be deleted
|
||||
* @param[out] error Log error messages
|
||||
* \else
|
||||
* @brief 删除pipeline对象
|
||||
*
|
||||
* @param[in] pipeline 要删除的pipeline对象
|
||||
* @param[out] error 记录错误信息
|
||||
* \endif
|
||||
*/
|
||||
void ob_delete_pipeline(ob_pipeline *pipeline, ob_error **error);
|
||||
|
||||
/**
|
||||
* \if English
|
||||
* @brief Start the pipeline with default parameters
|
||||
*
|
||||
* @param[in] pipeline pipeline object
|
||||
* @param[out] error Log error messages
|
||||
* \else
|
||||
* @brief 以默认参数启动pipeline
|
||||
*
|
||||
* @param[in] pipeline pipeline对象
|
||||
* @param[out] error 记录错误信息
|
||||
* \endif
|
||||
*/
|
||||
void ob_pipeline_start(ob_pipeline *pipeline, ob_error **error);
|
||||
|
||||
/**
|
||||
* \if English
|
||||
* @brief Start the pipeline with configuration parameters
|
||||
*
|
||||
* @param[in] pipeline pipeline object
|
||||
* @param[in] config Parameters to be configured
|
||||
* @param[out] error Log error messages
|
||||
* \else
|
||||
* @brief 启动pipeline并配置参数
|
||||
*
|
||||
* @param[in] pipeline pipeline对象
|
||||
* @param[in] config 要配置的参数
|
||||
* @param[out] error 记录错误信息
|
||||
* \endif
|
||||
*/
|
||||
void ob_pipeline_start_with_config(ob_pipeline *pipeline, ob_config *config, ob_error **error);
|
||||
|
||||
/**
|
||||
* \if English
|
||||
* @brief Start the pipeline and set the frame collection data callback
|
||||
*
|
||||
* @param[in] pipeline pipeline object
|
||||
* @param[in] config Parameters to be configured
|
||||
* @param[in] callback Trigger a callback when all frame data in the frame set arrives
|
||||
* @param[in] callback Trigger a callback when all frame data in the frameset arrives
|
||||
* @param[in] user_data Pass in any user data and get it from the callback
|
||||
* @param[out] error Log error messages
|
||||
* \else
|
||||
* @brief 启动pipeline并设置帧集合数据回调
|
||||
*
|
||||
* @param[in] pipeline pipeline对象
|
||||
* @param[in] config 要配置的参数
|
||||
* @param[in] callback 帧集合中的所有帧数据都到达时触发回调
|
||||
* @param[in] user_data 可以传入任意用户数据,并从回调中获取
|
||||
* @param[out] error 记录错误信息
|
||||
* \endif
|
||||
*/
|
||||
void ob_pipeline_start_with_callback(ob_pipeline *pipeline, ob_config *config, ob_frameset_callback callback, void *user_data, ob_error **error);
|
||||
|
||||
/**
|
||||
* \if English
|
||||
* @brief Stop pipeline
|
||||
*
|
||||
* @param[in] pipeline pipeline object
|
||||
* @param[out] error Log error messages
|
||||
* \else
|
||||
* @brief 停止pipeline
|
||||
*
|
||||
* @param[in] pipeline pipeline对象
|
||||
* @param[out] error 记录错误信息
|
||||
* \endif
|
||||
*/
|
||||
void ob_pipeline_stop(ob_pipeline *pipeline, ob_error **error);
|
||||
|
||||
/**
|
||||
* \if English
|
||||
* @brief Get current pipeline parameters
|
||||
* @brief Get the configuration object associated with the pipeline
|
||||
*
|
||||
* @param[in] pipeline pipeline object
|
||||
* @param[in] pipeline The pipeline object
|
||||
* @param[out] error Log error messages
|
||||
* @return ob_config* returns pipeline parameters
|
||||
* \else
|
||||
* @brief 获取pipeline当前参数
|
||||
*
|
||||
* @param[in] pipeline pipeline对象
|
||||
* @param[out] error 记录错误信息
|
||||
* @return ob_config* 返回pipeline参数
|
||||
* \endif
|
||||
* @return ob_config* The configuration object
|
||||
*/
|
||||
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 Wait for a set of frames to be returned synchronously
|
||||
*
|
||||
* @param[in] pipeline pipeline object
|
||||
* @param[in] timeout_ms Waiting timeout (ms)
|
||||
* @param[in] pipeline The pipeline object
|
||||
* @param[in] timeout_ms The timeout for waiting (in milliseconds)
|
||||
* @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
|
||||
* @brief 以同步阻塞的形式等待返回一组帧集合
|
||||
*
|
||||
* @param[in] pipeline pipeline对象
|
||||
* @param[in] timeout_ms 等待超时时间(毫秒)
|
||||
* @param[out] error 记录错误信息
|
||||
* @return ob_frame* 返回等待的帧集合frameset,frameset是特殊的frame,可以使用frameset相关接口获取集合内的独立frame
|
||||
* \endif
|
||||
* @return ob_frame* The frameset that was waited for. A frameset is a special frame that can be used to obtain independent frames from the set.
|
||||
*/
|
||||
ob_frame *ob_pipeline_wait_for_frameset(ob_pipeline *pipeline, uint32_t timeout_ms, ob_error **error);
|
||||
|
||||
/**
|
||||
* \if English
|
||||
* @brief Get device from the pipeline
|
||||
* @brief Get the device object associated with the pipeline
|
||||
*
|
||||
* @param[in] pipeline pipeline object
|
||||
* @param[in] pipeline The pipeline object
|
||||
* @param[out] error Log error messages
|
||||
* @return ob_device* returns the device object
|
||||
* \else
|
||||
* @brief 从pipeline中获取设备
|
||||
*
|
||||
* @param[in] pipeline pipeline对象
|
||||
* @param[out] error 记录错误信息
|
||||
* @return ob_device* 返回设备对象
|
||||
* \endif
|
||||
* @return ob_device* The device object
|
||||
*/
|
||||
ob_device *ob_pipeline_get_device(ob_pipeline *pipeline, ob_error **error);
|
||||
|
||||
/**
|
||||
* \if English
|
||||
* @brief Get playback object from pipeline
|
||||
* @brief Get the playback object associated with the pipeline
|
||||
*
|
||||
* @param[in] pipeline pipeline objet
|
||||
* @param[in] pipeline The pipeline object
|
||||
* @param[out] error Log error messages
|
||||
* @return ob_playback* returns the playback object
|
||||
* \else
|
||||
* @brief 从pipeline中获取回放对象
|
||||
*
|
||||
* @param[in] pipeline pipeline对象
|
||||
* @param[out] error 记录错误信息
|
||||
* @return ob_playback* 返回回放对象
|
||||
* \endif
|
||||
* @return ob_playback* The playback object
|
||||
*/
|
||||
ob_playback *ob_pipeline_get_playback(ob_pipeline *pipeline, ob_error **error);
|
||||
|
||||
/**
|
||||
* \if English
|
||||
* @brief Get stream profile from the pipeline
|
||||
* @brief Get the stream profile list associated with 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
|
||||
* @param[out] profile_count The number of stream configurations obtained
|
||||
* @param[in] pipeline The pipeline object
|
||||
* @param[in] sensorType The sensor type. The supported sensor types can be obtained through the ob_device_get_sensor_list() interface.
|
||||
* @param[out] error Log error messages
|
||||
* @return ob_stream_profile_list* returns to the stream profile list
|
||||
* \else
|
||||
* @brief 获取传感器相应的流配置
|
||||
*
|
||||
* @param[in] pipeline pipeline对象
|
||||
* @param[in] sensor_type 传感器类型 ,相机支持的sensor_type类型可通过ob_device_get_sensor_list()接口获知
|
||||
* @param[out] profile_count 获取的流配置数量
|
||||
* @param[out] error 记录错误信息
|
||||
* @return ob_stream_profile_list* 返回流配置列表
|
||||
* \endif
|
||||
* @return ob_stream_profile_list* The stream profile list
|
||||
*/
|
||||
ob_stream_profile_list *ob_pipeline_get_stream_profile_list(ob_pipeline *pipeline, ob_sensor_type sensorType, ob_error **error);
|
||||
|
||||
/**
|
||||
* \if English
|
||||
* @brief Enable frame synchronization
|
||||
*
|
||||
* @param[in] pipeline pipeline object
|
||||
* @param[in] pipeline The pipeline object
|
||||
* @param[out] error Log error messages
|
||||
* \else
|
||||
* @brief 打开帧同步功能
|
||||
*
|
||||
* @param[in] pipeline pipeline对象
|
||||
* @param[out] error 记录错误信息
|
||||
* \endif
|
||||
*/
|
||||
void ob_pipeline_enable_frame_sync(ob_pipeline *pipeline, ob_error **error);
|
||||
|
||||
/**
|
||||
* \if English
|
||||
* @brief Disable frame synchronization
|
||||
*
|
||||
* @param[in] pipeline pipeline object
|
||||
* @param[in] pipeline The pipeline object
|
||||
* @param[out] error Log error messages
|
||||
* \else
|
||||
* @brief 关闭帧同步功能
|
||||
*
|
||||
* @param[in] pipeline pipeline对象
|
||||
* @param[out] error 记录错误信息
|
||||
* \endif
|
||||
*/
|
||||
void ob_pipeline_disable_frame_sync(ob_pipeline *pipeline, ob_error **error);
|
||||
|
||||
/**
|
||||
* \if English
|
||||
* @brief Dynamically switch the corresponding config configuration
|
||||
* @brief Dynamically switch the corresponding configuration
|
||||
*
|
||||
* @param[in] pipeline pipeline object
|
||||
* @param[in] config pipeline configuration
|
||||
* @param[in] pipeline The pipeline object
|
||||
* @param[in] config The pipeline configuration
|
||||
* @param[out] error Log error messages
|
||||
* \else
|
||||
* @brief 动态切换对应的config配置
|
||||
*
|
||||
* @param[in] pipeline pipeline对象
|
||||
* @param[in] config pipeline的配置
|
||||
* @param[out] error 记录错误信息
|
||||
* \endif
|
||||
*/
|
||||
void ob_pipeline_switch_config(ob_pipeline *pipeline, ob_config *config, ob_error **error);
|
||||
|
||||
/**
|
||||
* \if English
|
||||
* @brief Get current camera parameters
|
||||
* @attention If D2C is enabled, it will return the camera parameters after D2C, if not, it will return to the default parameters
|
||||
* @brief Get the current camera parameters
|
||||
*
|
||||
* @param[in] pipeline pipeline object
|
||||
* @attention If D2C is enabled, it will return the camera parameters after D2C. Otherwise, it will return the default parameters.
|
||||
*
|
||||
* @param[in] pipeline The pipeline object
|
||||
* @param[out] error Log error messages
|
||||
* @return ob_camera_param returns camera internal parameters
|
||||
* \else
|
||||
* @brief 获取当前相机参数
|
||||
* @attention 如果开启了D2C将返回D2C后的相机参数
|
||||
*
|
||||
* @param[in] pipeline pipeline对象
|
||||
* @param[out] error 记录错误信息
|
||||
* @return ob_camera_param 返回相机内参
|
||||
* \endif
|
||||
* @return ob_camera_param The camera internal parameters
|
||||
*/
|
||||
ob_camera_param ob_pipeline_get_camera_param(ob_pipeline *pipeline, ob_error **error);
|
||||
|
||||
/**
|
||||
* \if English
|
||||
* @brief Returns a list of D2C-enabled depth sensor resolutions corresponding to the input color sensor resolution
|
||||
* @brief Return 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
|
||||
* @param[in] align_mode Input align mode
|
||||
* @param[in] pipeline The pipeline object
|
||||
* @param[in] color_profile The input profile of the color sensor
|
||||
* @param[in] align_mode The input align mode
|
||||
* @param[out] error Log error messages
|
||||
* @return ob_stream_profile_list*
|
||||
* \else
|
||||
* @brief 返回与输入的彩色传感器分辨率对应的支持D2C的深度传感器分辨率列表
|
||||
*
|
||||
* @param[in] pipeline pipeline对象
|
||||
* @param[in] color_profile 输入的Color Sensor的分辨率
|
||||
* @param[in] align_mode 输入的对齐模式
|
||||
* @param[out] error 记录错误信息
|
||||
* @return ob_stream_profile_list*
|
||||
* \endif
|
||||
* @return ob_stream_profile_list* The list of D2C-enabled depth sensor resolutions
|
||||
*/
|
||||
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 (DEPRECATED)
|
||||
* @brief Get the valid area after D2C (DEPRECATED)
|
||||
*
|
||||
* @param[in] pipeline pipeline object
|
||||
* @param[in] distance working distance
|
||||
* @param[in] pipeline The pipeline object
|
||||
* @param[in] distance The working distance
|
||||
* @param[out] error Log error messages
|
||||
* @return ob_rect returns the area information valid after D2C at working distance
|
||||
* \else
|
||||
* @brief 获取D2C后有效的区域 (废弃接口)
|
||||
*
|
||||
* @param[in] pipeline pipeline对象
|
||||
* @param[in] distance 工作距离
|
||||
* @param[out] error 记录错误信息
|
||||
* @return ob_rect 返回在工作距离下D2C后有效的区域信息
|
||||
* \endif
|
||||
* @return ob_rect The area information that is valid after D2C at the working distance
|
||||
*/
|
||||
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
|
||||
* @brief Get the valid area between the 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[in] pipeline The pipeline object
|
||||
* @param[in] minimum_distance The minimum working distance
|
||||
* @param[in] maximum_distance The 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
|
||||
* @return ob_rect The area information that is valid after D2C at the working distance
|
||||
*/
|
||||
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
|
||||
*
|
||||
* @param[in] pipeline pipeline object
|
||||
* @param[in] file_name Recorded file path
|
||||
* @param[in] pipeline The pipeline object
|
||||
* @param[in] file_name The recorded file path
|
||||
* @param[out] error Log error messages
|
||||
* \else
|
||||
* @brief 开启录制
|
||||
*
|
||||
* @param[in] pipeline pipeline对象
|
||||
* @param[in] file_name 录制的文件路径
|
||||
* @param[out] error 记录错误信息
|
||||
* \endif
|
||||
*/
|
||||
void ob_pipeline_start_record(ob_pipeline *pipeline, const char *file_name, ob_error **error);
|
||||
|
||||
/**
|
||||
* \if English
|
||||
* @brief Turn off recording
|
||||
* @brief Stop recording
|
||||
*
|
||||
* @param[in] pipeline pipeline object
|
||||
* @param[in] pipeline The pipeline object
|
||||
* @param[out] error Log error messages
|
||||
* \else
|
||||
* @brief 关闭录制
|
||||
*
|
||||
* @param[in] pipeline pipeline对象
|
||||
* @param[out] error 记录错误信息
|
||||
* \endif
|
||||
*/
|
||||
|
||||
void ob_pipeline_stop_record(ob_pipeline *pipeline, ob_error **error);
|
||||
|
||||
/**
|
||||
* \if English
|
||||
* @brief Create the pipeline configuration
|
||||
*
|
||||
* @param[out] error Log error messages
|
||||
* @return ob_config* returns the configuration object
|
||||
* \else
|
||||
* @brief 创建pipeline的配置
|
||||
*
|
||||
* @param[out] error 记录错误信息
|
||||
* @return ob_config* 返回配置对象
|
||||
* \endif
|
||||
* @param[out] error Log error messages
|
||||
* @return ob_config* The configuration object
|
||||
*/
|
||||
ob_config *ob_create_config(ob_error **error);
|
||||
|
||||
/**
|
||||
* \if English
|
||||
* @brief Delete the pipeline configuration
|
||||
*
|
||||
* @param[in] config Configuration to be deleted
|
||||
* @param[out] error Log error messages
|
||||
* \else
|
||||
* @brief 删除pipeline的配置
|
||||
*
|
||||
* @param[in] config 要删除的配置
|
||||
* @param[out] error 记录错误信息
|
||||
* \endif
|
||||
* @param[in] config The configuration to be deleted
|
||||
* @param[out] error Log error messages
|
||||
*/
|
||||
void ob_delete_config(ob_config *config, ob_error **error);
|
||||
|
||||
/**
|
||||
* \if English
|
||||
* @brief Configure the stream to be enabled
|
||||
* @brief Enable the specified stream in the pipeline configuration
|
||||
*
|
||||
* @param[in] config Configuration of pipeline
|
||||
* @param[in] profile The configuration of the stream to be opened
|
||||
* @param[in] config The pipeline configuration
|
||||
* @param[in] profile The stream configuration to be enabled
|
||||
* @param[out] error Log error messages
|
||||
* \else
|
||||
* @brief 配置要打开的流
|
||||
*
|
||||
* @param[in] config pipeline的配置
|
||||
* @param[in] profile 要打开的流的配置
|
||||
* @param[out] error 记录错误信息
|
||||
* \endif
|
||||
*/
|
||||
void ob_config_enable_stream(ob_config *config, ob_stream_profile *profile, ob_error **error);
|
||||
|
||||
/**
|
||||
* \if English
|
||||
* @brief Configure all streams to be enabled
|
||||
* @brief Enable all streams in the pipeline configuration
|
||||
*
|
||||
* @param[in] config Configuration of pipeline
|
||||
* @param[out] error Log error messages
|
||||
* \else
|
||||
* @brief 配置打开所有的流
|
||||
*
|
||||
* @param[in] config pipeline的配置
|
||||
* @param[out] error 记录错误信息
|
||||
* \endif
|
||||
* @param[in] config The pipeline configuration
|
||||
* @param[out] error Log error messages
|
||||
*/
|
||||
void ob_config_enable_all_stream(ob_config *config, ob_error **error);
|
||||
|
||||
/**
|
||||
* \if English
|
||||
* @brief Configure the stream to be disabled
|
||||
* @brief Disable a specific stream in the pipeline configuration
|
||||
*
|
||||
* @param[in] config Configuration of pipeline
|
||||
* @param[in] profile The configuration of the stream to be closed
|
||||
* @param[in] config The pipeline configuration
|
||||
* @param[in] type The type of stream to be disabled
|
||||
* @param[out] error Log error messages
|
||||
* \else
|
||||
* @brief 配置要关闭的流
|
||||
*
|
||||
* @param[in] config pipeline的配置
|
||||
* @param[in] profile 要关闭的流的配置
|
||||
* @param[out] error 记录错误信息
|
||||
* \endif
|
||||
*/
|
||||
void ob_config_disable_stream(ob_config *config, ob_stream_type type, ob_error **error);
|
||||
|
||||
/**
|
||||
* \if English
|
||||
* @brief Configure all streams to be disabled
|
||||
* @brief Disable all streams in the pipeline configuration
|
||||
*
|
||||
* @param[in] config Configuration of pipeline
|
||||
* @param[in] config The pipeline configuration
|
||||
* @param[out] error Log error messages
|
||||
* \else
|
||||
* @brief 配置关闭所有的流
|
||||
*
|
||||
* @param[in] config pipeline的配置
|
||||
* @param[out] error 记录错误信息
|
||||
* \endif
|
||||
*/
|
||||
void ob_config_disable_all_stream(ob_config *config, ob_error **error);
|
||||
|
||||
/**
|
||||
* \if English
|
||||
* @brief Set the alignment mode
|
||||
* @brief Set the alignment mode for the pipeline configuration
|
||||
*
|
||||
* @param[in] config config object
|
||||
* @param[in] mode alignment mode
|
||||
* @param[in] config The pipeline configuration
|
||||
* @param[in] mode The alignment mode to be set
|
||||
* @param[out] error Log error messages
|
||||
* \else
|
||||
* @brief 设置对齐模式
|
||||
*
|
||||
* @param[in] config config对象
|
||||
* @param[in] mode 对齐模式
|
||||
* @param[out] error 记录错误信息
|
||||
* \endif
|
||||
*/
|
||||
void ob_config_set_align_mode(ob_config *config, ob_align_mode mode, ob_error **error);
|
||||
|
||||
/**
|
||||
* \if English
|
||||
* @brief Whether the depth needs to be scaled after setting D2C
|
||||
* @brief Set whether depth scaling is required after setting D2C
|
||||
*
|
||||
* @param[in] config config object
|
||||
* @param[in] config The pipeline configuration
|
||||
* @param[in] enable Whether scaling is required
|
||||
* @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 Set the D2C target resolution, which is applicable to cases where the Color stream is not enabled using the OrbbecSDK and the depth needs to be D2C
|
||||
* Note: When you use OrbbecSDK to enable the Color stream, you also use this interface to set the D2C target resolution. The configuration of the enabled Color
|
||||
* stream is preferred for D2C
|
||||
* @brief Set the target resolution for D2C, which is applicable when the color stream is not enabled using the OrbbecSDK and the depth needs to be D2C
|
||||
* Note: When using the OrbbecSDK to enable the color stream, this interface should also be used to set the D2C target resolution. The configuration of the
|
||||
* enabled color stream is preferred for D2C.
|
||||
*
|
||||
* @param[in] config config object
|
||||
* @param[in] d2c_target_width The D2C target has a wide resolution
|
||||
* @param[in] d2c_target_height The D2C targets has a high resolution
|
||||
* @param[in] config The pipeline configuration
|
||||
* @param[in] d2c_target_width The target width for D2C
|
||||
* @param[in] d2c_target_height The target height for D2C
|
||||
* @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);
|
||||
|
||||
/**
|
||||
* \if English
|
||||
* @brief Frame aggregation output mode
|
||||
* @brief Set the frame aggregation output mode for the pipeline configuration
|
||||
* @brief The processing strategy when the FrameSet generated by the frame aggregation function does not contain the frames of all opened streams (which
|
||||
* can be caused by different frame rates of each stream, or by the loss of frames of one stream): drop directly or output to the user
|
||||
* can be caused by different frame rates of each stream, or by the loss of frames of one stream): drop directly or output to the user.
|
||||
*
|
||||
* @param config config object
|
||||
* @param mode frame aggregation output mode(default mode is @ref OB_FRAME_AGGREGATE_OUTPUT_ANY_SITUATION)
|
||||
* @param error Log error messages
|
||||
* \else
|
||||
* @brief 数据帧汇聚输出模式
|
||||
* @brief 用于控制帧汇聚功能生成的FrameSet不包含所有已开启数据流的数据帧时(各路流帧率不同、或者某路流丢帧会导致这样的情况)的处理策略:直接丢弃或者输出给用户
|
||||
*
|
||||
* @param config config对象
|
||||
* @param mode 数据帧汇聚输出模式(默认模式为 @ref OB_FRAME_AGGREGATE_OUTPUT_ANY_SITUATION)
|
||||
* @param error 记录错误信息
|
||||
* \endif
|
||||
* @param[in] config The pipeline configuration
|
||||
* @param[in] mode The frame aggregation output mode to be set (default mode is @ref OB_FRAME_AGGREGATE_OUTPUT_ANY_SITUATION)
|
||||
* @param[out] error Log error messages
|
||||
*/
|
||||
void ob_config_set_frame_aggregate_output_mode(ob_config *config, ob_frame_aggregate_output_mode mode, ob_error **error);
|
||||
|
||||
|
||||
@@ -2,13 +2,8 @@
|
||||
// Copyright(c) 2020 Orbbec Corporation. All Rights Reserved.
|
||||
|
||||
/**
|
||||
* \if English
|
||||
* @file Property.h
|
||||
* @brief Control command property list maintenance
|
||||
* \else
|
||||
* @file Property.h
|
||||
* @brief 控制命令属性列表维护
|
||||
* \endif
|
||||
*/
|
||||
|
||||
#ifdef OB_SENSOR_SDK_DEVELOPER
|
||||
@@ -24,173 +19,590 @@ extern "C" {
|
||||
#endif
|
||||
|
||||
/**
|
||||
* \if English
|
||||
* @brief Enumeration value describing all attribute control commands of the device
|
||||
* \else
|
||||
* @brief 描述设备所有的属性控制命令的枚举值
|
||||
* \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_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 */
|
||||
/**
|
||||
* @brief LDP switch
|
||||
*/
|
||||
OB_PROP_LDP_BOOL = 2,
|
||||
|
||||
OB_PROP_DEVICE_WORK_MODE_INT = 95, /**< \if English Device operating mode (power consumption) \else 设备工作模式(功耗) \endif */
|
||||
OB_PROP_DEVICE_COMMUNICATION_TYPE_INT = 97, /**< \if English Device communication type, 0: USB; 1: Ethernet(RTSP) \else 设备通信方式 0: USB; 1: Ethernet(RTSP)*/
|
||||
OB_PROP_SWITCH_IR_MODE_INT = 98, /**< \if English Switch IR mode, 0: IR active mode, 1: IR passive mode \else 切换IR模式,0为主动IR模式,1为被动IR模式 \endif */
|
||||
OB_PROP_LASER_ENERGY_LEVEL_INT = 99, /**< \if English Laser energy level \else 激光能量层级 \endif */
|
||||
OB_PROP_LDP_MEASURE_DISTANCE_INT = 100, /**< \if English LDP's measure distance, unit: mm \else 获取激光近距离保护的测量值,单位:mm \endif */
|
||||
OB_PROP_TIMER_RESET_SIGNAL_BOOL = 104, /**< \if English Reset device time to zero \else 触发设备时间归零 \endif */
|
||||
OB_PROP_TIMER_RESET_TRIGGLE_OUT_ENABLE_BOOL = 105, /**< \if English Enable send reset device time signal to other device. true: enable, false: disable \else 向外发送时间归零信号开关, true:打开, false: 关闭; 默认为true \endif */
|
||||
OB_PROP_TIMER_RESET_DELAY_US_INT = 106, /**< \if English Delay to reset device time, unit: us \else 设置硬件时间归零延迟时间, 单位: 微妙 \endif */
|
||||
OB_PROP_CAPTURE_IMAGE_SIGNAL_BOOL = 107, /**< \if English Signal to capture image \else 软触发信号, 触发抓拍图片 \endif */
|
||||
OB_PROP_IR_RIGHT_MIRROR_BOOL = 112, /**< \if English Right IR sensor mirror state \else 右IR的镜像 \endif */
|
||||
OB_PROP_CAPTURE_IMAGE_FRAME_NUMBER_INT = 113, /**< \if English Number frame to capture once a 'OB_PROP_CAPTURE_IMAGE_SIGNAL_BOOL' effect. range: [1, 255] \else 单次软触发抓拍的帧数, 范围:[1, 255] \endif */
|
||||
OB_PROP_IR_RIGHT_FLIP_BOOL = 114, /**< \if English Right IR sensor flip state. true: flip image, false: origin, default: false \else 右IR的翻转, true:翻转,false:不翻转;默认为false \endif */
|
||||
OB_PROP_COLOR_ROTATE_INT = 115, /**< \if English Color sensor rotation, angle{0, 90, 180, 270} \else 彩色旋转, 翻转角度范围{0, 90, 180, 270}, 默认为0 \endif */
|
||||
OB_PROP_IR_ROTATE_INT = 116, /**< \if English IR/Left-IR sensor rotation, angle{0, 90, 180, 270} \else IR旋转, 翻转角度范围{0, 90, 180, 270}, 默认为0 \endif */
|
||||
OB_PROP_IR_RIGHT_ROTATE_INT = 117, /**< \if English Right IR sensor rotation, angle{0, 90, 180, 270} \else 右IR旋转, 翻转角度范围{0, 90, 180, 270}, 默认为0 \endif */
|
||||
OB_PROP_DEPTH_ROTATE_INT = 118, /**< \if English Depth sensor rotation, angle{0, 90, 180, 270} \else 深度旋转, 翻转角度范围{0, 90, 180, 270}, 默认为0 \endif */
|
||||
OB_PROP_LASER_HW_ENERGY_LEVEL_INT =
|
||||
119, /**< \if Get hardware laser energy level which real state of laser element. OB_PROP_LASER_ENERGY_LEVEL_INT(99)will effect this command which it setting and changed the hardware laser energy level. \else 查询激光硬件的实际能量层级, OB_PROP_LASER_ENERGY_LEVEL_INT(99)指令用于设置能级,该指令用于查询设置后硬件实际能级 \endif*/
|
||||
OB_PROP_USB_POWER_STATE_INT = 121, /**< \if USB's power state, enum type: OBUSBPowerState \else USB供电状态,状态值枚举: OBUSBPowerState \endif */
|
||||
OB_PROP_DC_POWER_STATE_INT = 122, /**< \if DC's power state, enum type: OBDCPowerState \else DC供电状态,状态值枚举: OBDCPowerState \endif */
|
||||
/**
|
||||
* @brief Laser switch
|
||||
*/
|
||||
OB_PROP_LASER_BOOL = 3,
|
||||
|
||||
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_IP_ADDR_CONFIG = 1041, /**< \if English Config device's IP address \else 设备ip地址配置 \endif */
|
||||
OB_STRUCT_CURRENT_DEPTH_ALG_MODE = 1043, /**< \if English Current depth work mode state \else 当前的相机深度模式 \endif */
|
||||
OB_STRUCT_DEPTH_PRECISION_SUPPORT_LIST = 1045, /**< \if English List of depth precision level, return: uint16_t array, unit16_t is value of enum OBDepthPrecisionLevel \else 深度精度等级列表,返回uin16_t数组,对应精度等级的枚举定义,枚举:OBDepthPrecisionLevel \endif */
|
||||
/**
|
||||
* @brief laser pulse width
|
||||
*/
|
||||
OB_PROP_LASER_PULSE_WIDTH_INT = 4,
|
||||
|
||||
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 */
|
||||
OB_PROP_COLOR_GAIN_INT = 2002, /**< \if English Color camera gain adjustment \else 彩色相机增益调节 \endif */
|
||||
OB_PROP_COLOR_AUTO_WHITE_BALANCE_BOOL = 2003, /**< \if English Color camera automatic white balance \else 彩色相机自动白平衡 \endif */
|
||||
OB_PROP_COLOR_WHITE_BALANCE_INT = 2004, /**< \if English Color camera white balance adjustment \else 彩色相机白平衡调节 \endif */
|
||||
OB_PROP_COLOR_BRIGHTNESS_INT = 2005, /**< \if English Color camera brightness adjustment \else 彩色相机亮度调节 \endif */
|
||||
OB_PROP_COLOR_SHARPNESS_INT = 2006, /**< \if English Color camera sharpness adjustment \else 彩色相机锐度调节 \endif */
|
||||
OB_PROP_COLOR_SATURATION_INT = 2008, /**< \if English Color camera saturation adjustment \else 彩色相机饱和度调节 \endif */
|
||||
OB_PROP_COLOR_CONTRAST_INT = 2009, /**< \if English Color camera contrast adjustment \else 彩色相机对比度调节 \endif */
|
||||
OB_PROP_COLOR_GAMMA_INT = 2010, /**< \if English Color camera gamma adjustment \else 彩色相机伽马值调节 \endif */
|
||||
OB_PROP_COLOR_ROLL_INT = 2011, /**< \if English Color camera image rotation\else 彩色相机图像旋转 \endif */
|
||||
OB_PROP_COLOR_AUTO_EXPOSURE_PRIORITY_INT = 2012, /**< \if English Color camera auto exposure priority \else 彩色相机自动曝光优先 \endif */
|
||||
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_GYRO_ODR_INT = 2021, /**< \if English get/set current gyro sample rate \else get/set当前陀螺仪的采样率 \endif */
|
||||
OB_PROP_ACCEL_ODR_INT = 2022, /**< \if English get/set current accel sample rate \else get/set当前加速度计的采样率 \endif */
|
||||
OB_PROP_GYRO_FULL_SCALE_INT = 2023, /**< \if English get/set current gyro full scale range \else get/set当前陀螺仪的量程 \endif */
|
||||
OB_PROP_ACCEL_FULL_SCALE_INT = 2024, /**< \if English get/set current accel full scale range \else get/set当前加速度计的量程 \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_CHANNEL_DATA_SOURCE_INT = 2028, /**< \if English Select Infrared camera data source channel. If not support throw exception. 0 : IR stream from IR Left sensor; 1 : IR stream from IR Left sensor; \else 读写IR通道的输出目标sensor,不支持时返回错误。0: 左侧IR sensor,1: 右侧IR sensor; \endif */
|
||||
OB_PROP_DEPTH_RM_FILTER_BOOL = 2029, /**< 深度效果去畸变, true:打开,false:关闭, 与D2C功能互斥。软硬件D2C开启时,不能使用mask功能 */
|
||||
/**
|
||||
* @brief Laser current (uint: mA)
|
||||
*/
|
||||
OB_PROP_LASER_CURRENT_FLOAT = 5,
|
||||
|
||||
OB_PROP_SDK_DISPARITY_TO_DEPTH_BOOL = 3004, /**< \if English Software disparity to depth \else 视差转深度 \endif */
|
||||
OB_PROP_SDK_DEPTH_FRAME_UNPACK_BOOL =
|
||||
3007, /**< \if English Depth data unpacking function switch (each open stream will be turned on by default, support RLE/Y10/Y11/Y12/Y14 format) \else
|
||||
Depth数据解包功能开关(每次开流都会默认打开,支持RLE/Y10/Y11/Y12/Y14格式) \endif */
|
||||
OB_PROP_SDK_IR_FRAME_UNPACK_BOOL =
|
||||
3008, /**< \if English IR data unpacking function switch (each current will be turned on by default, support RLE/Y10/Y11/Y12/Y14 format) \else
|
||||
Ir数据解包功能开关(每次开流都会默认打开,支持RLE/Y10/Y11/Y12/Y14格式) \endif */
|
||||
OB_PROP_SDK_ACCEL_FRAME_TRANSFORMED_BOOL = 3009, /**< Accel数据转换功能开关(默认打开) */
|
||||
OB_PROP_SDK_GYRO_FRAME_TRANSFORMED_BOOL = 3010, /**< Gyro数据转换功能开关(默认打开) */
|
||||
OB_PROP_SDK_IR_LEFT_FRAME_UNPACK_BOOL = 3011, /**< \if English left IR data unpacking function switch (each open stream will be turned on by default, support RLE/Y10/Y11/Y12/Y14 format)\else [左]Ir数据解包功能开关(每次开流都会默认打开,支持RLE/Y10/Y11/Y12/Y14格式) \endif */
|
||||
OB_PROP_SDK_IR_RIGHT_FRAME_UNPACK_BOOL = 3012, /**< \if English right IR data unpacking function switch (each open stream will be turned on by default, support RLE/Y10/Y11/Y12/Y14 format)\else [右]Ir数据解包功能开关(每次开流都会默认打开,支持RLE/Y10/Y11/Y12/Y14格式) \endif */
|
||||
OB_RAW_DATA_CAMERA_CALIB_JSON_FILE = 4029, /**< 从设备端读取的标定Json文件(Femto Mega, read only)*/
|
||||
/**
|
||||
* @brief IR flood switch
|
||||
*/
|
||||
OB_PROP_FLOOD_BOOL = 6,
|
||||
|
||||
/**
|
||||
* @brief IR flood level
|
||||
*/
|
||||
OB_PROP_FLOOD_LEVEL_INT = 7,
|
||||
|
||||
/**
|
||||
* @brief Depth mirror
|
||||
*/
|
||||
OB_PROP_DEPTH_MIRROR_BOOL = 14,
|
||||
|
||||
/**
|
||||
* @brief Depth flip
|
||||
*/
|
||||
OB_PROP_DEPTH_FLIP_BOOL = 15,
|
||||
|
||||
/**
|
||||
* @brief Depth Postfilter
|
||||
*/
|
||||
OB_PROP_DEPTH_POSTFILTER_BOOL = 16,
|
||||
|
||||
/**
|
||||
* @brief Depth Holefilter
|
||||
*/
|
||||
OB_PROP_DEPTH_HOLEFILTER_BOOL = 17,
|
||||
|
||||
/**
|
||||
* @brief IR mirror
|
||||
*/
|
||||
OB_PROP_IR_MIRROR_BOOL = 18,
|
||||
|
||||
/**
|
||||
* @brief IR flip
|
||||
*/
|
||||
OB_PROP_IR_FLIP_BOOL = 19,
|
||||
|
||||
/**
|
||||
* @brief Minimum depth threshold
|
||||
*/
|
||||
OB_PROP_MIN_DEPTH_INT = 22,
|
||||
|
||||
/**
|
||||
* @brief Maximum depth threshold
|
||||
*/
|
||||
OB_PROP_MAX_DEPTH_INT = 23,
|
||||
|
||||
/**
|
||||
* @brief Software filter switch
|
||||
*/
|
||||
OB_PROP_DEPTH_SOFT_FILTER_BOOL = 24,
|
||||
|
||||
/**
|
||||
* @brief LDP status
|
||||
*/
|
||||
OB_PROP_LDP_STATUS_BOOL = 32,
|
||||
|
||||
/**
|
||||
* @brief soft filter maxdiff param
|
||||
*/
|
||||
OB_PROP_DEPTH_MAX_DIFF_INT = 40,
|
||||
|
||||
/**
|
||||
* @brief soft filter maxSpeckleSize
|
||||
*/
|
||||
OB_PROP_DEPTH_MAX_SPECKLE_SIZE_INT = 41,
|
||||
|
||||
/**
|
||||
* @brief Hardware d2c is on
|
||||
*/
|
||||
OB_PROP_DEPTH_ALIGN_HARDWARE_BOOL = 42,
|
||||
|
||||
/**
|
||||
* @brief Timestamp adjustment
|
||||
*/
|
||||
OB_PROP_TIMESTAMP_OFFSET_INT = 43,
|
||||
|
||||
/**
|
||||
* @brief Hardware distortion switch Rectify
|
||||
*/
|
||||
OB_PROP_HARDWARE_DISTORTION_SWITCH_BOOL = 61,
|
||||
|
||||
/**
|
||||
* @brief Fan mode switch
|
||||
*/
|
||||
OB_PROP_FAN_WORK_MODE_INT = 62,
|
||||
|
||||
/**
|
||||
* @brief Multi-resolution D2C mode
|
||||
*/
|
||||
OB_PROP_DEPTH_ALIGN_HARDWARE_MODE_INT = 63,
|
||||
|
||||
/**
|
||||
* @brief Anti_collusion activation status
|
||||
*/
|
||||
OB_PROP_ANTI_COLLUSION_ACTIVATION_STATUS_BOOL = 64,
|
||||
|
||||
/**
|
||||
* @brief the depth precision level, which may change the depth frame data unit, needs to be confirmed through the ValueScale interface of
|
||||
* DepthFrame
|
||||
*/
|
||||
OB_PROP_DEPTH_PRECISION_LEVEL_INT = 75,
|
||||
|
||||
/**
|
||||
* @brief tof filter range configuration
|
||||
*/
|
||||
OB_PROP_TOF_FILTER_RANGE_INT = 76,
|
||||
|
||||
/**
|
||||
* @brief laser mode, the firmware terminal currently only return 1: IR Drive, 2: Torch
|
||||
*/
|
||||
OB_PROP_LASER_MODE_INT = 79,
|
||||
|
||||
/**
|
||||
* @brief brt2r-rectify function switch (brt2r is a special module on mx6600), 0: Disable, 1: Rectify Enable
|
||||
*/
|
||||
OB_PROP_RECTIFY2_BOOL = 80,
|
||||
|
||||
/**
|
||||
* @brief Color mirror
|
||||
*/
|
||||
OB_PROP_COLOR_MIRROR_BOOL = 81,
|
||||
|
||||
/**
|
||||
* @brief Color flip
|
||||
*/
|
||||
OB_PROP_COLOR_FLIP_BOOL = 82,
|
||||
|
||||
/**
|
||||
* @brief Indicator switch, 0: Disable, 1: Enable
|
||||
*/
|
||||
OB_PROP_INDICATOR_LIGHT_BOOL = 83,
|
||||
|
||||
/**
|
||||
* @brief Disparity to depth switch, 0: off, the depth stream outputs the disparity map; 1. On, the depth stream outputs the depth map.
|
||||
*/
|
||||
OB_PROP_DISPARITY_TO_DEPTH_BOOL = 85,
|
||||
|
||||
/**
|
||||
* @brief BRT function switch (anti-background interference), 0: Disable, 1: Enable
|
||||
*/
|
||||
OB_PROP_BRT_BOOL = 86,
|
||||
|
||||
/**
|
||||
* @brief Watchdog function switch, 0: Disable, 1: Enable
|
||||
*/
|
||||
OB_PROP_WATCHDOG_BOOL = 87,
|
||||
|
||||
/**
|
||||
* @brief External signal trigger restart function switch, 0: Disable, 1: Enable
|
||||
*/
|
||||
OB_PROP_EXTERNAL_SIGNAL_RESET_BOOL = 88,
|
||||
|
||||
/**
|
||||
* @brief Heartbeat monitoring function switch, 0: Disable, 1: Enable
|
||||
*/
|
||||
OB_PROP_HEARTBEAT_BOOL = 89,
|
||||
|
||||
/**
|
||||
* @brief Depth cropping mode device: OB_DEPTH_CROPPING_MODE
|
||||
*/
|
||||
OB_PROP_DEPTH_CROPPING_MODE_INT = 90,
|
||||
|
||||
/**
|
||||
* @brief D2C preprocessing switch (such as RGB cropping), 0: off, 1: on
|
||||
*/
|
||||
OB_PROP_D2C_PREPROCESS_BOOL = 91,
|
||||
|
||||
/**
|
||||
* @brief Custom RGB cropping switch, 0 is off, 1 is on custom cropping, and the ROI cropping area is issued
|
||||
*/
|
||||
OB_PROP_RGB_CUSTOM_CROP_BOOL = 94,
|
||||
|
||||
/**
|
||||
* @brief Device operating mode (power consumption)
|
||||
*/
|
||||
OB_PROP_DEVICE_WORK_MODE_INT = 95,
|
||||
|
||||
/**
|
||||
* @brief Device communication type, 0: USB; 1: Ethernet(RTSP)
|
||||
*/
|
||||
OB_PROP_DEVICE_COMMUNICATION_TYPE_INT = 97,
|
||||
|
||||
/**
|
||||
* @brief Switch infrared imaging mode, 0: active IR mode, 1: passive IR mode
|
||||
*/
|
||||
OB_PROP_SWITCH_IR_MODE_INT = 98,
|
||||
|
||||
/**
|
||||
* @brief Laser energy level
|
||||
*/
|
||||
OB_PROP_LASER_ENERGY_LEVEL_INT = 99,
|
||||
|
||||
/**
|
||||
* @brief LDP's measure distance, unit: mm
|
||||
*/
|
||||
OB_PROP_LDP_MEASURE_DISTANCE_INT = 100,
|
||||
|
||||
/**
|
||||
* @brief Reset device time to zero
|
||||
*/
|
||||
OB_PROP_TIMER_RESET_SIGNAL_BOOL = 104,
|
||||
|
||||
/**
|
||||
* @brief Enable send reset device time signal to other device. true: enable, false: disable
|
||||
*/
|
||||
OB_PROP_TIMER_RESET_TRIGGER_OUT_ENABLE_BOOL = 105,
|
||||
|
||||
/**
|
||||
* @brief Delay to reset device time, unit: us
|
||||
*/
|
||||
OB_PROP_TIMER_RESET_DELAY_US_INT = 106,
|
||||
|
||||
/**
|
||||
* @brief Signal to capture image
|
||||
*/
|
||||
OB_PROP_CAPTURE_IMAGE_SIGNAL_BOOL = 107,
|
||||
|
||||
/**
|
||||
* @brief Right IR sensor mirror state
|
||||
*/
|
||||
OB_PROP_IR_RIGHT_MIRROR_BOOL = 112,
|
||||
|
||||
/**
|
||||
* @brief Number frame to capture once a 'OB_PROP_CAPTURE_IMAGE_SIGNAL_BOOL' effect. range: [1, 255]
|
||||
*/
|
||||
OB_PROP_CAPTURE_IMAGE_FRAME_NUMBER_INT = 113,
|
||||
|
||||
/**
|
||||
* @brief Right IR sensor flip state. true: flip image, false: origin, default: false
|
||||
*/
|
||||
OB_PROP_IR_RIGHT_FLIP_BOOL = 114,
|
||||
|
||||
/**
|
||||
* @brief Color sensor rotation, angle{0, 90, 180, 270}
|
||||
*/
|
||||
OB_PROP_COLOR_ROTATE_INT = 115,
|
||||
|
||||
/**
|
||||
* @brief IR/Left-IR sensor rotation, angle{0, 90, 180, 270}
|
||||
*/
|
||||
OB_PROP_IR_ROTATE_INT = 116,
|
||||
|
||||
/**
|
||||
* @brief Right IR sensor rotation, angle{0, 90, 180, 270}
|
||||
*/
|
||||
OB_PROP_IR_RIGHT_ROTATE_INT = 117,
|
||||
|
||||
/**
|
||||
* @brief Depth sensor rotation, angle{0, 90, 180, 270}
|
||||
*/
|
||||
OB_PROP_DEPTH_ROTATE_INT = 118,
|
||||
|
||||
/**
|
||||
* @brief Get hardware laser energy level which real state of laser element. OB_PROP_LASER_ENERGY_LEVEL_INT(99)will effect this command
|
||||
* which it setting and changed the hardware laser energy level.
|
||||
*/
|
||||
OB_PROP_LASER_HW_ENERGY_LEVEL_INT = 119,
|
||||
|
||||
/**
|
||||
* @brief USB's power state, enum type: OBUSBPowerState
|
||||
*/
|
||||
OB_PROP_USB_POWER_STATE_INT = 121,
|
||||
|
||||
/**
|
||||
* @brief DC's power state, enum type: OBDCPowerState
|
||||
*/
|
||||
OB_PROP_DC_POWER_STATE_INT = 122,
|
||||
|
||||
/**
|
||||
* @brief Device development mode switch, optional modes can refer to the definition in @ref OBDeviceDevelopmentMode,the default mode is
|
||||
* @ref OB_USER_MODE
|
||||
* @attention The device takes effect after rebooting when switching modes.
|
||||
*/
|
||||
OB_PROP_DEVICE_DEVELOPMENT_MODE_INT = 129,
|
||||
|
||||
/**
|
||||
* @brief Multi-DeviceSync synchronized signal trigger out is enable state. true: enable, false: disable
|
||||
*/
|
||||
OB_PROP_SYNC_SIGNAL_TRIGGER_OUT_BOOL = 130,
|
||||
|
||||
/**
|
||||
* @brief Restore factory settings and factory parameters
|
||||
* @attention This command can only be written, and the parameter value must be true. The command takes effect after restarting the device.
|
||||
*/
|
||||
OB_PROP_RESTORE_FACTORY_SETTINGS_BOOL = 131,
|
||||
|
||||
/**
|
||||
* @brief Enter recovery mode (flashing mode) when boot the device
|
||||
* @attention The device will take effect after rebooting with the enable option. After entering recovery mode, you can upgrade the device system. Upgrading
|
||||
* the system may cause system damage, please use it with caution.
|
||||
*/
|
||||
OB_PROP_BOOT_INTO_RECOVERY_MODE_BOOL = 132,
|
||||
|
||||
/**
|
||||
* @brief Query whether the current device is running in recovery mode (read-only)
|
||||
*/
|
||||
OB_PROP_DEVICE_IN_RECOVERY_MODE_BOOL = 133,
|
||||
|
||||
/**
|
||||
* @brief Capture interval mode, 0:time interval, 1:number interval
|
||||
*/
|
||||
OB_PROP_CAPTURE_INTERVAL_MODE_INT = 134,
|
||||
|
||||
/**
|
||||
* @brief Capture time interval
|
||||
*/
|
||||
OB_PROP_CAPTURE_IMAGE_TIME_INTERVAL_INT = 135,
|
||||
|
||||
/**
|
||||
* @brief Capture number interval
|
||||
*/
|
||||
OB_PROP_CAPTURE_IMAGE_NUMBER_INTERVAL_INT = 136,
|
||||
|
||||
/**
|
||||
* @brief Baseline calibration parameters
|
||||
*/
|
||||
OB_STRUCT_BASELINE_CALIBRATION_PARAM = 1002,
|
||||
|
||||
/**
|
||||
* @brief Device temperature information
|
||||
*/
|
||||
OB_STRUCT_DEVICE_TEMPERATURE = 1003,
|
||||
|
||||
/**
|
||||
* @brief TOF exposure threshold range
|
||||
*/
|
||||
OB_STRUCT_TOF_EXPOSURE_THRESHOLD_CONTROL = 1024,
|
||||
|
||||
/**
|
||||
* @brief get/set serial number
|
||||
*/
|
||||
OB_STRUCT_DEVICE_SERIAL_NUMBER = 1035,
|
||||
|
||||
/**
|
||||
* @brief get/set device time
|
||||
*/
|
||||
OB_STRUCT_DEVICE_TIME = 1037,
|
||||
|
||||
/**
|
||||
* @brief Multi-device synchronization mode and parameter configuration
|
||||
*/
|
||||
OB_STRUCT_MULTI_DEVICE_SYNC_CONFIG = 1038,
|
||||
|
||||
/**
|
||||
* @brief RGB cropping ROI
|
||||
*/
|
||||
OB_STRUCT_RGB_CROP_ROI = 1040,
|
||||
|
||||
/**
|
||||
* @brief Device IP address configuration
|
||||
*/
|
||||
OB_STRUCT_DEVICE_IP_ADDR_CONFIG = 1041,
|
||||
|
||||
/**
|
||||
* @brief The current camera depth mode
|
||||
*/
|
||||
OB_STRUCT_CURRENT_DEPTH_ALG_MODE = 1043,
|
||||
|
||||
/**
|
||||
* @brief A list of depth accuracy levels, returning an array of uin16_t, corresponding to the enumeration
|
||||
*/
|
||||
OB_STRUCT_DEPTH_PRECISION_SUPPORT_LIST = 1045,
|
||||
|
||||
/**
|
||||
* @brief Color camera auto exposure
|
||||
*/
|
||||
OB_PROP_COLOR_AUTO_EXPOSURE_BOOL = 2000,
|
||||
|
||||
/**
|
||||
* @brief Color camera exposure adjustment
|
||||
*/
|
||||
OB_PROP_COLOR_EXPOSURE_INT = 2001,
|
||||
|
||||
/**
|
||||
* @brief Color camera gain adjustment
|
||||
*/
|
||||
OB_PROP_COLOR_GAIN_INT = 2002,
|
||||
|
||||
/**
|
||||
* @brief Color camera automatic white balance
|
||||
*/
|
||||
OB_PROP_COLOR_AUTO_WHITE_BALANCE_BOOL = 2003,
|
||||
|
||||
/**
|
||||
* @brief Color camera white balance adjustment
|
||||
*/
|
||||
OB_PROP_COLOR_WHITE_BALANCE_INT = 2004,
|
||||
|
||||
/**
|
||||
* @brief Color camera brightness adjustment
|
||||
*/
|
||||
OB_PROP_COLOR_BRIGHTNESS_INT = 2005,
|
||||
|
||||
/**
|
||||
* @brief Color camera sharpness adjustment
|
||||
*/
|
||||
OB_PROP_COLOR_SHARPNESS_INT = 2006,
|
||||
|
||||
/**
|
||||
* @brief Color camera shutter adjustment
|
||||
*/
|
||||
OB_PROP_COLOR_SHUTTER_INT = 2007,
|
||||
|
||||
/**
|
||||
* @brief Color camera saturation adjustment
|
||||
*/
|
||||
OB_PROP_COLOR_SATURATION_INT = 2008,
|
||||
|
||||
/**
|
||||
* @brief Color camera contrast adjustment
|
||||
*/
|
||||
OB_PROP_COLOR_CONTRAST_INT = 2009,
|
||||
|
||||
/**
|
||||
* @brief Color camera gamma adjustment
|
||||
*/
|
||||
OB_PROP_COLOR_GAMMA_INT = 2010,
|
||||
|
||||
/**
|
||||
* @brief Color camera image rotation
|
||||
*/
|
||||
OB_PROP_COLOR_ROLL_INT = 2011,
|
||||
|
||||
/**
|
||||
* @brief Color camera auto exposure priority
|
||||
*/
|
||||
OB_PROP_COLOR_AUTO_EXPOSURE_PRIORITY_INT = 2012,
|
||||
|
||||
/**
|
||||
* @brief Color camera brightness compensation
|
||||
*/
|
||||
OB_PROP_COLOR_BACKLIGHT_COMPENSATION_INT = 2013,
|
||||
|
||||
/**
|
||||
* @brief Color camera color tint
|
||||
*/
|
||||
OB_PROP_COLOR_HUE_INT = 2014,
|
||||
|
||||
/**
|
||||
* @brief Color Camera Power Line Frequency
|
||||
*/
|
||||
OB_PROP_COLOR_POWER_LINE_FREQUENCY_INT = 2015,
|
||||
|
||||
/**
|
||||
* @brief Automatic exposure of depth camera (infrared camera will be set synchronously under some models of devices)
|
||||
*/
|
||||
OB_PROP_DEPTH_AUTO_EXPOSURE_BOOL = 2016,
|
||||
|
||||
/**
|
||||
* @brief Depth camera exposure adjustment (infrared cameras will be set synchronously under some models of devices)
|
||||
*/
|
||||
OB_PROP_DEPTH_EXPOSURE_INT = 2017,
|
||||
|
||||
/**
|
||||
* @brief Depth camera gain adjustment (infrared cameras will be set synchronously under some models of devices)
|
||||
*/
|
||||
OB_PROP_DEPTH_GAIN_INT = 2018,
|
||||
|
||||
/**
|
||||
* @brief Infrared camera auto exposure (depth camera will be set synchronously under some models of devices)
|
||||
*/
|
||||
OB_PROP_IR_AUTO_EXPOSURE_BOOL = 2025,
|
||||
|
||||
/**
|
||||
* @brief Infrared camera exposure adjustment (some models of devices will set the depth camera synchronously)
|
||||
*/
|
||||
OB_PROP_IR_EXPOSURE_INT = 2026,
|
||||
|
||||
/**
|
||||
* @brief Infrared camera gain adjustment (the depth camera will be set synchronously under some models of devices)
|
||||
*/
|
||||
OB_PROP_IR_GAIN_INT = 2027,
|
||||
|
||||
/**
|
||||
* @brief Select Infrared camera data source channel. If not support throw exception. 0 : IR stream from IR Left sensor; 1 : IR stream from IR Left sensor;
|
||||
*/
|
||||
OB_PROP_IR_CHANNEL_DATA_SOURCE_INT = 2028,
|
||||
|
||||
/**
|
||||
* @brief Depth effect dedistortion, true: on, false: off. mutually exclusive with D2C function, RM_Filter disable When hardware or software D2C is enabled.
|
||||
*/
|
||||
OB_PROP_DEPTH_RM_FILTER_BOOL = 2029,
|
||||
|
||||
/**
|
||||
* @brief Color camera maximal gain
|
||||
*/
|
||||
OB_PROP_COLOR_MAXIMAL_GAIN_INT = 2030,
|
||||
|
||||
/**
|
||||
* @brief Color camera shutter gain
|
||||
*/
|
||||
OB_PROP_COLOR_MAXIMAL_SHUTTER_INT = 2031,
|
||||
|
||||
/**
|
||||
* @brief Software disparity to depth
|
||||
*/
|
||||
OB_PROP_SDK_DISPARITY_TO_DEPTH_BOOL = 3004,
|
||||
|
||||
/**
|
||||
* @brief Depth data unpacking function switch (each open stream will be turned on by default, support RLE/Y10/Y11/Y12/Y14 format)
|
||||
*/
|
||||
OB_PROP_SDK_DEPTH_FRAME_UNPACK_BOOL = 3007,
|
||||
|
||||
/**
|
||||
* @brief IR data unpacking function switch (each current will be turned on by default, support RLE/Y10/Y11/Y12/Y14 format)
|
||||
*/
|
||||
OB_PROP_SDK_IR_FRAME_UNPACK_BOOL = 3008,
|
||||
|
||||
/**
|
||||
* @brief Accel data conversion function switch (on by default)
|
||||
*/
|
||||
OB_PROP_SDK_ACCEL_FRAME_TRANSFORMED_BOOL = 3009,
|
||||
|
||||
/**
|
||||
* @brief Gyro data conversion function switch (on by default)
|
||||
*/
|
||||
OB_PROP_SDK_GYRO_FRAME_TRANSFORMED_BOOL = 3010,
|
||||
|
||||
/**
|
||||
* @brief Left IR frame data unpacking function switch (each current will be turned on by default, support RLE/Y10/Y11/Y12/Y14 format)
|
||||
*/
|
||||
OB_PROP_SDK_IR_LEFT_FRAME_UNPACK_BOOL = 3011,
|
||||
|
||||
/**
|
||||
* @brief Right IR frame data unpacking function switch (each current will be turned on by default, support RLE/Y10/Y11/Y12/Y14 format)
|
||||
*/
|
||||
OB_PROP_SDK_IR_RIGHT_FRAME_UNPACK_BOOL = 3012,
|
||||
|
||||
/**
|
||||
* @brief Calibration JSON file read from device (Femto Mega, read only)
|
||||
*/
|
||||
OB_RAW_DATA_CAMERA_CALIB_JSON_FILE = 4029,
|
||||
} OBPropertyID,
|
||||
ob_property_id;
|
||||
|
||||
// typo fixed
|
||||
#define OB_PROP_TIMER_RESET_TRIGGLE_OUT_ENABLE_BOOL OB_PROP_TIMER_RESET_TRIGGER_OUT_ENABLE_BOOL
|
||||
|
||||
/**
|
||||
* \if English
|
||||
* @brief The data type used to describe all property settings
|
||||
* \else
|
||||
* @brief 用于描述所有属性设置的数据类型
|
||||
* \endif
|
||||
*/
|
||||
typedef enum OBPropertyType {
|
||||
OB_BOOL_PROPERTY = 0, /**< \if English Bool property \else bool类型数据的属性 \endif */
|
||||
OB_INT_PROPERTY = 1, /**< \if English int property \else int类型数据的属性\endif */
|
||||
OB_FLOAT_PROPERTY = 2, /**< \if English float property \else float类型数据的属性 \endif */
|
||||
OB_STRUCT_PROPERTY = 3, /**< \if English struct property \else struct类型数据的属性 \endif */
|
||||
OB_BOOL_PROPERTY = 0, /**< Boolean property */
|
||||
OB_INT_PROPERTY = 1, /**< Integer property */
|
||||
OB_FLOAT_PROPERTY = 2, /**< Floating-point property */
|
||||
OB_STRUCT_PROPERTY = 3, /**< Struct property */
|
||||
} OBPropertyType,
|
||||
ob_property_type;
|
||||
|
||||
/**
|
||||
* \if English
|
||||
* @brief Used to describe the characteristics of each property
|
||||
* \else
|
||||
* @brief 用于描述每一个属性的特性
|
||||
* \endif
|
||||
*/
|
||||
typedef struct OBPropertyItem {
|
||||
OBPropertyID id; ///< \if English Property id \else 属性id \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
|
||||
OBPropertyID id; /**< Property ID */
|
||||
const char *name; /**< Property name */
|
||||
OBPropertyType type; /**< Property type */
|
||||
OBPermissionType permission; /**< Property read and write permission */
|
||||
} OBPropertyItem, ob_property_item;
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
||||
@@ -1,12 +1,8 @@
|
||||
/**
|
||||
* \if English
|
||||
* @file RecordPlayback.h
|
||||
* @brief For recording and playback functions
|
||||
* \else
|
||||
* @file RecordPlayback.h
|
||||
* @brief 用于录制和回放功能
|
||||
* \endif
|
||||
* @brief Header file for recording and playback functions.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#ifdef __cplusplus
|
||||
@@ -16,217 +12,118 @@ extern "C" {
|
||||
#include "ObTypes.h"
|
||||
|
||||
/**
|
||||
* \if English
|
||||
* @brief Create a recorder for data recording
|
||||
* @brief Create a recorder for data recording.
|
||||
*
|
||||
* @param[out] error log error messages
|
||||
* @return ob_recorder* returns the recorder object
|
||||
* \else
|
||||
* @brief 创建录制器用于数据的录制
|
||||
*
|
||||
* @param[out] error 记录错误信息
|
||||
* @return ob_recorder* 返回录制器对象
|
||||
* \endif
|
||||
* @param[out] error Pointer to log error messages.
|
||||
* @return Pointer to the recorder object.
|
||||
*/
|
||||
ob_recorder *ob_create_recorder(ob_error **error);
|
||||
|
||||
/**
|
||||
* \if English
|
||||
* @brief Create a recorder for data recording
|
||||
* @brief Create a recorder for data recording.
|
||||
*
|
||||
* @param dev The device object used to create the recorder
|
||||
* @param[out] error log error messages
|
||||
* @return ob_recorder* returns the recorder object
|
||||
* \else
|
||||
* @brief 创建录制器用于数据的录制
|
||||
*
|
||||
* @param dev 用于创建录制器的设备对象
|
||||
* @param[out] error 记录错误信息
|
||||
* @return ob_recorder* 返回录制器对象
|
||||
* \endif
|
||||
* @param dev The device object used to create the recorder.
|
||||
* @param[out] error Pointer to log error messages.
|
||||
* @return Pointer to the recorder object.
|
||||
*/
|
||||
ob_recorder *ob_create_recorder_with_device(ob_device *dev, ob_error **error);
|
||||
|
||||
/**
|
||||
* \if English
|
||||
* @brief delete recorder object
|
||||
* @brief Delete the recorder object.
|
||||
*
|
||||
* @param recorder recorder object
|
||||
* @param[out] error log error messages
|
||||
* \else
|
||||
* @brief 删除录制器对象
|
||||
*
|
||||
* @param recorder 录制器对象
|
||||
* @param[out] error 记录错误信息
|
||||
* \endif
|
||||
* @param recorder Pointer to the recorder object.
|
||||
* @param[out] error Pointer to log error messages.
|
||||
*/
|
||||
void ob_delete_recorder(ob_recorder *recorder, ob_error **error);
|
||||
|
||||
/**
|
||||
* \if English
|
||||
* @brief start recording
|
||||
* @brief Start recording.
|
||||
*
|
||||
* @param[in] recorder recorder object
|
||||
* @param[in] filename Recorded file name
|
||||
* @param[in] async Whether to record asynchronously
|
||||
* @param[out] error log error messages
|
||||
* \else
|
||||
* @brief 开始录制
|
||||
*
|
||||
* @param[in] recorder 录制器对象
|
||||
* @param[in] filename 录制的文件名称
|
||||
* @param[in] async 是否异步录制
|
||||
* @param[out] error 记录错误信息
|
||||
* \endif
|
||||
* @param[in] recorder Pointer to the recorder object.
|
||||
* @param[in] filename Recorded file name.
|
||||
* @param[in] async Whether to record asynchronously.
|
||||
* @param[out] error Pointer to log error messages.
|
||||
*/
|
||||
void ob_recorder_start(ob_recorder *recorder, const char *filename, bool async, ob_error **error);
|
||||
|
||||
/**
|
||||
* \if English
|
||||
* @brief stop recording
|
||||
* @brief Stop recording.
|
||||
*
|
||||
* @param[in] recorder recorder object
|
||||
* @param[out] error log error messages
|
||||
* \else
|
||||
* @brief 停止录制
|
||||
*
|
||||
* @param[in] recorder 录制器对象
|
||||
* @param[out] error 记录错误信息
|
||||
* \endif
|
||||
* @param[in] recorder Pointer to the recorder object.
|
||||
* @param[out] error Pointer to log error messages.
|
||||
*/
|
||||
void ob_recorder_stop(ob_recorder *recorder, ob_error **error);
|
||||
|
||||
/**
|
||||
* \if English
|
||||
* @brief Write frame data to the recorder
|
||||
* @brief Write frame data to the recorder.
|
||||
*
|
||||
* @param[in] recorder recorder object
|
||||
* @param[in] frame Write frame data
|
||||
* @param[out] error log error messages
|
||||
* \else
|
||||
* @brief 向录制器内写入帧数据
|
||||
*
|
||||
* @param[in] recorder 录制器对象
|
||||
* @param[in] frame 写入的帧数据
|
||||
* @param[out] error 记录错误信息
|
||||
* \endif
|
||||
* @param[in] recorder Pointer to the recorder object.
|
||||
* @param[in] frame Pointer to the frame data to write.
|
||||
* @param[out] error Pointer to log error messages.
|
||||
*/
|
||||
void ob_recorder_write_frame(ob_recorder *recorder, ob_frame *frame, ob_error **error);
|
||||
|
||||
/**
|
||||
* \if English
|
||||
* @brief Create playback object
|
||||
* @param[in] filename Playback filename
|
||||
* @param[out] error log error messages
|
||||
* @return ob_playback* returns the playback object
|
||||
* \else
|
||||
* @brief 创建回放对象
|
||||
* @param[in] filename 回放的文件名
|
||||
* @param[out] error 记录错误信息
|
||||
* @return ob_playback* 返回回放的对象
|
||||
* \endif
|
||||
* @brief Create a playback object.
|
||||
*
|
||||
* @param[in] filename Playback filename.
|
||||
* @param[out] error Pointer to log error messages.
|
||||
* @return Pointer to the playback object.
|
||||
*/
|
||||
ob_playback *ob_create_playback(const char *filename, ob_error **error);
|
||||
|
||||
/**
|
||||
* \if English
|
||||
* @brief delete playback object
|
||||
* @brief Delete the playback object.
|
||||
*
|
||||
* @param[in] playback playback object
|
||||
* @param[out] error log error messages
|
||||
* \else
|
||||
* @brief 删除回放对象
|
||||
*
|
||||
* @param[in] playback 回放对象
|
||||
* @param[out] error 记录错误信息
|
||||
* \endif
|
||||
* @param[in] playback Pointer to the playback object.
|
||||
* @param[out] error Pointer to log error messages.
|
||||
*/
|
||||
void ob_delete_playback(ob_playback *playback, ob_error **error);
|
||||
|
||||
/**
|
||||
* \if English
|
||||
* @brief Start playback, playback data is returned from the callback
|
||||
* @brief Start playback, with data returned from the callback.
|
||||
*
|
||||
* @param[in] playback playback object
|
||||
* @param[in] callback Callback for playback data
|
||||
* @param[in] user_data User data
|
||||
* @param[in] type Type of playback data
|
||||
* @param[out] error log error messages
|
||||
* \else
|
||||
* @brief 开启回放,回放数据从回调中返回
|
||||
*
|
||||
* @param[in] playback 回放对象
|
||||
* @param[in] callback 回放数据的回调
|
||||
* @param[in] user_data 用户数据
|
||||
* @param[in] type 回放数据的类型
|
||||
* @param[out] error 记录错误信息
|
||||
* \endif
|
||||
* @param[in] playback Pointer to the playback object.
|
||||
* @param[in] callback Callback function for playback data.
|
||||
* @param[in] user_data User data.
|
||||
* @param[in] type Type of playback data.
|
||||
* @param[out] error Pointer to log error messages.
|
||||
*/
|
||||
void ob_playback_start(ob_playback *playback, ob_playback_callback callback, void *user_data, ob_media_type type, ob_error **error);
|
||||
|
||||
/**
|
||||
* \if English
|
||||
* @brief stop playback
|
||||
* @brief Stop playback.
|
||||
*
|
||||
* @param[in] playback playback object
|
||||
* @param[out] error log error messages
|
||||
* \else
|
||||
* @brief 停止回放
|
||||
*
|
||||
* @param[in] playback 回放对象
|
||||
* @param[out] error 记录错误信息
|
||||
* \endif
|
||||
* @param[in] playback Pointer to the playback object.
|
||||
* @param[out] error Pointer to log error messages.
|
||||
*/
|
||||
void ob_playback_stop(ob_playback *playback, ob_error **error);
|
||||
|
||||
/**
|
||||
* \if English
|
||||
* @brief Set playback state
|
||||
* @param[in] playback playback object
|
||||
* @param[in] callback playback status callback
|
||||
* @param[in] user_data User data
|
||||
* @param[out] error log error messages
|
||||
* \else
|
||||
* @brief 设置回放状态
|
||||
* @param[in] playback 回放对象
|
||||
* @param[in] callback 回放状态回调
|
||||
* @param[in] user_data 用户数据
|
||||
* @param[out] error 记录错误信息
|
||||
* \endif
|
||||
* @brief Set the playback state.
|
||||
*
|
||||
* @param[in] playback Pointer to the playback object.
|
||||
* @param[in] callback Playback status callback function.
|
||||
* @param[in] user_data User data.
|
||||
* @param[out] error Pointer to log error messages.
|
||||
*/
|
||||
void ob_set_playback_state_callback(ob_playback *playback, ob_media_state_callback callback, void *user_data, ob_error **error);
|
||||
|
||||
/**
|
||||
* \if English
|
||||
* @brief Get the device information in the recording file
|
||||
* @brief Get the device information in the recording file.
|
||||
*
|
||||
* @param[in] playback playback object
|
||||
* @param[out] error log error messages
|
||||
* @return ob_device_info* returns device information
|
||||
* \else
|
||||
* @brief 获取录制文件内的设备信息
|
||||
*
|
||||
* @param[in] playback 回放对象
|
||||
* @param[out] error 记录错误信息
|
||||
* @return ob_device_info* returns device information
|
||||
* \endif
|
||||
* @param[in] playback Pointer to the playback object.
|
||||
* @param[out] error Pointer to log error messages.
|
||||
* @return Pointer to the device information.
|
||||
*/
|
||||
ob_device_info *ob_playback_get_device_info(ob_playback *playback, ob_error **error);
|
||||
|
||||
/**
|
||||
* \if English
|
||||
* @brief Get the intrinsic and extrinsic parameter information in the recording file
|
||||
* @brief Get the intrinsic and extrinsic parameter information in the recording file.
|
||||
*
|
||||
* @param[in] playback playback object
|
||||
* @param[out] error log error messages
|
||||
* @return ob_camera_param returns internal and external parameter information
|
||||
* \else
|
||||
* @brief 获取录制文件内的内外参信息
|
||||
*
|
||||
* @param[in] playback 回放对象
|
||||
* @param[out] error 记录错误信息
|
||||
* @return ob_camera_param 返回的内外参信息
|
||||
* \endif
|
||||
* @param[in] playback Pointer to the playback object.
|
||||
* @param[out] error Pointer to log error messages.
|
||||
* @return The internal and external parameter information.
|
||||
*/
|
||||
ob_camera_param ob_playback_get_camera_param(ob_playback *playback, ob_error **error);
|
||||
|
||||
|
||||
@@ -1,11 +1,6 @@
|
||||
/**
|
||||
* \if English
|
||||
* @file Sensor.h
|
||||
* @brief Sensor related types, used to obtain stream configuration, open and close streams, set and get sensor properties.
|
||||
* \else
|
||||
* @file Sensor.h
|
||||
* @brief 传感器相关函数,用于获取流配置,开关流,设置及获取传感器属性等操作
|
||||
* \endif
|
||||
* @brief Defines types related to sensors, used for obtaining stream configurations, opening and closing streams, and setting and getting sensor properties.
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
@@ -16,186 +11,103 @@ extern "C" {
|
||||
#include "ObTypes.h"
|
||||
|
||||
/**
|
||||
* \if English
|
||||
* @brief Get sensor type
|
||||
* @brief Get the type of the sensor.
|
||||
*
|
||||
* @param[in] sensor Sensor object
|
||||
* @param[out] error Log error messages
|
||||
* @return ob_sensor_type returns the sensor type
|
||||
* \else
|
||||
* @brief 获取传感器类型
|
||||
*
|
||||
* @param[in] sensor 传感器对象
|
||||
* @param[out] error 记录错误信息
|
||||
* @return ob_sensor_type 返回传感器类型
|
||||
* \endif
|
||||
* @param[in] sensor The sensor object.
|
||||
* @param[out] error Logs error messages.
|
||||
* @return The sensor type.
|
||||
*/
|
||||
ob_sensor_type ob_sensor_get_type(ob_sensor *sensor, ob_error **error);
|
||||
|
||||
/**
|
||||
* \if English
|
||||
* @brief Get all supported stream profiles
|
||||
* @brief Get a list of all supported stream profiles.
|
||||
*
|
||||
* @param[in] sensor Sensor object
|
||||
* @param[out] error Log error messages
|
||||
* @return ob_stream_profile_list* returns a list of stream profiles
|
||||
* \else
|
||||
* @brief 获取传感器支持的所有流的配置列表
|
||||
*
|
||||
* @param[in] sensor 传感器对象
|
||||
* @param[out] error 记录错误信息
|
||||
* @return ob_stream_profile_list* 返回流配置的列表
|
||||
* \endif
|
||||
* @param[in] sensor The sensor object.
|
||||
* @param[out] error Logs error messages.
|
||||
* @return A list of stream profiles.
|
||||
*/
|
||||
ob_stream_profile_list *ob_sensor_get_stream_profile_list(ob_sensor *sensor, ob_error **error);
|
||||
|
||||
/**
|
||||
* \if English
|
||||
* @brief Open the current sensor, and set the callback data frame
|
||||
* @brief Open the current sensor and set the callback data frame.
|
||||
*
|
||||
* @param[in] sensor Sensor object
|
||||
* @param[in] profile Stream configuration information
|
||||
* @param[in] callback Callback function triggered when frame data arrives
|
||||
* @param[in] user_data pass in any user data and get it from the callback
|
||||
* @param[out] error Log error messages
|
||||
* \else
|
||||
* @brief 打开传感器的流,并设置帧数据回调
|
||||
*
|
||||
* @param[in] sensor 传感器对象
|
||||
* @param[in] profile 流的配置信息
|
||||
* @param[in] callback 帧数据到达时触发的回调函数
|
||||
* @param[in] user_data 可以传入任意用户数据,并从回调中获取
|
||||
* @param[out] error 记录错误信息
|
||||
* \endif
|
||||
* @param[in] sensor The sensor object.
|
||||
* @param[in] profile The stream configuration information.
|
||||
* @param[in] callback The callback function triggered when frame data arrives.
|
||||
* @param[in] user_data Any user data to pass in and get from the callback.
|
||||
* @param[out] error Logs error messages.
|
||||
*/
|
||||
void ob_sensor_start(ob_sensor *sensor, ob_stream_profile *profile, ob_frame_callback callback, void *user_data, ob_error **error);
|
||||
|
||||
/**
|
||||
* \if English
|
||||
* @brief Stop sensor stream
|
||||
* @brief Stop the sensor stream.
|
||||
*
|
||||
* @param[in] sensor sensor object
|
||||
* @param[out] error Log error messages
|
||||
* \else
|
||||
* @brief 停止传感器的流
|
||||
*
|
||||
* @param[in] sensor 传感器对象
|
||||
* @param[out] error 记录错误信息
|
||||
* \endif
|
||||
* @param[in] sensor The sensor object.
|
||||
* @param[out] error Logs error messages.
|
||||
*/
|
||||
void ob_sensor_stop(ob_sensor *sensor, ob_error **error);
|
||||
|
||||
/**
|
||||
* \if English
|
||||
* @brief Dynamically switch resolutions
|
||||
* @brief Dynamically switch resolutions.
|
||||
*
|
||||
* @param[in] sensor Sensor object
|
||||
* @param[in] profile Stream configuration information
|
||||
* @param[out] error Log error messages
|
||||
* \else
|
||||
* @brief 动态切换分辨率
|
||||
*
|
||||
* @param[in] sensor 传感器对象
|
||||
* @param[in] profile 流的配置信息
|
||||
* @param[out] error 记录错误信息
|
||||
* \endif
|
||||
* @param[in] sensor The sensor object.
|
||||
* @param[in] profile The stream configuration information.
|
||||
* @param[out] error Logs error messages.
|
||||
*/
|
||||
void ob_sensor_switch_profile(ob_sensor *sensor, ob_stream_profile *profile, ob_error **error);
|
||||
|
||||
/**
|
||||
* \if English
|
||||
* @brief Delete sensor object list
|
||||
* @brief Delete a list of sensor objects.
|
||||
*
|
||||
* @param[in] sensor_list List of sensor objects to delete
|
||||
* @param[out] error Log error messages
|
||||
* \else
|
||||
* @brief 删除传感器对象列表
|
||||
*
|
||||
* @param[in] sensor_list 要删除的传感器对象列表
|
||||
* @param[out] error 记录错误信息
|
||||
* \endif
|
||||
* @param[in] sensor_list The list of sensor objects to delete.
|
||||
* @param[out] error Logs error messages.
|
||||
*/
|
||||
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
|
||||
* @param[out] error Log error messages
|
||||
* \else
|
||||
* @brief 获取传感器列表内传感器个数
|
||||
*
|
||||
* @param[in] sensor_list 要删除的传感器对象列表
|
||||
* @param[in] count 传感器数量
|
||||
* @param[out] error 记录错误信息
|
||||
* \endif
|
||||
* @param[in] sensor_list The list of sensor objects.
|
||||
* @param[out] error Logs error messages.
|
||||
* @return The number of sensors in the list.
|
||||
*/
|
||||
uint32_t ob_sensor_list_get_sensor_count(ob_sensor_list *sensor_list, ob_error **error);
|
||||
|
||||
/**
|
||||
* \if English
|
||||
* @brief Get the sensor types
|
||||
* @brief Get the sensor type.
|
||||
*
|
||||
* @param index Sensor index
|
||||
* @return OBSensorType returns the Sensor type
|
||||
* \else
|
||||
* @brief 获取指定Sensor的类型
|
||||
*
|
||||
* @param index Sensor索引
|
||||
* @return OBSensorType 返回Sensor类型
|
||||
* \endif
|
||||
* @param[in] sensor_list The list of sensor objects.
|
||||
* @param[in] index The index of the sensor on the list.
|
||||
* @param[out] error Logs error messages.
|
||||
* @return The sensor type.
|
||||
*/
|
||||
ob_sensor_type ob_sensor_list_get_sensor_type(ob_sensor_list *sensor_list, uint32_t index, ob_error **error);
|
||||
|
||||
/**
|
||||
/**
|
||||
* \if English
|
||||
* @brief Get sensor by sensor type
|
||||
* @brief Get a sensor by sensor type.
|
||||
*
|
||||
* @param sensor_list Get the returned sensor list through device
|
||||
* @param sensorType Sensor type to be obtained
|
||||
* @return Return the Sensor pointer, if the specified type of Sensor does not exist, it will return null
|
||||
* \else
|
||||
* @brief 通过Sensor类型获取Sensor
|
||||
*
|
||||
* @param sensor_list 通过device获取返回的sensor列表
|
||||
* @param sensorType 要获取的Sensor类型
|
||||
* @return 返回Sensor指针,如果指定类型Sensor不存在,将返回空
|
||||
* \endif
|
||||
* @param[in] sensor_list The list of sensor objects.
|
||||
* @param[in] sensorType The sensor type to be obtained.
|
||||
* @param[out] error Logs error messages.
|
||||
* @return The sensor pointer. If the specified type of sensor does not exist, it will return null.
|
||||
*/
|
||||
ob_sensor *ob_sensor_list_get_sensor_by_type(ob_sensor_list *sensor_list, ob_sensor_type sensorType, ob_error **error);
|
||||
|
||||
/**
|
||||
* \if English
|
||||
* @brief Get Sensor by index number
|
||||
* @brief Get a sensor by index number.
|
||||
*
|
||||
* @param sensor_list Get the returned sensor list through device
|
||||
* @param index To create a device cable, the range is [0, count-1], if the index exceeds the range, an exception will be thrown
|
||||
* @return std::shared_ptr<Sensor> returns the Sensor object
|
||||
* \else
|
||||
* @brief 通过索引号获取Sensor
|
||||
*
|
||||
* @param sensor_list 通过device获取返回的sensor列表
|
||||
* @param index 要创建设备的索,范围 [0, count-1],如果index超出范围将抛异常
|
||||
* @return std::shared_ptr<Sensor> 返回Sensor对象
|
||||
* \endif
|
||||
* @param[in] sensor_list The list of sensor objects.
|
||||
* @param[in] index The index of the sensor on the list.
|
||||
* @param[out] error Logs error messages.
|
||||
* @return The sensor object.
|
||||
*/
|
||||
ob_sensor *ob_sensor_list_get_sensor(ob_sensor_list *sensor_list, uint32_t index, ob_error **error);
|
||||
|
||||
/**
|
||||
* \if English
|
||||
* @brief Delete sensor object
|
||||
* @brief Delete a sensor object.
|
||||
*
|
||||
* @param[in] sensor The sensor object to delete
|
||||
* @param[out] error Log error messages
|
||||
* \else
|
||||
* @brief 删除传感器对象
|
||||
*
|
||||
* @param[in] sensor 要删除的传感器对象
|
||||
* @param[out] error 记录错误信息
|
||||
* \endif
|
||||
* @param[in] sensor The sensor object to delete.
|
||||
* @param[out] error Logs error messages.
|
||||
*/
|
||||
void ob_delete_sensor(ob_sensor *sensor, ob_error **error);
|
||||
|
||||
|
||||
@@ -1,11 +1,6 @@
|
||||
/**
|
||||
* \if English
|
||||
* @file StreamProfile.h
|
||||
* @brief The stream configuration related type is used to get information such as the width, height, frame rate, and format of the stream.
|
||||
* \else
|
||||
* @file StreamProfile.h
|
||||
* @brief 流配置相关函数,用于获取流的宽、高、帧率及格式等信息
|
||||
* \endif
|
||||
* @brief The stream profile related type is used to get information such as the width, height, frame rate, and format of the stream.
|
||||
*
|
||||
*/
|
||||
#pragma once
|
||||
@@ -17,248 +12,158 @@ extern "C" {
|
||||
#include "ObTypes.h"
|
||||
|
||||
/**
|
||||
* \if English
|
||||
* @brief Get stream profile format
|
||||
*
|
||||
* @param[in] profile Stream configuration object
|
||||
* @param[out] error Log error messages
|
||||
* @return ob_format returns the format of the stream
|
||||
* \else
|
||||
* @brief 获取流配置的格式
|
||||
*
|
||||
* @param[in] profile 流配置对象
|
||||
* @param[out] error 记录错误信息
|
||||
* @return ob_format 返回流的格式
|
||||
* \endif
|
||||
* @return ob_format return the format of the stream
|
||||
*/
|
||||
ob_format ob_stream_profile_format(ob_stream_profile *profile, ob_error **error);
|
||||
|
||||
/**
|
||||
* \if English
|
||||
* @brief Get stream profile type
|
||||
*
|
||||
* @param[in] profile Stream configuration object
|
||||
* @param[out] error Log error messages
|
||||
* @return ob_stream_type stream type
|
||||
* \else
|
||||
* @brief 获取流的类型
|
||||
*
|
||||
* @param[in] profile 流配置对象
|
||||
* @param[out] error 记录错误信息
|
||||
* @return ob_stream_type 流的类型
|
||||
* \endif
|
||||
*/
|
||||
ob_stream_type ob_stream_profile_type(ob_stream_profile *profile, ob_error **error);
|
||||
|
||||
/**
|
||||
* \if English
|
||||
* @brief Get the frame rate of the video stream configuration
|
||||
*
|
||||
* @param[in] profile Stream configuration object
|
||||
* @param[out] error Log error messages
|
||||
* @return uint32_t returns the frame rate of the stream
|
||||
* \else
|
||||
* @brief 获取视频流配置的帧率
|
||||
*
|
||||
* @param[in] profile 流配置对象, 如果该配置不是视频流配置,将会返错误
|
||||
* @param[out] error 记录错误信息
|
||||
* @return uint32_t 返回流的帧率
|
||||
* \endif
|
||||
* @return uint32_t return the frame rate of the stream
|
||||
*/
|
||||
uint32_t ob_video_stream_profile_fps(ob_stream_profile *profile, ob_error **error);
|
||||
|
||||
/**
|
||||
* \if English
|
||||
* @brief Get the width of the video stream configuration
|
||||
*
|
||||
* @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 width of the stream
|
||||
* \else
|
||||
* @brief 获取视频流配置的宽
|
||||
*
|
||||
* @param[in] profile 流配置对象, 如果该配置不是视频流配置,将会返错误
|
||||
* @param[out] error 记录错误信息
|
||||
* @return uint32_t 返回流的宽
|
||||
* \endif
|
||||
* @return uint32_t return the width of the stream
|
||||
*/
|
||||
uint32_t ob_video_stream_profile_width(ob_stream_profile *profile, ob_error **error);
|
||||
|
||||
/**
|
||||
* \if English
|
||||
* @brief Get the height of the video stream configuration
|
||||
*
|
||||
* @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
|
||||
* @brief 获取视频流配置的高
|
||||
*
|
||||
* @param[in] profile 流配置对象, 如果该配置不是视频流配置,将会返错误
|
||||
* @param[out] error 记录错误信息
|
||||
* @return uint32_t 返回流的高
|
||||
* \endif
|
||||
* @return uint32_t return the height of the stream
|
||||
*/
|
||||
uint32_t ob_video_stream_profile_height(ob_stream_profile *profile, ob_error **error);
|
||||
|
||||
/**
|
||||
* \if English
|
||||
* @brief Get scale range of accelerometer stream
|
||||
* @brief Get the full-scale range of the accelerometer stream.
|
||||
*
|
||||
* @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
|
||||
* @return ob_accel_full_scale_range range
|
||||
* \else
|
||||
* @brief 获取加速度计流配置的量程范围
|
||||
*
|
||||
* @param[in] profile 流配置对象, 如果该配置不是加速度计流配置,将会返错误
|
||||
* @param[out] error 记录错误信息
|
||||
* @return ob_accel_full_scale_range 量程范围
|
||||
* \endif
|
||||
* @param[in] profile Stream configuration object. If the configuration is not for the accelerometer stream, an error will be returned.
|
||||
* @param[out] error Log error messages.
|
||||
* @return The full-scale range of the accelerometer stream.
|
||||
*/
|
||||
ob_accel_full_scale_range ob_accel_stream_profile_full_scale_range(ob_stream_profile *profile, ob_error **error);
|
||||
|
||||
/**
|
||||
* \if English
|
||||
* @brief Get sampling frequency of the accelerometer frame
|
||||
* @brief Get the 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
|
||||
* @return ob_accel_sample_rate sampling frequency
|
||||
* \else
|
||||
* @brief 获取加速度计流配置的采样频率
|
||||
*
|
||||
* @param[in] profile 流配置对象, 如果该配置不是加速度计流配置,将会返错误
|
||||
* @param[out] error 记录错误信息
|
||||
* @return ob_accel_sample_rate 采样频率
|
||||
* \endif
|
||||
* @param[in] profile Stream configuration object. If the configuration is not for the accelerometer stream, an error will be returned.
|
||||
* @param[out] error Log error messages.
|
||||
* @return The sampling frequency of the accelerometer frame.
|
||||
*/
|
||||
ob_accel_sample_rate ob_accel_stream_profile_sample_rate(ob_stream_profile *profile, ob_error **error);
|
||||
|
||||
/**
|
||||
* \if English
|
||||
* @brief Get scale range of gyroscope stream
|
||||
* @brief Get the full-scale range of the gyroscope stream.
|
||||
*
|
||||
* @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
|
||||
* @return ob_gyro_full_scale_range range
|
||||
* \else
|
||||
* @brief 获取陀螺仪流配置的量程范围
|
||||
*
|
||||
* @param[in] profile 流配置对象, 如果该配置不是陀螺仪流配置,将会返错误
|
||||
* @param[out] error 记录错误信息
|
||||
* @return ob_gyro_full_scale_range 量程范围
|
||||
* \endif
|
||||
* @param[in] profile Stream configuration object. If the configuration is not for the gyroscope stream, an error will be returned.
|
||||
* @param[out] error Log error messages.
|
||||
* @return The full-scale range of the gyroscope stream.
|
||||
*/
|
||||
ob_gyro_full_scale_range ob_gyro_stream_profile_full_scale_range(ob_stream_profile *profile, ob_error **error);
|
||||
|
||||
/**
|
||||
* \if English
|
||||
* @brief Get the sampling frequency of the gyro flow configuration
|
||||
* @brief Get the sampling frequency of the gyroscope stream.
|
||||
*
|
||||
* @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
|
||||
* @return ob_gyro_sample_rate sampling frequency
|
||||
* \else
|
||||
* @brief 获取陀螺仪流配置的采样频率
|
||||
*
|
||||
* @param[in] profile 流配置对象, 如果该配置不是陀螺仪流配置,将会返错误
|
||||
* @param[out] error 记录错误信息
|
||||
* @return ob_gyro_sample_rate 采样频率
|
||||
* \endif
|
||||
* @param[in] profile Stream configuration object. If the configuration is not for the gyroscope stream, an error will be returned.
|
||||
* @param[out] error Log error messages.
|
||||
* @return The sampling frequency of the gyroscope stream.
|
||||
*/
|
||||
ob_gyro_sample_rate ob_gyro_stream_profile_sample_rate(ob_stream_profile *profile, ob_error **error);
|
||||
|
||||
/**
|
||||
* \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. If no matched profile found, will return error!
|
||||
* the first one in the list will be returned by default. If no matched profile is found, an error will be returned.
|
||||
*
|
||||
* @param profile_list Resolution list
|
||||
* @param width Width, if you don't need to add matching conditions, you can pass 0
|
||||
* @param height Height, if you don't need to add matching conditions, you can pass 0
|
||||
* @param format Format, if you don't need to add matching conditions, you can pass OB_FORMAT_UNKNOWN
|
||||
* @param fps Frame rate, if you don't need to add matching conditions, you can pass 0
|
||||
* @param[out] error Log error messages
|
||||
* @return ob_stream_profile* returns the matching profile
|
||||
* \else
|
||||
* @brief 通过传入的参数进行匹配对应的ob_stream_profile。若有多个匹配项默认返回列表中的第一个, 若未找打匹配的项,则返回错误。
|
||||
*
|
||||
* @param profile_list 分辨率列表
|
||||
* @param width 宽度, 如不要求加入匹配条件,可传0
|
||||
* @param height 高度, 如不要求加入匹配条件,可传0
|
||||
* @param format 格式, 如不要求加入匹配条件,可传OB_FORMAT_UNKNOWN
|
||||
* @param fps 帧率, 如不要求加入匹配条件,可传0
|
||||
* @param[out] error 记录错误信息
|
||||
* @return ob_stream_profile* 返回匹配的profile
|
||||
* \endif
|
||||
* @param[in] profile_list Resolution list.
|
||||
* @param[in] width Width. If you don't need to add matching conditions, you can pass 0.
|
||||
* @param[in] height Height. If you don't need to add matching conditions, you can pass 0.
|
||||
* @param[in] format Format. If you don't need to add matching conditions, you can pass OB_FORMAT_UNKNOWN.
|
||||
* @param[in] fps Frame rate. If you don't need to add matching conditions, you can pass 0.
|
||||
* @param[out] error Log error messages.
|
||||
* @return The matching profile.
|
||||
*/
|
||||
ob_stream_profile *ob_stream_profile_list_get_video_stream_profile(ob_stream_profile_list *profile_list, int width, int height, ob_format format, int fps,
|
||||
ob_error **error);
|
||||
|
||||
/**
|
||||
* \if English
|
||||
* @brief Get the corresponding StreamProfile by subscripting
|
||||
* @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. If no matched profile is found, an error will be returned.
|
||||
*
|
||||
* @param[in] profile_list StreamProfile lists
|
||||
* @param[in] index
|
||||
* @param[out] error Log error messages
|
||||
* @return ob_stream_profile* returns the matching profile
|
||||
* \else
|
||||
* @brief 通过下标获取对应的StreamProfile
|
||||
* @param[in] profile_list Resolution list.
|
||||
* @param[in] fullScaleRange Full-scale range. If you don't need to add matching conditions, you can pass 0.
|
||||
* @param[in] sampleRate Sample rate. If you don't need to add matching conditions, you can pass 0.
|
||||
* @param[out] error Log error messages.
|
||||
* @return The matching profile.
|
||||
*/
|
||||
ob_stream_profile *ob_stream_profile_list_get_accel_stream_profile(ob_stream_profile_list *profile_list, ob_accel_full_scale_range fullScaleRange,
|
||||
ob_accel_sample_rate sampleRate, ob_error **error);
|
||||
|
||||
/**
|
||||
* @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. If no matched profile is found, an error will be returned.
|
||||
*
|
||||
* @param[in] profile_list StreamProfile列表
|
||||
* @param[in] index 索引
|
||||
* @param[out] error 记录错误信息
|
||||
* @return ob_stream_profile* 返回匹配的profile
|
||||
*\endif
|
||||
* @param[in] profile_list Resolution list.
|
||||
* @param[in] fullScaleRange Full-scale range. If you don't need to add matching conditions, you can pass 0.
|
||||
* @param[in] sampleRate Sample rate. If you don't need to add matching conditions, you can pass 0.
|
||||
* @param[out] error Log error messages.
|
||||
* @return The matching profile.
|
||||
*/
|
||||
ob_stream_profile *ob_stream_profile_list_get_gyro_stream_profile(ob_stream_profile_list *profile_list, ob_gyro_full_scale_range fullScaleRange,
|
||||
ob_gyro_sample_rate sampleRate, ob_error **error);
|
||||
|
||||
/**
|
||||
* @brief Get the corresponding StreamProfile by subscripting.
|
||||
*
|
||||
* @param[in] profile_list StreamProfile lists.
|
||||
* @param[in] index Index.
|
||||
* @param[out] error Log error messages.
|
||||
* @return The matching profile.
|
||||
*/
|
||||
ob_stream_profile *ob_stream_profile_list_get_profile(ob_stream_profile_list *profile_list, int index, ob_error **error);
|
||||
|
||||
/**
|
||||
* \if English
|
||||
* @brief Get the number of StreamProfile lists
|
||||
* @brief Get the number of StreamProfile lists.
|
||||
*
|
||||
* @param[in] profile_list StreamProfile list
|
||||
* @param[out] error Log error messages
|
||||
* @return uint32_t returns the number of StreamProfile lists
|
||||
* \else
|
||||
* @brief 获取StreamProfile列表的数量
|
||||
*
|
||||
* @param[in] profile_list StreamProfile列表
|
||||
* @param[out] error 记录错误信息
|
||||
* @return uint32_t 返回StreamProfile列表的数量
|
||||
* \endif
|
||||
* @param[in] profile_list StreamProfile list.
|
||||
* @param[out] error Log error messages.
|
||||
* @return The number of StreamProfile lists.
|
||||
*/
|
||||
uint32_t ob_stream_profile_list_count(ob_stream_profile_list *profile_list, ob_error **error);
|
||||
|
||||
/**
|
||||
* \if English
|
||||
* @brief Delete stream configuration list
|
||||
* @brief Delete the stream profile list.
|
||||
*
|
||||
* @param[in] profiles Stream configuration list
|
||||
* @param[out] error Log error messages
|
||||
* \else
|
||||
* @brief 删除流配置列表
|
||||
*
|
||||
* @param[in] profiles 流配置列表
|
||||
* @param[out] error 记录错误信息
|
||||
* \endif
|
||||
* @param[in] profile_list Stream configuration list.
|
||||
* @param[out] error Log error messages.
|
||||
*/
|
||||
void ob_delete_stream_profile_list(ob_stream_profile_list *profile_list, ob_error **error);
|
||||
|
||||
/**
|
||||
*\if English
|
||||
* @brief Delete stream configuration
|
||||
* @brief Delete the stream configuration.
|
||||
*
|
||||
* @param[in] profile Stream configuration object
|
||||
* @param[out] error Log error messages
|
||||
* \else
|
||||
* @brief 删除流配置
|
||||
*
|
||||
* @param[in] profile 流配置对象
|
||||
* @param[out] error 记录错误信息
|
||||
* \endif
|
||||
* @param[in] profile Stream configuration object.
|
||||
* @param[out] error Log error messages.
|
||||
*/
|
||||
void ob_delete_stream_profile(ob_stream_profile *profile, ob_error **error);
|
||||
|
||||
|
||||
@@ -1,11 +1,6 @@
|
||||
/**
|
||||
* \if English
|
||||
* @file Version.h
|
||||
* @brief Get the SDK version number information function
|
||||
* \else
|
||||
* @file Version.h
|
||||
* @brief 获取SDK版本号相关信息函数
|
||||
* \endif
|
||||
* @brief Functions for retrieving the SDK version number information.
|
||||
*
|
||||
*/
|
||||
#pragma once
|
||||
@@ -15,56 +10,41 @@ extern "C" {
|
||||
#endif
|
||||
|
||||
/**
|
||||
* \if English
|
||||
* @brief Get the SDK version
|
||||
* @brief Get the SDK version number.
|
||||
*
|
||||
* @return int returns the SDK version
|
||||
* \else
|
||||
* @brief 获取SDK版本号
|
||||
*
|
||||
* @return int 返回SDK版本号
|
||||
* \endif
|
||||
* @return int The SDK version number.
|
||||
*/
|
||||
int ob_get_version();
|
||||
|
||||
/**
|
||||
* \if English
|
||||
* @brief Get the SDK major version
|
||||
* @brief Get the SDK major version number.
|
||||
*
|
||||
* @return int returns the SDK major version
|
||||
* \else
|
||||
* @brief 获取SDK主版本号
|
||||
*
|
||||
* @return int 返回SDK主版本号
|
||||
* \endif
|
||||
* @return int The SDK major version number.
|
||||
*/
|
||||
int ob_get_major_version();
|
||||
|
||||
/**
|
||||
* \if English
|
||||
* @brief Get the SDK minor version
|
||||
* @brief Get the SDK minor version number.
|
||||
*
|
||||
* @return int returns the SDK minor version
|
||||
* \else
|
||||
* @brief 获取SDK副版本号
|
||||
*
|
||||
* @return int 返回SDK副版本号
|
||||
* \endif
|
||||
* @return int The SDK minor version number.
|
||||
*/
|
||||
int ob_get_minor_version();
|
||||
|
||||
/**
|
||||
* \if English
|
||||
* @brief Get the SDK patch version
|
||||
* @brief Get the SDK patch version number.
|
||||
*
|
||||
* @return int returns the SDK patch version
|
||||
* \else
|
||||
* @brief 获取SDK修订版本号
|
||||
*
|
||||
* @return int 返回SDK修订版本号
|
||||
* \endif
|
||||
* @return int The SDK patch version number.
|
||||
*/
|
||||
int ob_get_patch_version();
|
||||
|
||||
/**
|
||||
* @brief Get the SDK stage version.
|
||||
* @attention The returned char* does not need to be freed.
|
||||
*
|
||||
* @return const char* The SDK stage version.
|
||||
*/
|
||||
const char *ob_get_stage_version();
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
@@ -1,11 +1,7 @@
|
||||
/**
|
||||
* \if English
|
||||
* @file Context.hpp
|
||||
* @brief The SDK context class, the entry to the underlying SDK, is used to query device lists,handle device callbacks,set the level of the log
|
||||
* \else
|
||||
* @file Context.hpp
|
||||
* @brief SDK上下文环境类,底层SDK的入口,用于获取设备列表,处理设备的回调,日志等级的设置操作
|
||||
* \endif
|
||||
* @brief The SDK context class, which serves as the entry point to the underlying SDK. It is used to query device lists, handle device callbacks, and set the
|
||||
* log level.
|
||||
*
|
||||
*/
|
||||
#pragma once
|
||||
@@ -28,106 +24,113 @@ private:
|
||||
|
||||
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
|
||||
* @brief context是描述SDK的runtime一个管理类,负责SDK的资源申请与释放
|
||||
* context具备多设备的管理能力,负责枚举设备,监听设备回调,启用多设备同步等功能
|
||||
* \endif
|
||||
*
|
||||
* @brief The Context class is a management class that describes the runtime of the SDK. It is responsible for applying and releasing resources for the SDK.
|
||||
* The context has the ability to manage multiple devices, enumerate devices, monitor device callbacks, and enable functions such as multi-device
|
||||
* synchronization.
|
||||
*/
|
||||
Context(const char *configPath = "");
|
||||
virtual ~Context() noexcept;
|
||||
|
||||
/**
|
||||
*\if English
|
||||
* @brief Query enumerated device list
|
||||
* @brief Queries the enumerated device list.
|
||||
*
|
||||
* @return std::shared_ptr<DeviceList> returns a pointer to the device list class
|
||||
* \else
|
||||
* @brief 获取枚举到设备列表
|
||||
*
|
||||
* @return std::shared_ptr<DeviceList>返回设备列表类的指针
|
||||
* \endif
|
||||
* @return std::shared_ptr<DeviceList> A pointer to the device list class.
|
||||
*/
|
||||
std::shared_ptr<DeviceList> queryDeviceList();
|
||||
|
||||
/**
|
||||
* @brief 创建网络设备对象
|
||||
* @brief Creates a network device object.
|
||||
*
|
||||
* @param address ip 地址
|
||||
* @param port 端口号
|
||||
* @return std::shared_ptr<Device> 返回创建好的设备对象
|
||||
* @param address The IP address.
|
||||
* @param port The port.
|
||||
* @return std::shared_ptr<Device> The created device object.
|
||||
*/
|
||||
std::shared_ptr<Device> createNetDevice(const char *address, uint16_t port);
|
||||
|
||||
using DeviceChangedCallback = std::function<void(std::shared_ptr<DeviceList> removedList, std::shared_ptr<DeviceList> addedList)>;
|
||||
/**
|
||||
* \if English
|
||||
* @brief Set device plug-in callback function
|
||||
* @brief Changes the IP configuration of a network device.
|
||||
*
|
||||
* @param callback function triggered when the device is plugged and unplugged
|
||||
* \else
|
||||
* @brief 设置设备插拔回调函数
|
||||
* @param deviceUid The device unique ID, which is the network device MAC address. It can be obtained through the @ref DeviceList::uid() function.
|
||||
* @param config The new IP configuration.
|
||||
*/
|
||||
void changeNetDeviceIpConfig(const char *deviceUid, const OBNetIpConfig &config);
|
||||
|
||||
using DeviceChangedCallback = std::function<void(std::shared_ptr<DeviceList> removedList, std::shared_ptr<DeviceList> addedList)>;
|
||||
|
||||
/**
|
||||
* @brief Set the device plug-in callback function.
|
||||
*
|
||||
* @param callback 设备插拔时触发的回调函数
|
||||
* \endif
|
||||
* @param callback The function triggered when the device is plugged and unplugged.
|
||||
*/
|
||||
void setDeviceChangedCallback(DeviceChangedCallback callback);
|
||||
|
||||
/**
|
||||
* \if English
|
||||
* @brief Activate the multi-device synchronization function to synchronize the clock of the created device(the device needs support this function)
|
||||
* @brief Activates the multi-device synchronization function to synchronize the clock of the created device (the device needs to 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
|
||||
* @brief 启动多设备同步功能,同步已创建设备的时钟(需要使用的设备支持该功能)
|
||||
*
|
||||
* @param repeatInterval 定时同步时间间隔(单位ms;如果repeatInterval=0,表示只同步一次,不再定时执行)
|
||||
* \endif
|
||||
* @param repeatInterval The synchronization time interval (unit: ms; if repeatInterval=0, it means that it will only be synchronized once and will not be
|
||||
* executed regularly).
|
||||
*/
|
||||
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
|
||||
* @brief Frees idle memory from the internal frame memory pool.
|
||||
*/
|
||||
void freeIdleMemory();
|
||||
|
||||
/**
|
||||
* @brief Set the level of the global log, which affects both the log level output to the terminal and output to the file.
|
||||
*
|
||||
* @param severity log output level
|
||||
* \else
|
||||
* @brief 设置全局日志的等级,会同时作用于输出到终端和输出到文件的日志等级
|
||||
*
|
||||
* @param severity 日志输出等级
|
||||
* \endif
|
||||
* @param severity The log output level.
|
||||
*/
|
||||
static void setLoggerSeverity(OBLogSeverity severity);
|
||||
|
||||
/**
|
||||
* \if English
|
||||
* @brief Set log output to file
|
||||
* @brief Set log output to a file.
|
||||
*
|
||||
* @param severity log level output to file
|
||||
* @param severity The log level output to the 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
|
||||
* @brief 设置日志输出到文件
|
||||
*
|
||||
* @param severity 输出到文件的日志等级
|
||||
* @param directory 日志文件输出路径,如果路径为空,则继续使用已有设置(已有配置也为空则不输出日志到文件)
|
||||
* \endif
|
||||
* empty, the log will not be output to the file).
|
||||
*/
|
||||
static void setLoggerToFile(OBLogSeverity severity, const char *directory);
|
||||
|
||||
/**
|
||||
* \if English
|
||||
* @brief Set log output to terminal
|
||||
* @brief Set log output to the terminal.
|
||||
*
|
||||
* @param severity log level output to the terminal
|
||||
* \else
|
||||
* @brief 设置日志输出到终端
|
||||
*
|
||||
* @param severity 输出到终端的日志等级
|
||||
* \endif
|
||||
* @param severity The log level output to the terminal.
|
||||
*/
|
||||
static void setLoggerToConsole(OBLogSeverity severity);
|
||||
|
||||
/**
|
||||
* @brief Log output callback function.
|
||||
*
|
||||
* @param severity The current callback log level.
|
||||
* @param logMsg The log message.
|
||||
*/
|
||||
using LogCallback = std::function<void(OBLogSeverity severity, const char *logMsg)>;
|
||||
|
||||
/**
|
||||
* @brief Set the logger to callback.
|
||||
*
|
||||
* @param severity The callback log level.
|
||||
* @param callback The callback function.
|
||||
*/
|
||||
static void setLoggerToCallback(OBLogSeverity severity, LogCallback callback);
|
||||
|
||||
/**
|
||||
* @brief Loads a license file.
|
||||
*
|
||||
* @param filePath The license file path.
|
||||
* @param key The decryption key.
|
||||
*/
|
||||
static void loadLicense(const char *filePath, const char *key = OB_DEFAULT_DECRYPT_KEY);
|
||||
|
||||
/**
|
||||
* @brief Loads a license from data.
|
||||
*
|
||||
* @param data The license data.
|
||||
* @param dataLen The license data length.
|
||||
* @param key The decryption key.
|
||||
*/
|
||||
static void loadLicenseFromData(const char *data, uint32_t dataLen, const char *key = OB_DEFAULT_DECRYPT_KEY);
|
||||
};
|
||||
} // namespace ob
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,11 +1,7 @@
|
||||
/**
|
||||
* \if English
|
||||
* @file Error.hpp
|
||||
* @brief Error describes the abnormal error within the SDK, and the detailed information of the exception can be realized through this class.
|
||||
* \else
|
||||
* @file Error.hpp
|
||||
* @brief Error描述SDK内部的异常错误,通过该类可以实现异常的详细信息。
|
||||
* \endif
|
||||
* @brief This file defines the Error class, which describes abnormal errors within the SDK.
|
||||
* Detailed information about the exception can be obtained through this class.
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
@@ -25,40 +21,28 @@ public:
|
||||
Error(const Error &error) noexcept;
|
||||
|
||||
~Error() noexcept;
|
||||
|
||||
/**
|
||||
* \if English
|
||||
* @brief Obtain detailed error logs of SDK internal exceptions.
|
||||
* \else
|
||||
* @brief 获取SDK内部异常的详细错误日志。
|
||||
* \endif
|
||||
* @brief Get the detailed error logs of SDK internal exceptions.
|
||||
* @return A C-style string containing the error message.
|
||||
*/
|
||||
const char *getMessage() const noexcept;
|
||||
|
||||
/**
|
||||
* \if English
|
||||
* @brief Get the exception type of the error, and determine which module is abnormal.
|
||||
* @return OBExceptionType
|
||||
* \else
|
||||
* @brief 获取该错误的异常类型,判断是具体哪个模块异常。
|
||||
* @return OBExceptionType
|
||||
* @brief Get the exception type of the error, which can be used to determine which module is abnormal.
|
||||
* @return The OBExceptionType enum value.
|
||||
*/
|
||||
OBExceptionType getExceptionType() const noexcept;
|
||||
|
||||
/**
|
||||
* \if English
|
||||
* @brief Get the name of the error function.
|
||||
* \else
|
||||
* @brief 获取SDK内部异常的错误接口函数名称。
|
||||
* \endif
|
||||
* @return A C-style string containing the name of the error function.
|
||||
*/
|
||||
const char *getName() const noexcept;
|
||||
|
||||
/**
|
||||
* \if English
|
||||
* @brief Get the parameter passed in to the error interface.
|
||||
* \else
|
||||
* @brief 获取SDK内部异常的错误接口函数传入参数。
|
||||
* \endif
|
||||
* @brief Get the parameter passed to the error interface.
|
||||
* @return A C-style string containing the error interface parameter.
|
||||
*/
|
||||
const char *getArgs() const noexcept;
|
||||
};
|
||||
|
||||
@@ -1,11 +1,7 @@
|
||||
/**
|
||||
* \if English
|
||||
* @file Filter.hpp
|
||||
* @brief The processing unit of the SDK can perform point cloud generation, format conversion and other functions.
|
||||
* \else
|
||||
* @file Filter.hpp
|
||||
* @brief SDK的处理单元,可以进行点云的生成,格式转换等功能
|
||||
* \endif
|
||||
* @brief This file contains the Filter class, which is the processing unit of the SDK that can perform point cloud generation, format conversion, and other
|
||||
* functions.
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
@@ -16,8 +12,14 @@
|
||||
namespace ob {
|
||||
class Frame;
|
||||
|
||||
/**
|
||||
* @brief A callback function that takes a shared pointer to a Frame object as its argument.
|
||||
*/
|
||||
typedef std::function<void(std::shared_ptr<Frame>)> FilterCallback;
|
||||
|
||||
/**
|
||||
* @brief The Filter class is the base class for all filters in the SDK.
|
||||
*/
|
||||
class OB_EXTENSION_API Filter {
|
||||
public:
|
||||
Filter();
|
||||
@@ -25,53 +27,30 @@ 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
|
||||
* @brief filter重置,释放内部缓存,异步处理时停止处理线程并清空待处理的缓存帧
|
||||
* \endif
|
||||
* @brief ReSet the filter, freeing the internal cache, stopping the processing thread, and clearing the pending buffer frame when asynchronous processing
|
||||
* is used.
|
||||
*/
|
||||
virtual void reset();
|
||||
|
||||
/**
|
||||
* \if English
|
||||
* @brief Processing frames (synchronous interface)
|
||||
* @brief Processes a frame synchronously.
|
||||
*
|
||||
* @param frame frame to be processed
|
||||
* @return std::shared_ptr< Frame > processed frame
|
||||
* \else
|
||||
* @brief 处理帧(同步接口)
|
||||
*
|
||||
* @param frame 需要处理的frame
|
||||
* @return std::shared_ptr< Frame > 处理后的frame
|
||||
* \endif
|
||||
* @param frame The frame to be processed.
|
||||
* @return std::shared_ptr< Frame > The processed frame.
|
||||
*/
|
||||
virtual std::shared_ptr<Frame> process(std::shared_ptr<Frame> frame);
|
||||
|
||||
/**
|
||||
* \if English
|
||||
* @brief Push the pending frame into the cache (asynchronous callback interface)
|
||||
* @brief Pushes the pending frame into the cache for asynchronous processing.
|
||||
*
|
||||
* @param frame The pending frame processing result is returned by the callback function
|
||||
* \else
|
||||
* @brief 压入待处理frame到缓存(异步回调接口)
|
||||
*
|
||||
* @param frame 待处理的frame处理结果通过回调函数返回
|
||||
* \endif
|
||||
* @param frame The pending frame. The processing result is returned by the callback function.
|
||||
*/
|
||||
|
||||
virtual void pushFrame(std::shared_ptr<Frame> frame);
|
||||
|
||||
/**
|
||||
* \if English
|
||||
* @brief Set the callback function (asynchronous callback interface)
|
||||
* @brief Set the callback function for asynchronous processing.
|
||||
*
|
||||
* @param callback Processing result callback
|
||||
* \else
|
||||
* @brief 设置回调函数(异步回调接口)
|
||||
*
|
||||
* @param callback 处理结果回调
|
||||
* \endif
|
||||
* @param callback The processing result callback.
|
||||
*/
|
||||
virtual void setCallBack(FilterCallback callback);
|
||||
|
||||
@@ -79,118 +58,93 @@ protected:
|
||||
std::shared_ptr<FilterImpl> impl_;
|
||||
};
|
||||
|
||||
/**
|
||||
* @brief The PointCloudFilter class is a subclass of Filter that generates point clouds.
|
||||
*/
|
||||
class OB_EXTENSION_API PointCloudFilter : public Filter {
|
||||
public:
|
||||
PointCloudFilter();
|
||||
|
||||
/**
|
||||
* \if English
|
||||
* @brief Set point cloud type parameters
|
||||
* @brief Set the point cloud type parameters.
|
||||
*
|
||||
* @param type Point cloud type depth point cloud or RGBD point cloud
|
||||
* \else
|
||||
* @brief 设置点云类型参数
|
||||
*
|
||||
* @param type 点云类型 深度点云或RGBD点云
|
||||
* \endif
|
||||
* @param type The point cloud type: depth point cloud or RGBD point cloud.
|
||||
*/
|
||||
void setCreatePointFormat(OBFormat type);
|
||||
|
||||
/**
|
||||
* \if English
|
||||
* @brief Set camera parameters
|
||||
* @brief Set the camera parameters.
|
||||
*
|
||||
* @param param Camera internal and external parameters
|
||||
* \else
|
||||
* @brief 设置相机参数
|
||||
*
|
||||
* @param param 相机内外参数
|
||||
* \endif
|
||||
* @param param The camera internal and external parameters.
|
||||
*/
|
||||
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)
|
||||
* @brief Set the frame alignment state that will be input to generate point cloud.
|
||||
*
|
||||
* @param state Alignment status, True: enable alignment; False: disable alignment
|
||||
* \else
|
||||
* @brief 设置将要输入的用于生成点云的帧对齐状态(D2C模式下需要开启,作为算法选用那组相机内参的依据)
|
||||
*
|
||||
* @param state 对齐状态,True:开启对齐; False:关闭对齐
|
||||
* \endif
|
||||
* @param state The alignment status. True: enable alignment; False: disable alignment.
|
||||
*/
|
||||
void setFrameAlignState(bool state);
|
||||
|
||||
/**
|
||||
* \if English
|
||||
* @brief Set the point cloud coordinate data zoom factor
|
||||
* @brief Set the point cloud coordinate data zoom factor.
|
||||
*
|
||||
* @attention Calling this function to set the scale will change the point coordinate scaling factor of the output point cloud frame: posScale = posScale /
|
||||
* scale.The point coordinate scaling factor for the output point cloud frame can be obtained via @ref PointsFrame::getPositionValueScale function
|
||||
* scale. The point coordinate scaling factor for the output point cloud frame can be obtained via @ref PointsFrame::getPositionValueScale function.
|
||||
*
|
||||
* @param scale Zoom factor
|
||||
* \else
|
||||
* @brief 设置点云坐标数据缩放比例
|
||||
*
|
||||
* @attention 调用该函数设置缩放比例会改变输出点云帧的点坐标缩放系数:posScale = posScale / scale;
|
||||
* 输出点云帧的点坐标缩放系数可通过 @ref PointsFrame::getPositionValueScale 函数获取
|
||||
*
|
||||
* @param scale 缩放比例
|
||||
* \endif
|
||||
* @param scale The zoom factor.
|
||||
*/
|
||||
void setPositionDataScaled(float scale);
|
||||
|
||||
/**
|
||||
* \if English
|
||||
* @brief Set point cloud color data normalization
|
||||
* @brief Set point cloud color data normalization.
|
||||
*
|
||||
* @param state Whether normalization is required
|
||||
* \else
|
||||
* @brief 设置点云颜色数据归一化
|
||||
*
|
||||
* @param state 是否需要归一化
|
||||
* \endif
|
||||
* @param state Whether normalization is required.
|
||||
*/
|
||||
void setColorDataNormalization(bool state);
|
||||
|
||||
/**
|
||||
* @brief Set the point cloud coordinate system.
|
||||
*
|
||||
* @param type The coordinate system type.
|
||||
*/
|
||||
void setCoordinateSystem(OBCoordinateSystemType type);
|
||||
};
|
||||
|
||||
/**
|
||||
* @brief The FormatConvertFilter class is a subclass of Filter that performs format conversion.
|
||||
*/
|
||||
class OB_EXTENSION_API FormatConvertFilter : public Filter {
|
||||
public:
|
||||
FormatConvertFilter();
|
||||
|
||||
/**
|
||||
* \if English
|
||||
* @brief Set format conversion type
|
||||
* @brief Set the format conversion type.
|
||||
*
|
||||
* @param type Format conversion type
|
||||
* \else
|
||||
* @brief 设置格式转化类型
|
||||
*
|
||||
* @param type 格式转化类型
|
||||
* \endif
|
||||
* @param type The format conversion type.
|
||||
*/
|
||||
void setFormatConvertType(OBConvertFormat type);
|
||||
};
|
||||
|
||||
/**
|
||||
* @brief The CompressionFilter class is a subclass of Filter that performs compression.
|
||||
*/
|
||||
class OB_EXTENSION_API CompressionFilter : public Filter {
|
||||
public:
|
||||
CompressionFilter();
|
||||
|
||||
/**
|
||||
* \if English
|
||||
* @brief Set compression params
|
||||
* @brief Set the compression parameters.
|
||||
*
|
||||
* @param mode Compression mode OB_COMPRESSION_LOSSLESS or OB_COMPRESSION_LOSSY
|
||||
* @param params Compression params, when mode is OB_COMPRESSION_LOSSLESS, params is NULL
|
||||
* \else
|
||||
* @brief 设置压缩参数
|
||||
*
|
||||
* @param mode 压缩模式 OB_COMPRESSION_LOSSLESS or OB_COMPRESSION_LOSSY
|
||||
* @param params 压缩参数, 当mode为OB_COMPRESSION_LOSSLESS时,params为NULL
|
||||
* \endif
|
||||
* @param mode The compression mode: OB_COMPRESSION_LOSSLESS or OB_COMPRESSION_LOSSY.
|
||||
* @param params The compression parameters. When mode is OB_COMPRESSION_LOSSLESS, params is NULL.
|
||||
*/
|
||||
void setCompressionParams(OBCompressionMode mode, void *params);
|
||||
};
|
||||
|
||||
/**
|
||||
* @brief The DecompressionFilter class is a subclass of Filter that performs decompression.
|
||||
*/
|
||||
class OB_EXTENSION_API DecompressionFilter : public Filter {
|
||||
public:
|
||||
DecompressionFilter();
|
||||
|
||||
@@ -1,11 +1,6 @@
|
||||
/**
|
||||
* \if English
|
||||
* @file Frame.hpp
|
||||
* @brief Frame related type, which is mainly used to obtain frame data and frame information.
|
||||
* \else
|
||||
* @file Frame.hpp
|
||||
* @brief 帧相关类型,主要用于获取帧数据及帧的信息
|
||||
* \endif
|
||||
*
|
||||
*/
|
||||
#pragma once
|
||||
@@ -17,12 +12,12 @@
|
||||
#include <typeinfo>
|
||||
|
||||
/**
|
||||
* Frame类继承关系:
|
||||
* Frame class:
|
||||
* Frame
|
||||
* |
|
||||
* +------+----------+----------+-----------+
|
||||
* | | | | |
|
||||
* VideoFrame PointFrame AccelFrame GyroFrame FrameSet
|
||||
* VideoFrame PointsFrame AccelFrame GyroFrame FrameSet
|
||||
* |
|
||||
* +--+------+---------+
|
||||
* | | |
|
||||
@@ -47,149 +42,92 @@ protected:
|
||||
std::unique_ptr<FrameImpl> impl_;
|
||||
|
||||
public:
|
||||
Frame(std::unique_ptr<FrameImpl> impl);
|
||||
explicit Frame(std::unique_ptr<FrameImpl> impl);
|
||||
Frame(Frame &frame);
|
||||
|
||||
virtual ~Frame() noexcept;
|
||||
|
||||
/**
|
||||
* \if English
|
||||
* @brief Get the type of frame
|
||||
* @brief Get the type of frame.
|
||||
*
|
||||
* @return OBFrameType returns the type of frame
|
||||
* \else
|
||||
* @brief 获取帧的类型
|
||||
*
|
||||
* @return OBFrameType 返回帧的类型
|
||||
* \endif
|
||||
* @return OBFrameType The type of frame.
|
||||
*/
|
||||
virtual OBFrameType type();
|
||||
|
||||
/**
|
||||
* \if English
|
||||
* @brief Get the format of the frame
|
||||
* @brief Get the format of the frame.
|
||||
*
|
||||
* @return OBFormat returns the format of the frame
|
||||
* \else
|
||||
* @brief 获取帧的格式
|
||||
*
|
||||
* @return OBFormat 返回帧的格式
|
||||
* \endif
|
||||
* @return OBFormat The format of the frame.
|
||||
*/
|
||||
virtual OBFormat format();
|
||||
|
||||
/**
|
||||
* \if English
|
||||
* @brief Get the sequence number of the frame
|
||||
* @brief Get the sequence number of the frame.
|
||||
*
|
||||
* @return uint64_t returns the sequence number of the frame
|
||||
* \else
|
||||
* @brief 获取帧的序号
|
||||
*
|
||||
* @return uint64_t 返回帧的序号
|
||||
* \endif
|
||||
* @return uint64_t The sequence number of the frame.
|
||||
*/
|
||||
virtual uint64_t index();
|
||||
|
||||
/**
|
||||
* \if English
|
||||
* @brief Get frame data
|
||||
* @brief Get the frame data.
|
||||
*
|
||||
* @return void* returns frame data
|
||||
* \else
|
||||
* @brief 获取帧数据
|
||||
*
|
||||
* @return void* 返回帧数据
|
||||
* \endif
|
||||
* @return void* The frame data.
|
||||
*/
|
||||
virtual void *data();
|
||||
|
||||
/**
|
||||
* \if English
|
||||
* @brief Get the frame data size
|
||||
* @brief Get the size of the frame data.
|
||||
*
|
||||
* @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
|
||||
* @brief 获取帧数据大小
|
||||
*
|
||||
* @return uint32_t 返回帧数据的大小
|
||||
* 如果是点云数据返回的是所有点集合占的字节数,若需要求出点的个数需要将dataSize除以对应的点类型的结构体大小
|
||||
* \endif
|
||||
* @return uint32_t The size of the frame data.
|
||||
* For point cloud data, this returns the number of bytes occupied by all point sets. To find the number of points, divide the dataSize by the structure
|
||||
* size of the corresponding point type.
|
||||
*/
|
||||
virtual uint32_t dataSize();
|
||||
|
||||
/**
|
||||
* \if English
|
||||
* @brief Get the hardware timestamp of the frame
|
||||
* @brief Get the hardware timestamp of the frame in milliseconds.
|
||||
* @brief The hardware timestamp is the time point when the frame was captured by the device, on device clock domain.
|
||||
*
|
||||
* @return uint64_t returns the time stamp of the frame hardware
|
||||
* \else
|
||||
* @brief 获取帧的硬件时间戳
|
||||
*
|
||||
* @return uint64_t 返回帧硬件的时间戳
|
||||
* \endif
|
||||
* @return uint64_t The hardware timestamp of the frame in milliseconds.
|
||||
*/
|
||||
uint64_t timeStamp();
|
||||
|
||||
/**
|
||||
* \if English
|
||||
* @brief Get the hardware timestamp of the frame us
|
||||
* @brief Get the hardware timestamp of the frame in microseconds.
|
||||
* @brief The hardware timestamp is the time point when the frame was captured by the device, on device clock domain.
|
||||
*
|
||||
* @return uint64_t returns the time stamp of the frame hardware, unit us
|
||||
* \else
|
||||
* @brief 获取帧的硬件时间戳
|
||||
*
|
||||
* @return uint64_t 返回帧硬件的时间戳
|
||||
* \endif
|
||||
* @return uint64_t The hardware timestamp of the frame in microseconds.
|
||||
*/
|
||||
uint64_t timeStampUs();
|
||||
|
||||
/**
|
||||
* \if English
|
||||
* @brief Get frame system timestamp
|
||||
* @brief Get the system timestamp of the frame in milliseconds.
|
||||
* @brief The system timestamp is the time point when the frame was received by the host, on host clock domain.
|
||||
*
|
||||
* @return uint64_t returns the time stamp of the frame hardware
|
||||
* \else
|
||||
* @brief 获取帧的系统时间戳
|
||||
*
|
||||
* @return uint64_t 返回帧的系统时间戳
|
||||
* \endif
|
||||
* @return uint64_t The system timestamp of the frame in milliseconds.
|
||||
*/
|
||||
uint64_t systemTimeStamp();
|
||||
|
||||
/**
|
||||
* \if English
|
||||
* @brief Check if the runtime type of the frame object is compatible with a given type
|
||||
* @brief Check if the runtime type of the frame object is compatible with a given type.
|
||||
*
|
||||
* @tparam T Given type
|
||||
* @return bool returns result
|
||||
* \else
|
||||
* @brief 检查帧对象的运行时类型是否与给定类型兼容
|
||||
*
|
||||
* @tparam T 给定的类型
|
||||
* @return bool 返回结果
|
||||
* \endif
|
||||
* @tparam T The given type.
|
||||
* @return bool The result.
|
||||
*/
|
||||
template <typename T> bool is();
|
||||
|
||||
/**
|
||||
* \if English
|
||||
* @brief Frame object type conversion
|
||||
* @brief Convert the frame object to a target type.
|
||||
*
|
||||
* @tparam T Target type
|
||||
* @return std::shared_ptr<T> returns the result, if it cannot be converted, an exception will be thrown
|
||||
* \else
|
||||
* @brief 帧对象类型转换
|
||||
*
|
||||
* @tparam T 目标类型
|
||||
* @return std::shared_ptr<T> 返回结果, 如果不能够转换,将抛异常
|
||||
* \endif
|
||||
* @tparam T The target type.
|
||||
* @return std::shared_ptr<T> The result. If it cannot be converted, an exception will be thrown.
|
||||
*/
|
||||
template <typename T> std::shared_ptr<T> as() {
|
||||
if(!is<T>())
|
||||
throw "unsupported operation, object's type is not require type";
|
||||
if(!is<T>()) {
|
||||
throw std::runtime_error("unsupported operation, object's type is not require type");
|
||||
}
|
||||
|
||||
return std::static_pointer_cast<T>(std::const_pointer_cast<Frame>(shared_from_this()));
|
||||
return std::dynamic_pointer_cast<T>(shared_from_this());
|
||||
}
|
||||
|
||||
private:
|
||||
@@ -200,108 +138,83 @@ private:
|
||||
|
||||
class OB_EXTENSION_API VideoFrame : public Frame {
|
||||
public:
|
||||
VideoFrame(Frame &frame);
|
||||
virtual ~VideoFrame() noexcept {};
|
||||
explicit VideoFrame(Frame &frame);
|
||||
|
||||
explicit VideoFrame(std::unique_ptr<FrameImpl> impl);
|
||||
|
||||
~VideoFrame() noexcept override = default;
|
||||
|
||||
/**
|
||||
* \if English
|
||||
* @brief Get frame width
|
||||
* @brief Get the width of the frame.
|
||||
*
|
||||
* @return uint32_t returns the width of the frame
|
||||
* \else
|
||||
* @brief 获取帧的宽
|
||||
*
|
||||
* @return uint32_t 返回帧的宽
|
||||
* \endif
|
||||
* @return uint32_t The width of the frame.
|
||||
*/
|
||||
uint32_t width();
|
||||
|
||||
/**
|
||||
* \if English
|
||||
* @brief Get frame height
|
||||
* @brief Get the height of the frame.
|
||||
*
|
||||
* @return uint32_t returns the height of the frame
|
||||
* \else
|
||||
* @brief 获取帧的高
|
||||
*
|
||||
* @return uint32_t 返回帧的高
|
||||
* \endif
|
||||
* @return uint32_t The height of the frame.
|
||||
*/
|
||||
uint32_t height();
|
||||
|
||||
/**
|
||||
* \if English
|
||||
* @brief Get the metadata of the frame
|
||||
* @brief Get the metadata of the frame.
|
||||
*
|
||||
* @return void* returns the metadata of the frame
|
||||
* \else
|
||||
* @brief 获取帧的元数据
|
||||
*
|
||||
* @return void* 返回帧的元数据
|
||||
* \endif
|
||||
* @return void* The metadata of the frame.
|
||||
*/
|
||||
void *metadata();
|
||||
|
||||
/**
|
||||
* \if English
|
||||
* @brief Get the metadata size of the frame
|
||||
* @brief Get the size of the metadata of the frame.
|
||||
*
|
||||
* @return uint32_t returns the metadata size of the frame
|
||||
* \else
|
||||
* @brief 获取帧的元数据大小
|
||||
*
|
||||
* @return uint32_t 返回帧的元数据大小
|
||||
* \endif
|
||||
* @return uint32_t The size of the metadata of the frame.
|
||||
*/
|
||||
uint32_t metadataSize();
|
||||
|
||||
/**
|
||||
* \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
|
||||
* @brief Get the effective number of pixels in the frame.
|
||||
* @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
|
||||
* @brief 获取像素有效位数(如Y16格式帧,每个像素占16bit,但实际只有低10位是有效位,高6位填充0)
|
||||
* @attention 仅对Y8/Y10/Y11/Y12/Y14/Y16格式有效
|
||||
*
|
||||
* @return uint8_t 返回像素有效位数,如果是不支持的格式,返回0
|
||||
* \endif
|
||||
* @return uint8_t The effective number of pixels in the frame, or 0 if it is an unsupported format.
|
||||
*/
|
||||
uint8_t pixelAvailableBitSize();
|
||||
};
|
||||
|
||||
class OB_EXTENSION_API ColorFrame : public VideoFrame {
|
||||
public:
|
||||
ColorFrame(Frame &frame);
|
||||
~ColorFrame() noexcept {};
|
||||
explicit ColorFrame(Frame &frame);
|
||||
|
||||
explicit ColorFrame(std::unique_ptr<FrameImpl> impl);
|
||||
|
||||
~ColorFrame() noexcept override = default;
|
||||
};
|
||||
|
||||
class OB_EXTENSION_API DepthFrame : public VideoFrame {
|
||||
public:
|
||||
DepthFrame(Frame &frame);
|
||||
~DepthFrame() noexcept {};
|
||||
explicit DepthFrame(Frame &frame);
|
||||
|
||||
explicit DepthFrame(std::unique_ptr<FrameImpl> impl);
|
||||
|
||||
~DepthFrame() noexcept override = default;
|
||||
|
||||
/**
|
||||
* \if English
|
||||
* @brief Get the value scale of the depth frame. The pixel value of depth frame is multiplied by the scale to give a depth value in millimeter.
|
||||
* such as valueScale=0.1, and a certain coordinate pixel value is pixelValue=10000, then the depth value = pixelValue*valueScale = 10000*0.1=1000mm。
|
||||
* @brief Get the value scale of the depth frame. The pixel value of depth frame is multiplied by the scale to give a depth value in millimeters.
|
||||
* For example, if valueScale=0.1 and a certain coordinate pixel value is pixelValue=10000, then the depth value = pixelValue*valueScale =
|
||||
* 10000*0.1=1000mm.
|
||||
*
|
||||
* @return float scale
|
||||
* \else
|
||||
* @brief 获取深度帧的值缩放系数,深度像素值乘以缩放系数后,可以得到单位为毫米的深度值; 如valueScale=0.1, 某坐标像素值为pixelValue=10000,
|
||||
* 则表示深度值value = pixelValue*valueScale = 10000*0.1=1000mm。
|
||||
*
|
||||
* @return float 缩放系数
|
||||
* \endif
|
||||
* @return float The scale.
|
||||
*/
|
||||
float getValueScale();
|
||||
};
|
||||
|
||||
class OB_EXTENSION_API IRFrame : public VideoFrame {
|
||||
public:
|
||||
IRFrame(Frame &frame);
|
||||
virtual ~IRFrame() noexcept {};
|
||||
explicit IRFrame(Frame &frame);
|
||||
|
||||
explicit IRFrame(std::unique_ptr<FrameImpl> impl);
|
||||
|
||||
~IRFrame() noexcept override = default;
|
||||
|
||||
public:
|
||||
OBSensorType getDataSource();
|
||||
@@ -309,245 +222,225 @@ public:
|
||||
|
||||
class OB_EXTENSION_API PointsFrame : public Frame {
|
||||
public:
|
||||
PointsFrame(Frame &frame);
|
||||
~PointsFrame() noexcept {};
|
||||
explicit PointsFrame(Frame &frame);
|
||||
|
||||
explicit PointsFrame(std::unique_ptr<FrameImpl> impl);
|
||||
|
||||
~PointsFrame() noexcept override = default;
|
||||
|
||||
/**
|
||||
* \if English
|
||||
* @brief Get the point position value scale of the points frame. the point position value of points frame is multiplied by the scale to give a position
|
||||
* value in millimeter. such as scale=0.1, The x-coordinate value of a point is x = 10000, which means that the actual x-coordinate value = x*scale =
|
||||
* 10000*0.1 = 1000mm.
|
||||
* @brief Get the point position value scale of the points frame. The point position value of the points frame is multiplied by the scale to give a position
|
||||
* value in millimeters. For example, if scale=0.1, the x-coordinate value of a point is x = 10000, which means that the actual x-coordinate value = x*scale
|
||||
* = 10000*0.1 = 1000mm.
|
||||
*
|
||||
* @param[in] frame Frame object
|
||||
* @param[out] error Log error messages
|
||||
* @return float position value scale
|
||||
* \else
|
||||
* @brief 获取点云帧的点坐标值缩放系数,点坐标值乘以缩放系数后,可以得到单位为毫米的坐标值; 如scale=0.1, 某个点的x坐标值为x=10000,
|
||||
* 则表示实际x坐标value = x*scale = 10000*0.1=1000mm。
|
||||
*
|
||||
* @return float 缩放系数
|
||||
* \endif
|
||||
* @return float The position value scale.
|
||||
*/
|
||||
float getPositionValueScale();
|
||||
};
|
||||
|
||||
/**
|
||||
* @brief Define the FrameSet class, which inherits from the Frame class
|
||||
*
|
||||
*/
|
||||
class OB_EXTENSION_API FrameSet : public Frame {
|
||||
|
||||
public:
|
||||
// FrameSet();
|
||||
FrameSet(Frame &frame);
|
||||
~FrameSet() noexcept;
|
||||
explicit FrameSet(std::unique_ptr<FrameImpl> impl);
|
||||
|
||||
explicit FrameSet(Frame &frame);
|
||||
|
||||
~FrameSet() noexcept override;
|
||||
|
||||
/**
|
||||
* \if English
|
||||
* @brief Get frame count
|
||||
* @brief Get the number of frames in the FrameSet
|
||||
*
|
||||
* @return uint32_t returns the number of frames
|
||||
* \else
|
||||
* @brief 帧集合中包含的帧数量
|
||||
*
|
||||
* @return uint32_t 返回帧的数量
|
||||
* \endif
|
||||
* @return uint32_t The number of frames
|
||||
*/
|
||||
uint32_t frameCount();
|
||||
|
||||
/**
|
||||
* \if English
|
||||
* @brief Get depth frame
|
||||
* @brief Get the depth frame in the FrameSet
|
||||
*
|
||||
* @return std::shared_ptr<DepthFrame> returns the depth frame
|
||||
* \else
|
||||
* @brief 获取深度帧
|
||||
*
|
||||
* @return std::shared_ptr<DepthFrame> 返回深度帧
|
||||
* \endif
|
||||
* @return std::shared_ptr<DepthFrame> The depth frame
|
||||
*/
|
||||
std::shared_ptr<DepthFrame> depthFrame();
|
||||
|
||||
/**
|
||||
* \if English
|
||||
* @brief Get color frame
|
||||
* @brief Get the color frame in the FrameSet
|
||||
*
|
||||
* @return std::shared_ptr<ColorFrame> returns the color frame
|
||||
* \else
|
||||
* @brief 获取彩色帧
|
||||
*
|
||||
* @return std::shared_ptr<ColorFrame> 返回彩色帧
|
||||
* \endif
|
||||
* @return std::shared_ptr<ColorFrame> The color frame
|
||||
*/
|
||||
std::shared_ptr<ColorFrame> colorFrame();
|
||||
|
||||
/**
|
||||
* \if English
|
||||
* @brief Get infrared frame
|
||||
* @brief Get the infrared frame in the FrameSet
|
||||
*
|
||||
* @return std::shared_ptr<IRFrame> returns infrared frame
|
||||
* \else
|
||||
* @brief 获取红外帧
|
||||
*
|
||||
* @return std::shared_ptr<IRFrame> 返回红外帧
|
||||
* \endif
|
||||
* @return std::shared_ptr<IRFrame> The infrared frame
|
||||
*/
|
||||
std::shared_ptr<IRFrame> irFrame();
|
||||
|
||||
/**
|
||||
* \if English
|
||||
* @brief Get point cloud frame
|
||||
* @brief Get the point cloud frame in the FrameSet
|
||||
*
|
||||
* @return std::shared_ptr<PointsFrame> returns the point cloud data frame
|
||||
* \else
|
||||
* @brief 获取点云帧
|
||||
*
|
||||
* @return std::shared_ptr<PointsFrame> 返回点云帧
|
||||
* \endif
|
||||
* @return std::shared_ptr<PointsFrame> The point cloud data frame
|
||||
*/
|
||||
std::shared_ptr<PointsFrame> pointsFrame();
|
||||
|
||||
/**
|
||||
* \if English
|
||||
* @brief Get frame by sensor type
|
||||
* @brief Get a frame of a specific type from the FrameSet
|
||||
*
|
||||
* @param frameType Type of sensor
|
||||
* @return std::shared_ptr<Frame> returns the corresponding type of frame
|
||||
* \else
|
||||
* @brief 通过传感器类型获取帧
|
||||
*
|
||||
* @param frameType 传感器的类型
|
||||
* @return std::shared_ptr<Frame> 返回相应类型的帧
|
||||
* \endif
|
||||
* @param frameType The type of sensor
|
||||
* @return std::shared_ptr<Frame> The corresponding type of frame
|
||||
*/
|
||||
std::shared_ptr<Frame> getFrame(OBFrameType frameType);
|
||||
|
||||
/**
|
||||
* @brief Get a frame at a specific index from the FrameSet
|
||||
*
|
||||
* @param index The index of the frame
|
||||
* @return std::shared_ptr<Frame> The frame at the specified index
|
||||
*/
|
||||
std::shared_ptr<Frame> getFrame(int index);
|
||||
|
||||
// Declare Pipeline and Filter classes as friends
|
||||
friend class Pipeline;
|
||||
friend class Filter;
|
||||
};
|
||||
|
||||
/**
|
||||
* @brief Define the AccelFrame class, which inherits from the Frame class
|
||||
*
|
||||
*/
|
||||
class OB_EXTENSION_API AccelFrame : public Frame {
|
||||
public:
|
||||
AccelFrame(Frame &frame);
|
||||
~AccelFrame() noexcept = default;
|
||||
explicit AccelFrame(Frame &frame);
|
||||
|
||||
explicit AccelFrame(std::unique_ptr<FrameImpl> impl);
|
||||
|
||||
~AccelFrame() noexcept override = default;
|
||||
|
||||
/**
|
||||
* \if English
|
||||
* @brief Accelerometer frame data
|
||||
* @brief Get the accelerometer frame data
|
||||
*
|
||||
* @return OBAccelValue
|
||||
* \else
|
||||
* @brief 获取加速度帧X数据
|
||||
*
|
||||
* @return OBAccelValue
|
||||
* \endif
|
||||
* @return OBAccelValue The accelerometer frame data
|
||||
*/
|
||||
OBAccelValue value();
|
||||
|
||||
/**
|
||||
* \if English
|
||||
* @brief Get the temperature when the frame is sampled
|
||||
* @brief Get the temperature when the frame was sampled
|
||||
*
|
||||
* @return float temperature value
|
||||
* \else
|
||||
* @brief 获取帧采样时的温度
|
||||
*
|
||||
* @return float 温度值
|
||||
* \endif
|
||||
* @return float The temperature value
|
||||
*/
|
||||
float temperature();
|
||||
};
|
||||
|
||||
/**
|
||||
* @brief Define the GyroFrame class, which inherits from the Frame class
|
||||
*/
|
||||
class OB_EXTENSION_API GyroFrame : public Frame {
|
||||
public:
|
||||
GyroFrame(Frame &frame);
|
||||
~GyroFrame() noexcept = default;
|
||||
explicit GyroFrame(Frame &frame);
|
||||
|
||||
explicit GyroFrame(std::unique_ptr<FrameImpl> impl);
|
||||
|
||||
~GyroFrame() noexcept override = default;
|
||||
|
||||
/**
|
||||
* \if English
|
||||
* @brief Get gyro frame data
|
||||
* @brief Get the gyro frame data
|
||||
*
|
||||
* @return OBAccelValue
|
||||
* \else
|
||||
* @brief 获取陀螺仪帧数据
|
||||
*
|
||||
* @return OBAccelValue
|
||||
* \endif
|
||||
* @return OBAccelValue The gyro frame data
|
||||
*/
|
||||
OBGyroValue value();
|
||||
|
||||
/**
|
||||
* \if English
|
||||
* @brief Get temperature when the frame is sampled.
|
||||
* @brief Get the temperature when the frame was sampled
|
||||
*
|
||||
* @return float temperature value
|
||||
* \else
|
||||
* @brief 获取帧采样时的温度
|
||||
*
|
||||
* @return float 温度值
|
||||
* \endif
|
||||
* @return float The temperature value
|
||||
*/
|
||||
float temperature();
|
||||
};
|
||||
|
||||
/**
|
||||
* @brief Define the FrameHelper class
|
||||
*/
|
||||
class OB_EXTENSION_API FrameHelper {
|
||||
public:
|
||||
FrameHelper();
|
||||
~FrameHelper();
|
||||
/**
|
||||
* @brief 根据外部创建的Buffer创建帧对象
|
||||
* @brief Create a Frame object.
|
||||
*
|
||||
* @param format 帧对象格式
|
||||
* @param frameWidth 帧对象宽
|
||||
* @param frameHeight 帧对象高
|
||||
* @param buffer 帧对象数据
|
||||
* @param bufferSize 帧对象数据大小
|
||||
* @return std::shared_ptr<Frame> 返回帧对象
|
||||
* @param[in] type The type of frame. See @ref OBFrameType.
|
||||
* @param[in] format The format of the frame. See @ref OBFormat.
|
||||
* @param[in] width The width of the frame.
|
||||
* @param[in] height The height of the frame.
|
||||
* @param[in] strideBytes The stride of the frame in bytes. If strideBytes > 0, the frame data size = height * strideBytes. If strideBytes = 0, the frame
|
||||
* datasize = height * width * pixelSize (pixelSize according to the format).
|
||||
*
|
||||
* @return std::shared_ptr<Frame> The created frame object.
|
||||
*/
|
||||
static std::shared_ptr<Frame> createFrameFromBuffer(OBFormat format, uint32_t frameWidth, uint32_t frameHeight, uint8_t *buffer, uint32_t bufferSize,
|
||||
static std::shared_ptr<Frame> createFrame(OBFrameType type, OBFormat format, uint32_t width, uint32_t height, uint32_t strideBytes);
|
||||
|
||||
/**
|
||||
* @brief Create a frame object based on an externally created buffer
|
||||
*
|
||||
* @param[in] format The format of the frame. See @ref OBFormat.
|
||||
* @param[in] width The width of the frame.
|
||||
* @param[in] height The height of the frame.
|
||||
* @param[in] buffer The frame object buffer
|
||||
* @param[in] bufferSize The frame object buffer size
|
||||
* @param[in] destroyCallback The frame object buffer destroy callback
|
||||
* @param[in] destroyCallbackContext The frame object buffer destroy callback context
|
||||
*
|
||||
* @return std::shared_ptr<Frame> The created frame object
|
||||
*/
|
||||
static std::shared_ptr<Frame> createFrameFromBuffer(OBFormat format, uint32_t width, uint32_t height, uint8_t *buffer, uint32_t bufferSize,
|
||||
BufferDestroyCallback destroyCallback, void *destroyCallbackContext);
|
||||
|
||||
/**
|
||||
* @brief 创建空的帧集合对象
|
||||
* @brief Create an empty FrameSet object
|
||||
*
|
||||
* @return std::shared_ptr<Frame> 返回帧集合对象
|
||||
* @return std::shared_ptr<Frame> The FrameSet object
|
||||
*/
|
||||
static std::shared_ptr<Frame> createFrameSet();
|
||||
static std::shared_ptr<FrameSet> createFrameSet();
|
||||
|
||||
/**
|
||||
* @brief 往帧集合中填入对应类型的帧
|
||||
* @brief Add a frame of a specific type to the FrameSet
|
||||
*
|
||||
* @param frameSet 帧集合对象
|
||||
* @param frameType 填入帧的类型
|
||||
* @param frame 填入帧的对象
|
||||
* @param frameSet The FrameSet object
|
||||
* @param frameType The type of frame to add
|
||||
* @param frame The frame object to add
|
||||
*/
|
||||
static void pushFrame(std::shared_ptr<Frame> frameSet, OBFrameType frameType, std::shared_ptr<Frame> frame);
|
||||
|
||||
/**
|
||||
* @brief 设置帧的系统时间戳
|
||||
* @brief Set the system timestamp of the frame.
|
||||
*
|
||||
* @param frame 设置的帧对象
|
||||
* @param systemTimestamp 设置的系统时间戳
|
||||
* @param frame The frame object.
|
||||
* @param systemTimestamp The system timestamp to set in milliseconds.
|
||||
*/
|
||||
static void setFrameSystemTimestamp(std::shared_ptr<Frame> frame, uint64_t systemTimestamp);
|
||||
|
||||
/**
|
||||
* @brief 设置帧的设备时间戳
|
||||
* @brief Set the device timestamp of the frame.
|
||||
*
|
||||
* @param frame 设置的帧对象
|
||||
* @param deviceTimestamp 设置的设备时间戳
|
||||
* @param frame The frame object.
|
||||
* @param deviceTimestamp The device timestamp to set in milliseconds.
|
||||
*/
|
||||
static void setFrameDeviceTimestamp(std::shared_ptr<Frame> frame, uint64_t deviceTimestamp);
|
||||
|
||||
/**
|
||||
* @brief 设置帧的设备时间戳
|
||||
* @brief Set the device timestamp of the frame.
|
||||
*
|
||||
* @param frame 设置的帧对象
|
||||
* @param deviceTimestampUs 设置的设备时间戳(Us)
|
||||
* @param frame The frame object.
|
||||
* @param deviceTimestampUs The device timestamp to set in microseconds.
|
||||
*/
|
||||
static void setFrameDeviceTimestampUs(std::shared_ptr<Frame> frame, uint64_t deviceTimestampUs);
|
||||
};
|
||||
|
||||
// Define the is() template function for the Frame class
|
||||
template <typename T> bool Frame::is() {
|
||||
switch(this->type()) {
|
||||
case OB_FRAME_IR_LEFT: // follow
|
||||
case OB_FRAME_IR_RIGHT: // follow
|
||||
case OB_FRAME_IR_LEFT: // Follow
|
||||
case OB_FRAME_IR_RIGHT: // Follow
|
||||
case OB_FRAME_IR:
|
||||
return (typeid(T) == typeid(IRFrame) || typeid(T) == typeid(VideoFrame));
|
||||
case OB_FRAME_DEPTH:
|
||||
@@ -563,7 +456,7 @@ template <typename T> bool Frame::is() {
|
||||
case OB_FRAME_POINTS:
|
||||
return (typeid(T) == typeid(PointsFrame));
|
||||
default:
|
||||
std::cout << "ob::Frame::is() not catch frame type: " << (int)this->type() << std::endl;
|
||||
std::cout << "ob::Frame::is() did not catch frame type: " << (int)this->type() << std::endl;
|
||||
break;
|
||||
}
|
||||
return false;
|
||||
|
||||
@@ -1,11 +1,7 @@
|
||||
/**
|
||||
* \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
|
||||
* @file Pipeline.hpp
|
||||
* @brief SDK的高级API类型,可以快速实现开关流,帧同步,软件滤波,生成点云等操作
|
||||
* \endif
|
||||
* operations.
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
@@ -35,343 +31,212 @@ 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 是SDK的高级接口,适用于应用,算法等重点关注RGBD数据流常见,Pipeline在SDK内部可以提供对齐,同步后的FrameSet桢集合
|
||||
* 直接方便客户使用。
|
||||
* Pipeline()无参数版本,默认打开连接到OS的设备列表中的第一个设备。若应用已经通过DeviceList获取设备,此时打开Pipeline()会抛出设备已经创建异常。
|
||||
* 需要开发者捕获异常处理。
|
||||
* \endif
|
||||
* obtained the device through the DeviceList, opening the Pipeline() at this time will throw an exception that the device has been created.
|
||||
*/
|
||||
Pipeline();
|
||||
|
||||
/**
|
||||
* \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
|
||||
* @brief
|
||||
* Pipeline(std::shared_ptr< Device > device )函数,适用于多设备操作常见,此时需要通过DeviceList获取多个设备,通过该接口实现device和pipeline绑定。
|
||||
* \endif
|
||||
* and pipeline are bound through this interface.
|
||||
*/
|
||||
Pipeline(std::shared_ptr<Device> device);
|
||||
|
||||
/**
|
||||
* \if English
|
||||
* @brief Create a pipeline for playback of recorded stream files
|
||||
* @brief Construct a pipeline for playback of recorded stream files
|
||||
*
|
||||
* @param filename Playback file path
|
||||
* \else
|
||||
* @brief 创建pipeline用于回放录制好的流文件
|
||||
*
|
||||
* @param filename 回放文件路径
|
||||
* \endif
|
||||
* @param filename The file path of the recorded stream file to be played back
|
||||
*/
|
||||
Pipeline(const char *filename);
|
||||
|
||||
/**
|
||||
* @brief Destroy the pipeline object
|
||||
*/
|
||||
~Pipeline() noexcept;
|
||||
|
||||
/**
|
||||
* \if English
|
||||
* @brief Start the pipeline with configuration parameters
|
||||
*
|
||||
* @param config Parameter configuration of pipeline
|
||||
* \else
|
||||
* @brief 启动pipeline并配置参数
|
||||
*
|
||||
* @param config pipeline的参数配置
|
||||
* \endif
|
||||
* @param config The parameter configuration of the pipeline
|
||||
*/
|
||||
void start(std::shared_ptr<Config> config);
|
||||
|
||||
/**
|
||||
* \if English
|
||||
* @brief Start the pipeline and set the frameset data callback
|
||||
*
|
||||
* @param config parameter configuration of pipeline
|
||||
* @param callback Set the callback to be triggered when all frame data in the frame set arrives
|
||||
* \else
|
||||
* @brief 启动pipeline并设置帧集合数据回调
|
||||
*
|
||||
* @param config pipeline的参数配置
|
||||
* @param callback 设置帧集合中的所有帧数据都到达时触发回调
|
||||
* \endif
|
||||
* @param config The parameter configuration of the pipeline
|
||||
* @param callback The callback to be triggered when all frame data in the frameset arrives
|
||||
*/
|
||||
void start(std::shared_ptr<Config> config, FrameSetCallback callback);
|
||||
|
||||
/**
|
||||
* \if English
|
||||
* @brief Stop pipeline
|
||||
* \else
|
||||
* @brief 停止pipeline
|
||||
* \endif
|
||||
* @brief Stop the pipeline
|
||||
*/
|
||||
void stop();
|
||||
|
||||
/**
|
||||
* \if English
|
||||
* @brief Get pipeline configuration parameters
|
||||
* @brief Get the pipeline configuration parameters
|
||||
*
|
||||
* @return std::shared_ptr<Config> returns the configured parameters
|
||||
* \else
|
||||
* @brief 获取pipeline的配置参数
|
||||
*
|
||||
* @return std::shared_ptr<Config> 返回配置的参数
|
||||
* \endif
|
||||
* @return std::shared_ptr<Config> The configured parameters
|
||||
*/
|
||||
std::shared_ptr<Config> getConfig();
|
||||
|
||||
/**
|
||||
* \if English
|
||||
* @brief Waiting for frame set data
|
||||
* @brief Wait for frameset data
|
||||
*
|
||||
* @param timeout_ms Waiting timeout (ms)
|
||||
* @return std::shared_ptr<FrameSet> returns the waiting frame set data
|
||||
* \else
|
||||
* @brief 等待帧集合数据
|
||||
*
|
||||
* @param timeout_ms 等待超时时间(毫秒)
|
||||
* @return std::shared_ptr<FrameSet> 返回等待的帧集合数据
|
||||
* \endif
|
||||
* @param timeout_ms The waiting timeout in milliseconds
|
||||
* @return std::shared_ptr<FrameSet> The waiting frameset data
|
||||
*/
|
||||
std::shared_ptr<FrameSet> waitForFrames(uint32_t timeout_ms);
|
||||
|
||||
/**
|
||||
* \if English
|
||||
* @brief Get device object
|
||||
* @brief Get the device object
|
||||
*
|
||||
* @return std::shared_ptr<Device> returns the device object
|
||||
* \else
|
||||
* @brief 获取设备对象
|
||||
*
|
||||
* @return std::shared_ptr<Device> 返回设备对象
|
||||
* \endif
|
||||
* @return std::shared_ptr<Device> The device object
|
||||
*/
|
||||
std::shared_ptr<Device> getDevice();
|
||||
|
||||
/**
|
||||
* \if English
|
||||
* @brief Get playback object
|
||||
* @brief Get the playback object
|
||||
*
|
||||
* @return std::shared_ptr<Playback> returns the playback object
|
||||
* \else
|
||||
* @brief 获取回放对象
|
||||
*
|
||||
* @return std::shared_ptr<Playback> 返回回放对象
|
||||
* \endif
|
||||
* @return std::shared_ptr<Playback> The playback object
|
||||
*/
|
||||
std::shared_ptr<Playback> getPlayback();
|
||||
|
||||
/**
|
||||
* \if English
|
||||
* @brief Get the stream profile of specified sensor
|
||||
* @brief Get the stream profile of the specified sensor
|
||||
*
|
||||
* @param sensorType Type of sensor
|
||||
|
||||
* @return std::shared_ptr<StreamProfileList> returns the stream configuration list
|
||||
* \else
|
||||
* @brief 获取指定传感器的流配置
|
||||
*
|
||||
* @param sensorType 传感器的类型
|
||||
* @return std::shared_ptr<StreamProfileList> 返回流配置列表
|
||||
* \endif
|
||||
* @param sensorType The type of sensor
|
||||
* @return std::shared_ptr<StreamProfileList> The stream profile list
|
||||
*/
|
||||
std::shared_ptr<StreamProfileList> getStreamProfileList(OBSensorType sensorType);
|
||||
|
||||
/**
|
||||
* \if English
|
||||
* @brief Turn on frame synchronization
|
||||
* \else
|
||||
* @brief 打开帧同步功能
|
||||
* \endif
|
||||
*
|
||||
*/
|
||||
void enableFrameSync();
|
||||
|
||||
/**
|
||||
* \if English
|
||||
* @brief Turn off frame synchronization
|
||||
* \else
|
||||
* @brief 关闭帧同步功能
|
||||
* \endif
|
||||
*/
|
||||
void disableFrameSync();
|
||||
|
||||
/**
|
||||
* \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
|
||||
* @brief Get the camera parameters
|
||||
*
|
||||
* @return OBCameraParam returns camera parameters
|
||||
* \else
|
||||
* @brief 获取相机参数
|
||||
* @attention 如果开启了D2C将返回D2C后的相机参数
|
||||
* @note If D2C is enabled, it will return the camera parameters after D2C. If not, it will return the default parameters.
|
||||
*
|
||||
* @return OBCameraParam返回相机参数
|
||||
* \endif
|
||||
* @return OBCameraParam The camera parameters
|
||||
*/
|
||||
OBCameraParam getCameraParam();
|
||||
|
||||
/**
|
||||
* \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<StreamProfileList> returns a list of depth sensor resolutions
|
||||
* \else
|
||||
* @brief 返回与输入的彩色传感器分辨率对应的支持D2C的深度传感器分辨率列表
|
||||
* @param colorProfile 输入的彩色传感器分辨率
|
||||
* @param alignMode 输入的对齐模式
|
||||
*
|
||||
* @return std::shared_ptr<StreamProfileList> 返回深度传感器分辨率列表
|
||||
* \endif
|
||||
* @param colorProfile The input color sensor resolution
|
||||
* @param alignMode The input align mode
|
||||
* @return std::shared_ptr<StreamProfileList> A list of depth sensor resolutions
|
||||
*/
|
||||
std::shared_ptr<StreamProfileList> getD2CDepthProfileList(std::shared_ptr<StreamProfile> colorProfile, OBAlignMode alignMode);
|
||||
|
||||
/**
|
||||
* \if English
|
||||
* @brief Get valid area between minimum distance and maximum distance after D2C
|
||||
* @brief Get the valid area between the minimum distance and maximum distance after D2C
|
||||
*
|
||||
* @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后给定工作范围的有效区域
|
||||
* 如果需要获取指定距离D2C后的ROI区域,将minimum_distance与maximum_distance设置成一样或者将maximum_distance设置成0
|
||||
*
|
||||
* @param minimumDistance 最小工作距离
|
||||
* @param maximumDistance 最大工作距离
|
||||
* @return OBRect 返回在工作距离下D2C后有效的区域信息
|
||||
* \endif
|
||||
* @param minimumDistance The minimum working distance
|
||||
* @param maximumDistance The maximum working distance (optional)
|
||||
* @return OBRect The area information valid after D2C at the working distance
|
||||
*/
|
||||
OBRect getD2CValidArea(uint32_t minimumDistance, uint32_t maximumDistance = 0);
|
||||
|
||||
/**
|
||||
* \if English
|
||||
* @brief Dynamically switch the corresponding config configuration
|
||||
*
|
||||
* @param config Updated config configuration
|
||||
* \else
|
||||
* @brief 动态切换对应的config配置
|
||||
*
|
||||
* @param config 更新后的config配置
|
||||
* \endif
|
||||
* @param config The updated config configuration
|
||||
*/
|
||||
void switchConfig(std::shared_ptr<Config> config);
|
||||
|
||||
/**
|
||||
* \if English
|
||||
* @brief start recording
|
||||
* @brief Start recording
|
||||
*
|
||||
* @param filename Record file name
|
||||
* \else
|
||||
* @brief 开始录制
|
||||
*
|
||||
* @param filename 录制文件名
|
||||
* \endif
|
||||
* @param filename The name of the record file
|
||||
*/
|
||||
void startRecord(const char *filename);
|
||||
|
||||
/**
|
||||
* \if English
|
||||
* @brief Stop recording
|
||||
* \else
|
||||
* @brief 停止录制
|
||||
* \endif
|
||||
*/
|
||||
void stopRecord();
|
||||
};
|
||||
|
||||
/**
|
||||
* @brief Config class for configuring pipeline parameters
|
||||
*
|
||||
* The Config class provides an interface for configuring pipeline parameters.
|
||||
*/
|
||||
class OB_EXTENSION_API Config {
|
||||
private:
|
||||
std::unique_ptr<ConfigImpl> impl_;
|
||||
|
||||
public:
|
||||
/**
|
||||
* @brief Construct a new Config object
|
||||
*/
|
||||
Config();
|
||||
|
||||
/**
|
||||
* @brief Destroy the Config object
|
||||
*/
|
||||
~Config() noexcept;
|
||||
|
||||
/**
|
||||
* \if English
|
||||
* @brief Configure the stream to be enabled
|
||||
* @brief Enable a stream to be used in the pipeline
|
||||
*
|
||||
* @param streamProfile Stream configuration
|
||||
* \else
|
||||
* @brief 设置要打开的流配置
|
||||
*
|
||||
* @param streamProfile 流的配置
|
||||
* \endif
|
||||
* @param streamProfile The stream configuration to be enabled
|
||||
*/
|
||||
void enableStream(std::shared_ptr<StreamProfile> streamProfile);
|
||||
|
||||
/**
|
||||
* \if English
|
||||
* @brief Configure all streams to be enabled
|
||||
* \else
|
||||
* @brief 设置打开所有的流
|
||||
* \endif
|
||||
* @brief Enable all streams to be used in the pipeline
|
||||
*/
|
||||
void enableAllStream();
|
||||
|
||||
/**
|
||||
* \if English
|
||||
* @brief Configure the stream to be disabled
|
||||
* @brief Disable a stream to be used in the pipeline
|
||||
*
|
||||
* @param streamType Stream configuration
|
||||
* \else
|
||||
* @brief 设置要关闭的流配置
|
||||
*
|
||||
* @param streamType 流的配置
|
||||
* \endif
|
||||
* @param streamType The stream configuration to be disabled
|
||||
*/
|
||||
void disableStream(OBStreamType streamType);
|
||||
|
||||
/**
|
||||
* \if English
|
||||
* @brief Configure all streams to be disabled
|
||||
* \else
|
||||
* @brief 设置关闭所有的流
|
||||
* \endif
|
||||
* @brief Disable all streams to be used in the pipeline
|
||||
*/
|
||||
void disableAllStream();
|
||||
|
||||
/**
|
||||
* \if English
|
||||
* @brief Set the alignment mode
|
||||
*
|
||||
* @param mode Align State Mode
|
||||
* \else
|
||||
* @brief 设置对齐模式
|
||||
*
|
||||
* @param mode 对齐状态模式
|
||||
* \endif
|
||||
* @param mode The alignment mode
|
||||
*/
|
||||
void setAlignMode(OBAlignMode mode);
|
||||
|
||||
/**
|
||||
* \if English
|
||||
* @brief Whether the depth needs to be scaled after setting D2C
|
||||
* @brief Set whether the depth needs to be scaled after setting D2C
|
||||
*
|
||||
* @param enable Whether scaling is required
|
||||
* \else
|
||||
* @brief 设置D2C后是否需要缩放深度
|
||||
*
|
||||
* @param enable 是否需要缩放
|
||||
* \endif
|
||||
*/
|
||||
void setDepthScaleRequire(bool enable);
|
||||
|
||||
/**
|
||||
* \if English
|
||||
* @brief Set the D2C target resolution, which is applicable to cases where the Color stream is not enabled using the OrbbecSDK and the depth needs to be
|
||||
* D2C Note: When you use OrbbecSDK to enable the Color stream, you also use this interface to set the D2C target resolution. The configuration of the
|
||||
* enabled Color stream is preferred for D2C.
|
||||
* @param d2cTargetWidth The D2C target has a wide resolution
|
||||
* @param d2cTargetHeight The D2C target has a high resolutio
|
||||
* \else
|
||||
* @brief 设置D2C目标分辨率,适用于未使用OrbbecSDK开启Color流,且需要对深度进行D2C的情况
|
||||
* 注意:当使用OrbbecSDK开启Color流时,同时使用了此接口设置了D2C目标分辨率时。优先使用开启的Color流的配置进行D2C。
|
||||
* @brief Set the D2C target resolution
|
||||
* @brief The D2C target resolution is applicable to cases where the color stream is not enabled using the OrbbecSDK and the depth needs to be D2C.
|
||||
*
|
||||
* @param d2cTargetWidth D2C目标分辨率宽
|
||||
* @param d2cTargetHeight D2C目标分辨率高
|
||||
* \endif
|
||||
* @note When you use OrbbecSDK to enable the color stream, you also use this interface to set the D2C target resolution. The configuration of the
|
||||
* enabled Color stream is preferred for D2C.
|
||||
*
|
||||
* @param d2cTargetWidth The D2C target width resolution
|
||||
* @param d2cTargetHeight The D2C target height resolution
|
||||
*/
|
||||
void setD2CTargetResolution(uint32_t d2cTargetWidth, uint32_t d2cTargetHeight);
|
||||
|
||||
|
||||
@@ -1,13 +1,8 @@
|
||||
/**
|
||||
* \if English
|
||||
*
|
||||
* @file RecordPlayback.hpp
|
||||
* @brief For recording and playback functions
|
||||
* \else
|
||||
* @file RecordPlayback.hpp
|
||||
* @brief 用于录制和回放功能
|
||||
* \endif
|
||||
* @brief Header file for recording and playback functions.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "Types.hpp"
|
||||
@@ -17,11 +12,12 @@ struct RecorderImpl;
|
||||
struct PlaybackImpl;
|
||||
|
||||
namespace ob {
|
||||
|
||||
class Device;
|
||||
class Frame;
|
||||
class DeviceInfo;
|
||||
|
||||
using PlaybackCallback = std::function<void(std::shared_ptr<Frame> frame)>;
|
||||
using PlaybackCallback = std::function<void(std::shared_ptr<Frame> frame)>;
|
||||
using MediaStateCallback = std::function<void(OBMediaState state)>;
|
||||
|
||||
class OB_EXTENSION_API Recorder {
|
||||
@@ -30,62 +26,36 @@ private:
|
||||
|
||||
public:
|
||||
/**
|
||||
* \if English
|
||||
* @brief Create a recorder for data recording
|
||||
* \else
|
||||
* @brief 创建录制器用于数据的录制
|
||||
* \endif
|
||||
* @brief Create a recorder for data recording.
|
||||
*/
|
||||
Recorder();
|
||||
Recorder(std::unique_ptr<RecorderImpl> impl);
|
||||
|
||||
/**
|
||||
* \if English
|
||||
* @brief Create a recorder for data recording
|
||||
* @param device Devices that need to record device information
|
||||
* \else
|
||||
* @brief 创建录制器用于数据的录制
|
||||
* @param device 需要录制设备信息的设备
|
||||
* \endif
|
||||
* @brief Create a recorder for data recording.
|
||||
* @param device The device for which to record device information.
|
||||
*/
|
||||
Recorder(std::shared_ptr<Device> device);
|
||||
|
||||
virtual ~Recorder() noexcept;
|
||||
|
||||
/**
|
||||
* \if English
|
||||
* @brief Enable the recorder, throw an exception after failure
|
||||
* @brief Enable the recorder. Throws an exception on failure.
|
||||
*
|
||||
* @param filename Recorded file name
|
||||
* @param async Whether to execute asynchronously
|
||||
* \else
|
||||
* @brief 开启录制器,失败后抛出异常
|
||||
*
|
||||
* @param filename 录制的文件名称
|
||||
* @param async 是否异步执行
|
||||
* \endif
|
||||
* @param filename The name of the recorded file.
|
||||
* @param async Whether to execute asynchronously.
|
||||
*/
|
||||
void start(const char *filename, bool async = false);
|
||||
|
||||
/**
|
||||
* \if English
|
||||
* @brief Stop the recorder, throw an exception on failure
|
||||
* \else
|
||||
* @brief 停止录制器,失败后抛出异常
|
||||
* \endif
|
||||
* @brief Stop the recorder. Throws an exception on failure.
|
||||
*/
|
||||
void stop();
|
||||
|
||||
/**
|
||||
* \if English
|
||||
* @brief Write frame data to the recorder
|
||||
* @brief Write frame data to the recorder.
|
||||
*
|
||||
* @param frame Write frame data
|
||||
* \else
|
||||
* @brief 向录制器内写入帧数据
|
||||
*
|
||||
* @param frame 写入的帧数据
|
||||
* \endif
|
||||
* @param frame The frame data to write.
|
||||
*/
|
||||
void write(std::shared_ptr<Frame> frame);
|
||||
};
|
||||
@@ -96,76 +66,42 @@ private:
|
||||
|
||||
public:
|
||||
/**
|
||||
* \if English
|
||||
* @brief Create playback object
|
||||
* @param filename Playback filename
|
||||
* \else
|
||||
* @brief 创建回放对象
|
||||
* @param filename 回放的文件名
|
||||
* \endif
|
||||
* @brief Create a playback object.
|
||||
* @param filename The name of the playback file.
|
||||
*/
|
||||
Playback(const char *filename);
|
||||
Playback(std::unique_ptr<PlaybackImpl> impl);
|
||||
virtual ~Playback() noexcept;
|
||||
|
||||
/**
|
||||
* \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
|
||||
* @brief 开启回放,回放数据从回调中返回,失败后抛出异常
|
||||
* @param filename 回放的文件名
|
||||
* @param callback 回放数据的回调
|
||||
* @param type 回放数据的类型
|
||||
* \endif
|
||||
* @brief Start playback. The playback data is returned from the callback. Throws an exception on failure.
|
||||
* @param callback The callback for playback data.
|
||||
* @param type The type of playback data.
|
||||
*/
|
||||
void start(PlaybackCallback callback, OBMediaType type = OB_MEDIA_ALL);
|
||||
|
||||
/**
|
||||
* \if English
|
||||
* @brief Stop playback and throw an exception if it fails
|
||||
* \else
|
||||
* @brief 停止回放,失败后抛出异常
|
||||
* \endif
|
||||
* @brief Stop playback. Throws an exception on failure.
|
||||
*/
|
||||
void stop();
|
||||
|
||||
/**
|
||||
* \if English
|
||||
* @brief Set playback state
|
||||
* @param state playback status callback
|
||||
* \else
|
||||
* @brief 设置回放状态
|
||||
* @param state 回放状态回调
|
||||
* \endif
|
||||
* @brief Set the playback state.
|
||||
* @param state The playback status callback.
|
||||
*/
|
||||
void setPlaybackStateCallback(MediaStateCallback state);
|
||||
|
||||
/**
|
||||
* \if English
|
||||
* @brief Get the device information in the recording file
|
||||
* @brief Get the device information in the recording file.
|
||||
*
|
||||
* @return DeviceInfo returns device information
|
||||
* \else
|
||||
* @brief 获取录制文件内的设备信息
|
||||
*
|
||||
* @return DeviceInfo 返回的设备信息
|
||||
* \endif
|
||||
* @return DeviceInfo The device information.
|
||||
*/
|
||||
std::shared_ptr<DeviceInfo> getDeviceInfo();
|
||||
|
||||
/**
|
||||
* \if English
|
||||
* @brief Get the intrinsic and extrinsic parameter information in the recording file
|
||||
* @brief Get the intrinsic and extrinsic parameter in the recording file.
|
||||
*
|
||||
* @return OBCameraParam returns internal and external parameter information
|
||||
* \else
|
||||
* @brief 获取录制文件内的内外参信息
|
||||
*
|
||||
* @return OBCameraParam 返回的内外参信息
|
||||
* \endif
|
||||
* @return OBCameraParam The internal and external parameter.
|
||||
*/
|
||||
OBCameraParam getCameraParam();
|
||||
};
|
||||
|
||||
@@ -1,11 +1,6 @@
|
||||
/**
|
||||
* \if English
|
||||
* @file Sensor.hpp
|
||||
* @brief Sensor related types, used to obtain stream configuration, open and close streams, set and get sensor properties.
|
||||
* \else
|
||||
* @file Sensor.hpp
|
||||
* @brief 传感器相关类型,用于获取流配置,开关流,设置及获取传感器属性等操作
|
||||
* \endif
|
||||
* @brief Defines types related to sensors, which are used to obtain stream configurations, open and close streams, and set and get sensor properties.
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
@@ -25,15 +20,9 @@ class Frame;
|
||||
class ImuFrame;
|
||||
|
||||
/**
|
||||
* \if English
|
||||
* @brief frame data callback
|
||||
* @brief Callback function for frame data.
|
||||
*
|
||||
* @param frame frame data
|
||||
* \else
|
||||
* @brief 帧数据回调
|
||||
*
|
||||
* @param frame 帧数据
|
||||
* \endif
|
||||
* @param frame The frame data.
|
||||
*/
|
||||
using FrameCallback = std::function<void(std::shared_ptr<Frame> frame)>;
|
||||
|
||||
@@ -46,64 +35,36 @@ public:
|
||||
virtual ~Sensor() noexcept;
|
||||
|
||||
/**
|
||||
* \if English
|
||||
* @brief sensor type
|
||||
* @brief Get the sensor type.
|
||||
*
|
||||
* @return OBSensorType returns the sensor type
|
||||
* \else
|
||||
* @brief 传感器类型
|
||||
*
|
||||
* @return OBSensorType 返回传感器类型
|
||||
* \endif
|
||||
* @return OBSensorType The sensor type.
|
||||
*/
|
||||
OBSensorType type();
|
||||
|
||||
/**
|
||||
* \if English
|
||||
* @brief Get the list of stream profiles
|
||||
* @brief Get the list of stream profiles.
|
||||
*
|
||||
* @return std::shared_ptr<StreamProfileList> returns the stream configuration list
|
||||
* \else
|
||||
* @brief 获取传感器的流配置列表
|
||||
*
|
||||
* @return std::shared_ptr<StreamProfileList> 返回流配置列表
|
||||
* \endif
|
||||
* @return std::shared_ptr<StreamProfileList> The stream profile list.
|
||||
*/
|
||||
const std::shared_ptr<StreamProfileList> getStreamProfileList();
|
||||
|
||||
/**
|
||||
* \if English
|
||||
* @brief Open frame data stream and set up a callback
|
||||
* @brief Open a frame data stream and set up a callback.
|
||||
*
|
||||
* @param streamProfile Stream configuration
|
||||
* @param callback Set the callback when frame data arrives
|
||||
* \else
|
||||
* @brief 开启流并设置帧数据回调
|
||||
*
|
||||
* @param streamProfile 流的配置
|
||||
* @param callback 设置帧数据到达时的回调
|
||||
* \endif
|
||||
* @param streamProfile The stream configuration.
|
||||
* @param callback The callback to set when frame data arrives.
|
||||
*/
|
||||
void start(std::shared_ptr<StreamProfile> streamProfile, FrameCallback callback);
|
||||
|
||||
/**
|
||||
* \if English
|
||||
* @brief Stop stream
|
||||
* \else
|
||||
* @brief 停止流
|
||||
* \endif
|
||||
* @brief Stop the stream.
|
||||
*/
|
||||
void stop();
|
||||
|
||||
/**
|
||||
* \if English
|
||||
* @brief Dynamically switch resolutions
|
||||
* @brief Dynamically switch resolutions.
|
||||
*
|
||||
* @param streamProfile Resolution to switch
|
||||
* \else
|
||||
* @brief 动态切换分辨率
|
||||
*
|
||||
* @param streamProfile 需要切换的分辨率
|
||||
* \endif
|
||||
* @param streamProfile The resolution to switch to.
|
||||
*/
|
||||
void switchProfile(std::shared_ptr<StreamProfile> streamProfile);
|
||||
};
|
||||
@@ -118,61 +79,33 @@ public:
|
||||
virtual ~SensorList() noexcept;
|
||||
|
||||
/**
|
||||
* \if English
|
||||
* @brief Get sensor count
|
||||
* @brief Get the number of sensors.
|
||||
*
|
||||
* @return uint32_t returns the number of Sensors
|
||||
* \else
|
||||
* @brief 获取Sensor数量
|
||||
*
|
||||
* @return uint32_t 返回Sensor的数量
|
||||
* \endif
|
||||
* @return uint32_t The number of sensors.
|
||||
*/
|
||||
uint32_t count();
|
||||
|
||||
/**
|
||||
* \if English
|
||||
* @brief Get the type of the specified Sensor
|
||||
* @brief Get the type of the specified sensor.
|
||||
*
|
||||
* @param index Sensor index
|
||||
* @return OBSensorType returns the Sensor type
|
||||
* \else
|
||||
* @brief 获取指定Sensor的类型
|
||||
*
|
||||
* @param index Sensor索引
|
||||
* @return OBSensorType 返回Sensor类型
|
||||
* \endif
|
||||
* @param index The sensor index.
|
||||
* @return OBSensorType The sensor type.
|
||||
*/
|
||||
OBSensorType type(uint32_t index);
|
||||
|
||||
/**
|
||||
* \if English
|
||||
* @brief Get Sensor by index number
|
||||
* @brief Get a sensor by index number.
|
||||
*
|
||||
* @param index To create a device cable, the range is [0, count-1], if the index exceeds the range, an exception will be thrown
|
||||
|
||||
* @return std::shared_ptr<Sensor> returns the Sensor object
|
||||
* \else
|
||||
* @brief 通过索引号获取Sensor
|
||||
*
|
||||
* @param index 要创建设备的索,范围 [0, count-1],如果index超出范围将抛异常
|
||||
* @return std::shared_ptr<Sensor> 返回Sensor对象
|
||||
* \endif
|
||||
* @param index The sensor index. The range is [0, count-1]. If the index exceeds the range, an exception will be thrown.
|
||||
* @return std::shared_ptr<Sensor> The sensor object.
|
||||
*/
|
||||
std::shared_ptr<Sensor> getSensor(uint32_t index);
|
||||
|
||||
/**
|
||||
* \if English
|
||||
* @brief Obtain the Sensor through the Sensor type
|
||||
* @brief Get a sensor by sensor type.
|
||||
*
|
||||
* @param sensorType Sensor type to be obtained
|
||||
* @return std::shared_ptr<Sensor> returns a Sensor object, if the specified type of Sensor does not exist, it will return empty
|
||||
* \else
|
||||
* @brief 通过Sensor类型获取Sensor
|
||||
*
|
||||
* @param sensorType 要获取的Sensor类型
|
||||
* @return std::shared_ptr<Sensor> 返回Sensor对象,如果指定类型Sensor不存在,将返回空
|
||||
* \endif
|
||||
* @param sensorType The sensor type to obtain.
|
||||
* @return std::shared_ptr<Sensor> A sensor object. If the specified sensor type does not exist, it will return empty.
|
||||
*/
|
||||
std::shared_ptr<Sensor> getSensor(OBSensorType sensorType);
|
||||
};
|
||||
|
||||
@@ -1,11 +1,6 @@
|
||||
/**
|
||||
* \if English
|
||||
* @file StreamProfile.hpp
|
||||
* @brief The stream configuration related type is used to get information such as the width, height, frame rate, and format of the stream.
|
||||
* \else
|
||||
* @file StreamProfile.hpp
|
||||
* @brief 流配置相关类型,用于获取流的宽、高、帧率及格式等信息
|
||||
* \endif
|
||||
* @brief The stream profile related type is used to get information such as the width, height, frame rate, and format of the stream.
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
@@ -31,64 +26,40 @@ protected:
|
||||
public:
|
||||
StreamProfile(std::unique_ptr<StreamProfileImpl> impl);
|
||||
StreamProfile(StreamProfile &streamProfile);
|
||||
~StreamProfile() noexcept;
|
||||
virtual ~StreamProfile() noexcept;
|
||||
|
||||
/**
|
||||
* \if English
|
||||
* @brief Get the format of the stream
|
||||
*
|
||||
* @return OBFormat returns the format of the stream
|
||||
* \else
|
||||
* @brief 获取流的格式
|
||||
*
|
||||
* @return OBFormat 返回流的格式
|
||||
* \endif
|
||||
* @return OBFormat return the format of the stream
|
||||
*/
|
||||
OBFormat format() const;
|
||||
|
||||
/**
|
||||
* \if English
|
||||
* @brief Get the type of stream
|
||||
*
|
||||
* @return OBStreamType returns the type of the stream
|
||||
* \else
|
||||
* @brief 获取流的类型
|
||||
*
|
||||
* @return OBStreamType 返回流的类型
|
||||
* \endif
|
||||
* @return OBStreamType return the type of the stream
|
||||
*/
|
||||
OBStreamType type() const;
|
||||
|
||||
/**
|
||||
* \if English
|
||||
* @brief Check if frame object is compatible with the given type
|
||||
*
|
||||
* @tparam T Given type
|
||||
* @return bool return result
|
||||
* \else
|
||||
* @brief 检查帧对象的运行时类型是否与给定类型兼容
|
||||
*
|
||||
* @tparam T 给定的类型
|
||||
* @return bool 返回结果
|
||||
* \endif
|
||||
*/
|
||||
template <typename T> bool is();
|
||||
|
||||
/**
|
||||
* \if English
|
||||
* @brief Object type conversion
|
||||
* @brief Converts object type to target type
|
||||
*
|
||||
* @tparam T Target type
|
||||
* @return std::shared_ptr<T> returns the result, if it cannot be converted, an exception will be thrown
|
||||
* \else
|
||||
* @brief 对象类型转换
|
||||
*
|
||||
* @tparam T 目标类型
|
||||
* @return std::shared_ptr<T> 返回结果, 如果不能够转换,将抛异常
|
||||
* \endif
|
||||
* @tparam T Target type
|
||||
* @return std::shared_ptr<T> Return the result. Throws an exception if conversion is not possible.
|
||||
*/
|
||||
template <typename T> std::shared_ptr<T> as() {
|
||||
if(!is<T>())
|
||||
throw "unsupported operation, object's type is not require type";
|
||||
if(!is<T>()) {
|
||||
throw std::runtime_error("Unsupported operation. Object's type is not the required type.");
|
||||
}
|
||||
|
||||
return std::static_pointer_cast<T>(std::const_pointer_cast<StreamProfile>(shared_from_this()));
|
||||
}
|
||||
@@ -98,109 +69,86 @@ public:
|
||||
friend class Pipeline;
|
||||
};
|
||||
|
||||
/**
|
||||
* @brief Class representing a video stream profile.
|
||||
*/
|
||||
class OB_EXTENSION_API VideoStreamProfile : public StreamProfile {
|
||||
public:
|
||||
VideoStreamProfile(StreamProfile &profile);
|
||||
~VideoStreamProfile() noexcept;
|
||||
explicit VideoStreamProfile(StreamProfile &profile);
|
||||
|
||||
explicit VideoStreamProfile(std::unique_ptr<StreamProfileImpl> impl);
|
||||
|
||||
~VideoStreamProfile() noexcept override;
|
||||
|
||||
/**
|
||||
* \if English
|
||||
* @brief Get stream frame rate
|
||||
* @brief Return the frame rate of the stream.
|
||||
*
|
||||
* @return uint32_t returns the frame rate of the stream
|
||||
* \else
|
||||
* @brief 获取流的帧率
|
||||
*
|
||||
* @return uint32_t 返回流的帧率
|
||||
* \endif
|
||||
* @return uint32_t Return the frame rate of the stream.
|
||||
*/
|
||||
uint32_t fps() const;
|
||||
|
||||
/**
|
||||
* \if English
|
||||
* @brief Get stream width
|
||||
* @brief Return the width of the stream.
|
||||
*
|
||||
* @return uint32_t returns the width of the stream
|
||||
* \else
|
||||
* @brief 获取流的宽
|
||||
*
|
||||
* @return uint32_t 返回流的宽
|
||||
* \endif
|
||||
* @return uint32_t Return the width of the stream.
|
||||
*/
|
||||
uint32_t width() const;
|
||||
|
||||
/**
|
||||
* \if English
|
||||
* @brief Get stream height
|
||||
* @brief Return the height of the stream.
|
||||
*
|
||||
* @return uint32_t returns the high of the stream
|
||||
* \else
|
||||
* @brief 获取流的高
|
||||
*
|
||||
* @return uint32_t 返回流的高
|
||||
* \endif
|
||||
* @return uint32_t Return the height of the stream.
|
||||
*/
|
||||
uint32_t height() const;
|
||||
};
|
||||
|
||||
/**
|
||||
* @brief Class representing an accelerometer stream profile.
|
||||
*/
|
||||
class OB_EXTENSION_API AccelStreamProfile : public StreamProfile {
|
||||
public:
|
||||
AccelStreamProfile(StreamProfile &profile);
|
||||
~AccelStreamProfile() noexcept;
|
||||
explicit AccelStreamProfile(StreamProfile &profile);
|
||||
|
||||
explicit AccelStreamProfile(std::unique_ptr<StreamProfileImpl> impl);
|
||||
|
||||
~AccelStreamProfile() noexcept override;
|
||||
|
||||
/**
|
||||
* \if English
|
||||
* @brief Get full scale range
|
||||
* @brief Return the full scale range.
|
||||
*
|
||||
* @return OBAccelFullScaleRange returns the scale range value
|
||||
* \else
|
||||
* @brief 获取满量程范围
|
||||
*
|
||||
* @return OBAccelFullScaleRange 返回量程范围值
|
||||
* \endif
|
||||
* @return OBAccelFullScaleRange Return the scale range value.
|
||||
*/
|
||||
OBAccelFullScaleRange fullScaleRange() const;
|
||||
|
||||
/**
|
||||
* \if English
|
||||
* @brief Get sampling frequency
|
||||
* @brief Return the sampling frequency.
|
||||
*
|
||||
* @return OBAccelFullScaleRange returns the sampling frequency
|
||||
* \else
|
||||
* @brief 获取采样频率
|
||||
*
|
||||
* @return OBAccelFullScaleRange 返回采样频率
|
||||
* \endif
|
||||
* @return OBAccelFullScaleRange Return the sampling frequency.
|
||||
*/
|
||||
OBAccelSampleRate sampleRate() const;
|
||||
};
|
||||
|
||||
/**
|
||||
* @brief Class representing a gyroscope stream profile.
|
||||
*/
|
||||
class OB_EXTENSION_API GyroStreamProfile : public StreamProfile {
|
||||
public:
|
||||
GyroStreamProfile(StreamProfile &profile);
|
||||
~GyroStreamProfile() noexcept;
|
||||
explicit GyroStreamProfile(StreamProfile &profile);
|
||||
|
||||
explicit GyroStreamProfile(std::unique_ptr<StreamProfileImpl> impl);
|
||||
~GyroStreamProfile() noexcept override;
|
||||
|
||||
/**
|
||||
* \if English
|
||||
* @brief Get full scale range
|
||||
* @brief Return the full scale range.
|
||||
*
|
||||
* @return OBAccelFullScaleRange returns the scale range value
|
||||
* \else
|
||||
* @brief 获取满量程范围
|
||||
*
|
||||
* @return OBAccelFullScaleRange 返回量程范围值
|
||||
* \endif
|
||||
* @return OBAccelFullScaleRange Return the scale range value.
|
||||
*/
|
||||
OBGyroFullScaleRange fullScaleRange() const;
|
||||
|
||||
/**
|
||||
* \if English
|
||||
* @brief Get sampling frequency
|
||||
* @brief Return the sampling frequency.
|
||||
*
|
||||
* @return OBAccelFullScaleRange returns the sampling frequency
|
||||
* \else
|
||||
* @brief 获取采样频率
|
||||
*
|
||||
* @return OBAccelFullScaleRange 返回采样频率
|
||||
* \endif
|
||||
* @return OBAccelFullScaleRange Return the sampling frequency.
|
||||
*/
|
||||
OBGyroSampleRate sampleRate() const;
|
||||
};
|
||||
@@ -229,58 +177,53 @@ protected:
|
||||
std::unique_ptr<StreamProfileListImpl> impl_;
|
||||
|
||||
public:
|
||||
StreamProfileList(std::unique_ptr<StreamProfileListImpl> impl);
|
||||
explicit StreamProfileList(std::unique_ptr<StreamProfileListImpl> impl);
|
||||
~StreamProfileList() noexcept;
|
||||
|
||||
/**
|
||||
* \if English
|
||||
* @brief Get stream profile count
|
||||
* @brief Return the number of StreamProfile objects.
|
||||
*
|
||||
* @return uint32_t returns the number of StreamProfile
|
||||
* \else
|
||||
* @brief 获取StreamProfile数量
|
||||
*
|
||||
* @return uint32_t 返回StreamProfile的数量
|
||||
* \endif
|
||||
* @return uint32_t Return the number of StreamProfile objects.
|
||||
*/
|
||||
uint32_t count() const;
|
||||
|
||||
/**
|
||||
* \if English
|
||||
* @brief Get StreamProfile by index number
|
||||
* @brief Return the StreamProfile object at the specified index.
|
||||
*
|
||||
* @param index Device index to be created,the range is [0, count-1],if the index exceeds the range, an exception will be thrown
|
||||
* @return std::shared_ptr<StreamProfile> returns StreamProfile object
|
||||
* \else
|
||||
* @brief 通过索引号获取StreamProfile
|
||||
*
|
||||
* @param index 要创建设备的索,范围 [0, count-1],如果index超出范围将抛异常
|
||||
* @return std::shared_ptr<StreamProfile> 返回StreamProfile对象
|
||||
* \endif
|
||||
* @param index The index of the StreamProfile object to be retrieved. Must be in the range [0, count-1]. Throws an exception if the index is out of range.
|
||||
* @return std::shared_ptr<StreamProfile> Return the StreamProfile object.
|
||||
*/
|
||||
const std::shared_ptr<StreamProfile> getProfile(uint32_t index);
|
||||
|
||||
/**
|
||||
* \if English
|
||||
* @brief Match the corresponding stream profile through the passed in parameters. If there are multiple matches,
|
||||
* the first one in the list will be returned by default. If no matched profile found, will throw exception!
|
||||
* @brief Match the corresponding video stream profile based on the passed-in parameters. If multiple Match are found, the first one in the list is
|
||||
* returned by default. Throws an exception if no matching profile is found.
|
||||
*
|
||||
* @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<StreamProfile> Returns the matching resolution
|
||||
* \else
|
||||
* @brief 通过传入的参数进行匹配对应的StreamProfile。若有多个匹配项默认返回列表中的第一个, 若没有找到匹配的项,则抛异常
|
||||
*
|
||||
* @param width 宽度,如不要求加入匹配条件,可传0
|
||||
* @param height 高度,如不要求加入匹配条件,可传0
|
||||
* @param format 类型,如不要求加入匹配条件,可传OB_FORMAT_UNKNOWN
|
||||
* @param fps 帧率,如不要求加入匹配条件,可传0
|
||||
* @return std::shared_ptr<StreamProfile> 返回匹配的分辨率
|
||||
* \endif
|
||||
* @param width The width of the stream. Pass 0 if no matching condition is required.
|
||||
* @param height The height of the stream. Pass 0 if no matching condition is required.
|
||||
* @param format The type of the stream. Pass OB_FORMAT_UNKNOWN if no matching condition is required.
|
||||
* @param fps The frame rate of the stream. Pass 0 if no matching condition is required.
|
||||
* @return std::shared_ptr<VideoStreamProfile> Return the matching resolution.
|
||||
*/
|
||||
const std::shared_ptr<VideoStreamProfile> getVideoStreamProfile(int width = 0, int height = 0, OBFormat format = OB_FORMAT_UNKNOWN, int fps = 0);
|
||||
|
||||
/**
|
||||
* @brief Match the corresponding accelerometer stream profile based on the passed-in parameters. If multiple Match are found, the first one in the list
|
||||
* is returned by default. Throws an exception if no matching profile is found.
|
||||
*
|
||||
* @param fullScaleRange The full scale range. Pass 0 if no matching condition is required.
|
||||
* @param sampleRate The sampling frequency. Pass 0 if no matching condition is required.
|
||||
*/
|
||||
const std::shared_ptr<AccelStreamProfile> getAccelStreamProfile(OBAccelFullScaleRange fullScaleRange, OBAccelSampleRate sampleRate);
|
||||
|
||||
/**
|
||||
* @brief Match the corresponding gyroscope stream profile based on the passed-in parameters. If multiple Match are found, the first one in the list is
|
||||
* returned by default. Throws an exception if no matching profile is found.
|
||||
*
|
||||
* @param fullScaleRange The full scale range. Pass 0 if no matching condition is required.
|
||||
* @param sampleRate The sampling frequency. Pass 0 if no matching condition is required.
|
||||
*/
|
||||
const std::shared_ptr<GyroStreamProfile> getGyroStreamProfile(OBGyroFullScaleRange fullScaleRange, OBGyroSampleRate sampleRate);
|
||||
};
|
||||
|
||||
} // namespace ob
|
||||
} // namespace ob
|
||||
|
||||
@@ -1,14 +1,8 @@
|
||||
/**
|
||||
* \if English
|
||||
* \file Types.hpp
|
||||
* \brief Provide SDK structure and enumeration constant definition (depending on libobsensor/h/ObTypes.h)
|
||||
* \else
|
||||
* \file Types.hpp
|
||||
* \brief 提供SDK的结构体、枚举常量定义(依赖libobsensor/h/ObTypes.h)
|
||||
*
|
||||
* \endif
|
||||
*
|
||||
* @file Types.hpp
|
||||
* @brief Provides SDK structure and enumeration constant definitions (depending on libobsensor/h/ObTypes.h).
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "libobsensor/h/ObTypes.h"
|
||||
@@ -20,77 +14,44 @@ extern "C" {
|
||||
#endif
|
||||
|
||||
/**
|
||||
* \if English
|
||||
* @brief file transfer callbacks
|
||||
* @brief Callback function for file transfer status updates.
|
||||
*
|
||||
* @param state file transfer status
|
||||
* @param message status information
|
||||
* \else
|
||||
* @brief 文件传输回调
|
||||
*
|
||||
* @param state 文件传输状态
|
||||
* @param message 状态信息
|
||||
* \endif
|
||||
* @param state The file transfer status.
|
||||
* @param message Status information.
|
||||
* @param percent The percentage of the file that has been transferred.
|
||||
*/
|
||||
using SendFileCallback = std::function<void(OBFileTranState state, const char *message, uint8_t percent)>;
|
||||
|
||||
/**
|
||||
* \if English
|
||||
* @brief device upgrade callback
|
||||
* @brief Callback function for device upgrade status updates.
|
||||
*
|
||||
* @param state upgrade status
|
||||
* @param message status information
|
||||
* \else
|
||||
* @brief 设备升级回调
|
||||
*
|
||||
* @param state 升级状态
|
||||
* @param message 状态信息
|
||||
* \endif
|
||||
* @param state The device upgrade status.
|
||||
* @param message Status information.
|
||||
* @param percent The percentage of the upgrade that has been completed.
|
||||
*/
|
||||
using DeviceUpgradeCallback = std::function<void(OBUpgradeState state, const char *message, uint8_t percent)>;
|
||||
|
||||
/**
|
||||
* \if English
|
||||
* @brief device status callback
|
||||
* @brief Callback function for device status updates.
|
||||
*
|
||||
* @param state device status
|
||||
* @param message status information
|
||||
* \else
|
||||
* @brief 设备状态回调
|
||||
*
|
||||
* @param state 设备状态
|
||||
* @param message 状态信息
|
||||
* \endif
|
||||
* @param state The device status.
|
||||
* @param message Status information.
|
||||
*/
|
||||
using DeviceStateChangedCallback = std::function<void(OBDeviceState state, const char *message)>;
|
||||
|
||||
/**
|
||||
* \if English
|
||||
* @brief get raw data property data when data and progress callbacks
|
||||
* @brief Callback function for getting raw data property data when data and progress callbacks are made.
|
||||
*
|
||||
* @param dataChunk data chunk
|
||||
* @param state get the data status
|
||||
* \else
|
||||
* @brief 获取raw data属性数据时数据及进度回调
|
||||
*
|
||||
* @param dataChunk 数据块
|
||||
* @param state 获取数据状态
|
||||
* \endif
|
||||
* @param dataChunk The data chunk.
|
||||
* @param state The status of getting the data.
|
||||
*/
|
||||
using GetDataCallback = std::function<void(OBDataTranState state, OBDataChunk *dataChunk)>;
|
||||
|
||||
/**
|
||||
* \if English
|
||||
* @brief set the raw data property when the progress callback is made
|
||||
* @brief Callback function for setting the raw data property when progress callbacks are made.
|
||||
*
|
||||
* @param percent progress percentage
|
||||
* @param state set the data status
|
||||
* \else
|
||||
* @brief 设置raw data属性数据时进度回调
|
||||
*
|
||||
* @param percent 进度百分比
|
||||
* @param state 设置数据状态
|
||||
* \endif
|
||||
* @param percent The progress percentage.
|
||||
* @param state The status of setting the data.
|
||||
*/
|
||||
using SetDataCallback = std::function<void(OBDataTranState state, uint8_t percent)>;
|
||||
|
||||
|
||||
@@ -1,11 +1,6 @@
|
||||
/**
|
||||
* \if English
|
||||
* @file Version.hpp
|
||||
* @brief Get the SDK version information
|
||||
* \else
|
||||
* @file Version.hpp
|
||||
* @brief 获取SDK版本号相关信息的类
|
||||
* \endif
|
||||
* @brief Provides functions to retrieve version information of the SDK.
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
@@ -13,53 +8,38 @@ namespace ob {
|
||||
class OB_EXTENSION_API Version {
|
||||
public:
|
||||
/**
|
||||
* \if English
|
||||
* @brief Get the SDK major version number
|
||||
* @brief Get the major version number of the SDK.
|
||||
*
|
||||
* @return int returns the SDK major version number
|
||||
* \else
|
||||
* @brief 获取SDK主版本号
|
||||
*
|
||||
* @return int 返回SDK主版本号
|
||||
* \endif
|
||||
* @return int The major version number of the SDK.
|
||||
*/
|
||||
static int getMajor();
|
||||
|
||||
/**
|
||||
* \if English
|
||||
* @brief Get the SDK minor version number
|
||||
* @brief Get the minor version number of the SDK.
|
||||
*
|
||||
* @return int returns the SDK minor version number
|
||||
* \else
|
||||
* @brief 获取SDK副版本号
|
||||
*
|
||||
* @return int 返回SDK副版本号
|
||||
* \endif
|
||||
* @return int The minor version number of the SDK.
|
||||
*/
|
||||
static int getMinor();
|
||||
|
||||
/**
|
||||
* \if English
|
||||
* @brief Get the SDK revision number
|
||||
* @brief Get the patch version number of the SDK.
|
||||
*
|
||||
* @return int returns the SDK revision number
|
||||
* \else
|
||||
* @brief 获取SDK修订版本号
|
||||
*
|
||||
* @return int 返回SDK修订版本号
|
||||
* \endif
|
||||
* @return int The patch version number of the SDK.
|
||||
*/
|
||||
static int getPatch();
|
||||
|
||||
/**
|
||||
* \if English
|
||||
* @brief Get the SDK version number
|
||||
* @brief Get the full version number of the SDK.
|
||||
*
|
||||
* @return int returns the SDK version number
|
||||
* \else
|
||||
* @brief 获取SDK版本号
|
||||
*
|
||||
* @return int 返回SDK版本号
|
||||
* \endif
|
||||
* @return int The full version number of the SDK.
|
||||
*/
|
||||
static int getVersion();
|
||||
|
||||
/**
|
||||
* @brief Get the stage version of the SDK.
|
||||
*
|
||||
* @return char* The stage version string of the SDK.
|
||||
*/
|
||||
static char *getStageVersion();
|
||||
};
|
||||
} // namespace ob
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
libOrbbecSDK.so.1.5
|
||||
@@ -1 +0,0 @@
|
||||
libOrbbecSDK.so.1.5.7
|
||||
@@ -0,0 +1 @@
|
||||
libOrbbecSDK.so.1.6
|
||||
@@ -0,0 +1 @@
|
||||
libOrbbecSDK.so.1.6.1
|
||||
BIN
Binary file not shown.
@@ -1 +1 @@
|
||||
libOrbbecSDK.so.1.5
|
||||
libOrbbecSDK.so.1.6
|
||||
@@ -1 +0,0 @@
|
||||
libOrbbecSDK.so.1.5.7
|
||||
@@ -0,0 +1 @@
|
||||
libOrbbecSDK.so.1.6.1
|
||||
BIN
Binary file not shown.
@@ -1 +1 @@
|
||||
libOrbbecSDK.so.1.5
|
||||
libOrbbecSDK.so.1.6
|
||||
@@ -1 +0,0 @@
|
||||
libOrbbecSDK.so.1.5.7
|
||||
@@ -0,0 +1 @@
|
||||
libOrbbecSDK.so.1.6.1
|
||||
BIN
Binary file not shown.
Reference in New Issue
Block a user