OrbbecSDK  1.0.0
Public 类型 | Public 成员函数 | 所有成员列表
ob::Pipeline类 参考

Public 类型

using FrameSetCallback = std::function< void(std::shared_ptr< FrameSet > frame) >
 

Public 成员函数

 Pipeline ()
 Pipeline 是SDK的高级接口,适用于应用,算法等重点关注RGBD数据流常见,Pipeline在SDK内部可以提供对齐,同步后的FrameSet桢集合 直接方便客户使用。 Pipeline()无参数版本,默认打开连接到OS的设备列表中的第一个设备。若应用已经通过DeviceList获取设备,此时打开Pipeline()会抛出设备已经创建异常。 需要开发者捕获异常处理。
 
 Pipeline (std::shared_ptr< Device > device)
 Pipeline(std::shared_ptr< Device > device )函数,适用于多设备操作常见,此时需要通过DeviceList获取多个设备,通过该接口实现device和pipeline绑定。
 
void start (std::shared_ptr< Config > config)
 启动pipeline并配置参数 更多...
 
void start (std::shared_ptr< Config > config, FrameSetCallback callback)
 启动pipeline并设置帧集合数据回调 更多...
 
void stop ()
 停止pipeline
 
std::shared_ptr< Config > getConfig ()
 获取pipeline的配置参数 更多...
 
std::shared_ptr< FrameSet > waitForFrames (uint32_t timeout_ms)
 等待帧集合数据 更多...
 
std::shared_ptr< Device > getDevice ()
 获取设备对象 更多...
 
std::shared_ptr< StreamProfileList > getStreamProfileList (OBSensorType sensorType)
 获取指定传感器的流配置 更多...
 
std::shared_ptr< StreamProfileList > getAllStreamProfileList ()
 获取所有传感器的所有流的配置 更多...
 
void enableFrameSync ()
 打开帧同步功能
 
void disableFrameSync ()
 关闭帧同步功能
 
template<typename T >
std::shared_ptr< T > createFilter ()
 创建Filter 更多...
 

详细描述

在文件 Pipeline.hpp 第 25 行定义.

成员函数说明

template<typename T >
std::shared_ptr< T > ob::Pipeline::createFilter ( )

创建Filter

模板参数
TFilter类,如果使用不支持的类,函数将会返回nullptr
返回
std::shared_ptr<T> 返回Filter对象智能指针,
std::shared_ptr< StreamProfileList > ob::Pipeline::getAllStreamProfileList ( )

获取所有传感器的所有流的配置

返回
std::shared_ptr<StreamProfileList> 返回流配置列表
std::shared_ptr< Config > ob::Pipeline::getConfig ( )

获取pipeline的配置参数

返回
std::shared_ptr<Config> 返回配置的参数
std::shared_ptr< Device > ob::Pipeline::getDevice ( )

获取设备对象

返回
std::shared_ptr<Device> 返回设备对象
std::shared_ptr< StreamProfileList > ob::Pipeline::getStreamProfileList ( OBSensorType  sensorType)

获取指定传感器的流配置

参数
sensorType传感器的类型
返回
std::shared_ptr<StreamProfileList> 返回流配置列表
void ob::Pipeline::start ( std::shared_ptr< Config >  config)

启动pipeline并配置参数

参数
configpipeline的参数配置
void ob::Pipeline::start ( std::shared_ptr< Config >  config,
FrameSetCallback  callback 
)

启动pipeline并设置帧集合数据回调

参数
configpipeline的参数配置
callback设置帧集合中的所有帧数据都到达时触发回调
std::shared_ptr< FrameSet > ob::Pipeline::waitForFrames ( uint32_t  timeout_ms)

等待帧集合数据

参数
timeout_ms等待超时时间(毫秒)
返回
std::shared_ptr<FrameSet> 返回等待的帧集合数据

该类的文档由以下文件生成: