OrbbecSDK  1.5.7
OrbbecSDK: Software-Development-Kit for Orbbec 3D-Sensor devices
Public 成员函数 | 所有成员列表
ob::Pipeline类 参考

#include <Pipeline.hpp>

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绑定。 更多...
 
 Pipeline (const char *filename)
 创建pipeline用于回放录制好的流文件 更多...
 
 ~Pipeline () noexcept
 
void start (std::shared_ptr< Config > config)
 启动pipeline并配置参数 更多...
 
void start (std::shared_ptr< Config > config, FrameSetCallback callback)
 启动pipeline并设置帧集合数据回调 更多...
 
void stop ()
 停止pipeline 更多...
 
std::shared_ptr< ConfiggetConfig ()
 获取pipeline的配置参数 更多...
 
std::shared_ptr< FrameSetwaitForFrames (uint32_t timeout_ms)
 等待帧集合数据 更多...
 
std::shared_ptr< DevicegetDevice ()
 获取设备对象 更多...
 
std::shared_ptr< PlaybackgetPlayback ()
 获取回放对象 更多...
 
std::shared_ptr< StreamProfileListgetStreamProfileList (OBSensorType sensorType)
 获取指定传感器的流配置 更多...
 
void enableFrameSync ()
 打开帧同步功能 更多...
 
void disableFrameSync ()
 关闭帧同步功能 更多...
 
OBCameraParam getCameraParam ()
 获取相机参数 更多...
 
std::shared_ptr< StreamProfileListgetD2CDepthProfileList (std::shared_ptr< StreamProfile > colorProfile, OBAlignMode alignMode)
 返回与输入的彩色传感器分辨率对应的支持D2C的深度传感器分辨率列表 更多...
 
OBRect getD2CValidArea (uint32_t minimumDistance, uint32_t maximumDistance=0)
 获取D2C后给定工作范围的有效区域 如果需要获取指定距离D2C后的ROI区域,将minimum_distance与maximum_distance设置成一样或者将maximum_distance设置成0 更多...
 
void switchConfig (std::shared_ptr< Config > config)
 动态切换对应的config配置 更多...
 
void startRecord (const char *filename)
 开始录制 更多...
 
void stopRecord ()
 停止录制 更多...
 

详细描述

在文件 Pipeline.hpp32 行定义.

构造及析构函数说明

ob::Pipeline::Pipeline ( )

Pipeline 是SDK的高级接口,适用于应用,算法等重点关注RGBD数据流常见,Pipeline在SDK内部可以提供对齐,同步后的FrameSet桢集合 直接方便客户使用。 Pipeline()无参数版本,默认打开连接到OS的设备列表中的第一个设备。若应用已经通过DeviceList获取设备,此时打开Pipeline()会抛出设备已经创建异常。 需要开发者捕获异常处理。

ob::Pipeline::Pipeline ( std::shared_ptr< Device device)

Pipeline(std::shared_ptr< Device > device )函数,适用于多设备操作常见,此时需要通过DeviceList获取多个设备,通过该接口实现device和pipeline绑定。

ob::Pipeline::Pipeline ( const char *  filename)

创建pipeline用于回放录制好的流文件

参数
filename回放文件路径
ob::Pipeline::~Pipeline ( )
noexcept

成员函数说明

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设置帧集合中的所有帧数据都到达时触发回调
void ob::Pipeline::stop ( )

停止pipeline

std::shared_ptr<Config> ob::Pipeline::getConfig ( )

获取pipeline的配置参数

返回
std::shared_ptr<Config> 返回配置的参数
std::shared_ptr<FrameSet> ob::Pipeline::waitForFrames ( uint32_t  timeout_ms)

等待帧集合数据

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

获取设备对象

返回
std::shared_ptr<Device> 返回设备对象
std::shared_ptr<Playback> ob::Pipeline::getPlayback ( )

获取回放对象

返回
std::shared_ptr<Playback> 返回回放对象
std::shared_ptr<StreamProfileList> ob::Pipeline::getStreamProfileList ( OBSensorType  sensorType)

获取指定传感器的流配置

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

打开帧同步功能

void ob::Pipeline::disableFrameSync ( )

关闭帧同步功能

OBCameraParam ob::Pipeline::getCameraParam ( )

获取相机参数

注意
如果开启了D2C将返回D2C后的相机参数
返回
OBCameraParam返回相机参数
std::shared_ptr<StreamProfileList> ob::Pipeline::getD2CDepthProfileList ( std::shared_ptr< StreamProfile colorProfile,
OBAlignMode  alignMode 
)

返回与输入的彩色传感器分辨率对应的支持D2C的深度传感器分辨率列表

参数
colorProfile输入的彩色传感器分辨率
alignMode输入的对齐模式
返回
std::shared_ptr<StreamProfileList> 返回深度传感器分辨率列表
OBRect ob::Pipeline::getD2CValidArea ( uint32_t  minimumDistance,
uint32_t  maximumDistance = 0 
)

获取D2C后给定工作范围的有效区域 如果需要获取指定距离D2C后的ROI区域,将minimum_distance与maximum_distance设置成一样或者将maximum_distance设置成0

参数
minimumDistance最小工作距离
maximumDistance最大工作距离
返回
OBRect 返回在工作距离下D2C后有效的区域信息
void ob::Pipeline::switchConfig ( std::shared_ptr< Config config)

动态切换对应的config配置

参数
config更新后的config配置
void ob::Pipeline::startRecord ( const char *  filename)

开始录制

参数
filename录制文件名
void ob::Pipeline::stopRecord ( )

停止录制


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