![]() |
OrbbecSDK
1.5.7
OrbbecSDK: Software-Development-Kit for Orbbec 3D-Sensor devices
|
#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< Config > | getConfig () |
获取pipeline的配置参数 更多... | |
std::shared_ptr< FrameSet > | waitForFrames (uint32_t timeout_ms) |
等待帧集合数据 更多... | |
std::shared_ptr< Device > | getDevice () |
获取设备对象 更多... | |
std::shared_ptr< Playback > | getPlayback () |
获取回放对象 更多... | |
std::shared_ptr< StreamProfileList > | getStreamProfileList (OBSensorType sensorType) |
获取指定传感器的流配置 更多... | |
void | enableFrameSync () |
打开帧同步功能 更多... | |
void | disableFrameSync () |
关闭帧同步功能 更多... | |
OBCameraParam | getCameraParam () |
获取相机参数 更多... | |
std::shared_ptr< StreamProfileList > | getD2CDepthProfileList (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.hpp 第 32 行定义.
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 | 回放文件路径 |
|
noexcept |
void ob::Pipeline::start | ( | std::shared_ptr< Config > | config | ) |
启动pipeline并配置参数
config | pipeline的参数配置 |
void ob::Pipeline::start | ( | std::shared_ptr< Config > | config, |
FrameSetCallback | callback | ||
) |
启动pipeline并设置帧集合数据回调
config | pipeline的参数配置 |
callback | 设置帧集合中的所有帧数据都到达时触发回调 |
void ob::Pipeline::stop | ( | ) |
停止pipeline
std::shared_ptr<Config> ob::Pipeline::getConfig | ( | ) |
获取pipeline的配置参数
std::shared_ptr<FrameSet> ob::Pipeline::waitForFrames | ( | uint32_t | timeout_ms | ) |
等待帧集合数据
timeout_ms | 等待超时时间(毫秒) |
std::shared_ptr<Device> ob::Pipeline::getDevice | ( | ) |
获取设备对象
std::shared_ptr<Playback> ob::Pipeline::getPlayback | ( | ) |
获取回放对象
std::shared_ptr<StreamProfileList> ob::Pipeline::getStreamProfileList | ( | OBSensorType | sensorType | ) |
获取指定传感器的流配置
sensorType | 传感器的类型 |
void ob::Pipeline::enableFrameSync | ( | ) |
打开帧同步功能
void ob::Pipeline::disableFrameSync | ( | ) |
关闭帧同步功能
OBCameraParam ob::Pipeline::getCameraParam | ( | ) |
获取相机参数
std::shared_ptr<StreamProfileList> ob::Pipeline::getD2CDepthProfileList | ( | std::shared_ptr< StreamProfile > | colorProfile, |
OBAlignMode | alignMode | ||
) |
返回与输入的彩色传感器分辨率对应的支持D2C的深度传感器分辨率列表
colorProfile | 输入的彩色传感器分辨率 |
alignMode | 输入的对齐模式 |
OBRect ob::Pipeline::getD2CValidArea | ( | uint32_t | minimumDistance, |
uint32_t | maximumDistance = 0 |
||
) |
获取D2C后给定工作范围的有效区域 如果需要获取指定距离D2C后的ROI区域,将minimum_distance与maximum_distance设置成一样或者将maximum_distance设置成0
minimumDistance | 最小工作距离 |
maximumDistance | 最大工作距离 |
void ob::Pipeline::switchConfig | ( | std::shared_ptr< Config > | config | ) |
动态切换对应的config配置
config | 更新后的config配置 |
void ob::Pipeline::startRecord | ( | const char * | filename | ) |
开始录制
filename | 录制文件名 |
void ob::Pipeline::stopRecord | ( | ) |
停止录制