OrbbecSDK 2.1.1
OrbbecSDK: Software-Development-Kit for Orbbec 3D Cameras
Loading...
Searching...
No Matches
ob::Pipeline Class Reference

#include <Pipeline.hpp>

Public Types

typedef std::function< void(std::shared_ptr< FrameSet > frame)> FrameSetCallback
 FrameSetCallback is a callback function type for frameset data arrival.
 

Public Member Functions

 Pipeline ()
 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.
 
 Pipeline (std::shared_ptr< Device > device)
 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.
 
 ~Pipeline () noexcept
 Destroy the pipeline object.
 
void start (std::shared_ptr< Config > config=nullptr) const
 Start the pipeline with configuration parameters.
 
void start (std::shared_ptr< Config > config, FrameSetCallback callback)
 Start the pipeline and set the frameset data callback.
 
void stop () const
 Stop the pipeline.
 
std::shared_ptr< ConfiggetConfig () const
 Get the pipeline configuration parameters.
 
std::shared_ptr< FrameSetwaitForFrameset (uint32_t timeoutMs=1000) const
 Wait for frameset.
 
std::shared_ptr< DevicegetDevice () const
 Get the device object.
 
std::shared_ptr< StreamProfileListgetStreamProfileList (OBSensorType sensorType) const
 Get the stream profile of the specified sensor.
 
std::shared_ptr< StreamProfileListgetD2CDepthProfileList (std::shared_ptr< StreamProfile > colorProfile, OBAlignMode alignMode)
 Get the stream profile list of supported depth-to-color alignments.
 
void enableFrameSync () const
 Turn on frame synchronization.
 
void disableFrameSync () const
 Turn off frame synchronization.
 
OBCameraParam getCameraParam ()
 
OBCameraParam getCameraParamWithProfile (uint32_t colorWidth, uint32_t colorHeight, uint32_t depthWidth, uint32_t depthHeight)
 
OBCalibrationParam getCalibrationParam (std::shared_ptr< Config > config)
 
std::shared_ptr< FrameSetwaitForFrames (uint32_t timeoutMs=1000) const
 

Static Public Member Functions

static void frameSetCallback (ob_frame_t *frameSet, void *userData)
 

Detailed Description

Definition at line 249 of file Pipeline.hpp.

Member Typedef Documentation

◆ FrameSetCallback

std::function<void(std::shared_ptr<FrameSet> frame)> ob::Pipeline::FrameSetCallback

FrameSetCallback is a callback function type for frameset data arrival.

Parameters
frameThe returned frameset data

Definition at line 256 of file Pipeline.hpp.

Constructor & Destructor Documentation

◆ Pipeline() [1/2]

ob::Pipeline::Pipeline ( )
inline

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.

Definition at line 268 of file Pipeline.hpp.

◆ Pipeline() [2/2]

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

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.

Definition at line 279 of file Pipeline.hpp.

◆ ~Pipeline()

ob::Pipeline::~Pipeline ( )
inlinenoexcept

Destroy the pipeline object.

Definition at line 288 of file Pipeline.hpp.

Member Function Documentation

◆ start() [1/2]

void ob::Pipeline::start ( std::shared_ptr< Config > config = nullptr) const
inline

Start the pipeline with configuration parameters.

Parameters
configThe parameter configuration of the pipeline

Definition at line 299 of file Pipeline.hpp.

◆ start() [2/2]

void ob::Pipeline::start ( std::shared_ptr< Config > config,
FrameSetCallback callback )
inline

Start the pipeline and set the frameset data callback.

Parameters
configThe configuration of the pipeline
callbackThe callback to be triggered when all frame data in the frameset arrives

Definition at line 312 of file Pipeline.hpp.

◆ frameSetCallback()

static void ob::Pipeline::frameSetCallback ( ob_frame_t * frameSet,
void * userData )
inlinestatic

Definition at line 319 of file Pipeline.hpp.

Referenced by start().

◆ stop()

void ob::Pipeline::stop ( ) const
inline

Stop the pipeline.

Definition at line 327 of file Pipeline.hpp.

◆ getConfig()

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

Get the pipeline configuration parameters.

Returns the default configuration if the user has not configured it

Returns
std::shared_ptr<Config> The configured parameters

Definition at line 339 of file Pipeline.hpp.

◆ waitForFrameset()

std::shared_ptr< FrameSet > ob::Pipeline::waitForFrameset ( uint32_t timeoutMs = 1000) const
inline

Wait for frameset.

Parameters
timeout_msThe waiting timeout in milliseconds
Returns
std::shared_ptr<FrameSet> The waiting frameset data

Definition at line 352 of file Pipeline.hpp.

Referenced by waitForFrames().

◆ getDevice()

std::shared_ptr< Device > ob::Pipeline::getDevice ( ) const
inline

Get the device object.

Returns
std::shared_ptr<Device> The device object

Definition at line 367 of file Pipeline.hpp.

◆ getStreamProfileList()

std::shared_ptr< StreamProfileList > ob::Pipeline::getStreamProfileList ( OBSensorType sensorType) const
inline

Get the stream profile of the specified sensor.

Parameters
sensorTypeThe type of sensor
Returns
std::shared_ptr<StreamProfileList> The stream profile list

Definition at line 380 of file Pipeline.hpp.

◆ getD2CDepthProfileList()

std::shared_ptr< StreamProfileList > ob::Pipeline::getD2CDepthProfileList ( std::shared_ptr< StreamProfile > colorProfile,
OBAlignMode alignMode )
inline

Get the stream profile list of supported depth-to-color alignments.

Parameters
colorProfileThe color stream profile, which is the target stream profile for the depth-to-color alignment.
alignModeThe alignment mode.
Attention
Currently, only ALIGN_D2C_HW_MODE supported. For other align modes, please using the AlignFilter interface.
Returns
std::shared_ptr<StreamProfileList> The stream profile list of supported depth-to-color alignments.

Definition at line 397 of file Pipeline.hpp.

◆ enableFrameSync()

void ob::Pipeline::enableFrameSync ( ) const
inline

Turn on frame synchronization.

Definition at line 407 of file Pipeline.hpp.

◆ disableFrameSync()

void ob::Pipeline::disableFrameSync ( ) const
inline

Turn off frame synchronization.

Definition at line 416 of file Pipeline.hpp.

◆ getCameraParam()

OBCameraParam ob::Pipeline::getCameraParam ( )
inline

Definition at line 425 of file Pipeline.hpp.

◆ getCameraParamWithProfile()

OBCameraParam ob::Pipeline::getCameraParamWithProfile ( uint32_t colorWidth,
uint32_t colorHeight,
uint32_t depthWidth,
uint32_t depthHeight )
inline

Definition at line 432 of file Pipeline.hpp.

◆ getCalibrationParam()

OBCalibrationParam ob::Pipeline::getCalibrationParam ( std::shared_ptr< Config > config)
inline

Definition at line 439 of file Pipeline.hpp.

◆ waitForFrames()

std::shared_ptr< FrameSet > ob::Pipeline::waitForFrames ( uint32_t timeoutMs = 1000) const
inline

Definition at line 446 of file Pipeline.hpp.


The documentation for this class was generated from the following file: