OrbbecSDK 1.10.18
OrbbecSDK: Software-Development-Kit for Orbbec 3D Cameras
Loading...
Searching...
No Matches
Public Member Functions | List of all members
ob::Pipeline Class Reference

#include <Pipeline.hpp>

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 (const char *filename)
 Construct a pipeline for playback of recorded stream files.
 
 ~Pipeline () noexcept
 Destroy the pipeline object.
 
void start (std::shared_ptr< Config > config)
 Start the pipeline with configuration parameters.
 
void start ()
 Start the pipeline with default configuration parameters.
 
void start (std::shared_ptr< Config > config, FrameSetCallback callback)
 Start the pipeline and set the frameset data callback.
 
void stop ()
 Stop the pipeline.
 
std::shared_ptr< StreamProfileListgetEnabledStreamProfileList ()
 get Enabled Stream Profile List,It must be called after the pipeline is started, otherwise it will return an empty list
 
std::shared_ptr< ConfiggetConfig ()
 Get the pipeline configuration parameters.
 
std::shared_ptr< FrameSetwaitForFrames (uint32_t timeout_ms=1000)
 Wait for frameset data.
 
std::shared_ptr< DevicegetDevice ()
 Get the device object.
 
std::shared_ptr< PlaybackgetPlayback ()
 Get the playback object.
 
std::shared_ptr< StreamProfileListgetStreamProfileList (OBSensorType sensorType)
 Get the stream profile of the specified sensor.
 
void enableFrameSync ()
 Turn on frame synchronization.
 
void disableFrameSync ()
 Turn off frame synchronization.
 
OBCameraParam getCameraParam ()
 Get the camera parameters.
 
OBCameraParam getCameraParamWithProfile (uint32_t colorWidth, uint32_t colorHeight, uint32_t depthWidth, uint32_t depthHeight)
 Get camera parameters by entering color and depth resolution.
 
OBCalibrationParam getCalibrationParam (std::shared_ptr< Config > config)
 Get the calibration parameters.
 
std::shared_ptr< StreamProfileListgetD2CDepthProfileList (std::shared_ptr< StreamProfile > colorProfile, OBAlignMode alignMode)
 Return a list of D2C-enabled depth sensor resolutions corresponding to the input color sensor resolution.
 
OBRect getD2CValidArea (uint32_t minimumDistance, uint32_t maximumDistance=0)
 Get the valid area between the minimum distance and maximum distance after D2C.
 
void switchConfig (std::shared_ptr< Config > config)
 Dynamically switch the corresponding config configuration.
 
void startRecord (const char *filename)
 Start recording.
 
void stopRecord ()
 Stop recording.
 

Detailed Description

Definition at line 28 of file Pipeline.hpp.

Constructor & Destructor Documentation

◆ Pipeline() [1/3]

ob::Pipeline::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() [2/3]

ob::Pipeline::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() [3/3]

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

Construct a pipeline for playback of recorded stream files.

Parameters
filenameThe file path of the recorded stream file to be played back

◆ ~Pipeline()

ob::Pipeline::~Pipeline ( )
noexcept

Destroy the pipeline object.

Member Function Documentation

◆ start() [1/3]

void ob::Pipeline::start ( std::shared_ptr< Config config)

Start the pipeline with configuration parameters.

Parameters
configThe parameter configuration of the pipeline

◆ start() [2/3]

void ob::Pipeline::start ( )

Start the pipeline with default configuration parameters.

◆ start() [3/3]

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

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

◆ stop()

void ob::Pipeline::stop ( )

Stop the pipeline.

◆ getEnabledStreamProfileList()

std::shared_ptr< StreamProfileList > ob::Pipeline::getEnabledStreamProfileList ( )

get Enabled Stream Profile List,It must be called after the pipeline is started, otherwise it will return an empty list

◆ getConfig()

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

Get the pipeline configuration parameters.

Returns the default configuration if the user has not configured it

Returns
std::shared_ptr<Config> The configured parameters

◆ waitForFrames()

std::shared_ptr< FrameSet > ob::Pipeline::waitForFrames ( uint32_t  timeout_ms = 1000)

Wait for frameset data.

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

◆ getDevice()

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

Get the device object.

Returns
std::shared_ptr<Device> The device object

◆ getPlayback()

std::shared_ptr< Playback > ob::Pipeline::getPlayback ( )

Get the playback object.

Returns
std::shared_ptr<Playback> The playback object

◆ getStreamProfileList()

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

Get the stream profile of the specified sensor.

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

◆ enableFrameSync()

void ob::Pipeline::enableFrameSync ( )

Turn on frame synchronization.

◆ disableFrameSync()

void ob::Pipeline::disableFrameSync ( )

Turn off frame synchronization.

◆ getCameraParam()

OBCameraParam ob::Pipeline::getCameraParam ( )

Get the camera parameters.

Note
If D2C is enabled, it will return the camera parameters after D2C. If not, it will return the default parameters.
Returns
OBCameraParam The camera parameters

◆ getCameraParamWithProfile()

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

Get camera parameters by entering color and depth resolution.

Attention
If D2C is enabled, it will return the camera parameters after D2C, if not, it will return to the default parameters
Parameters
colorWidthWidth of color resolution
colorHeightHigh of color resolution
depthWidthWidth of depth resolution
depthHeightHigh of depth resolution
Returns
OBCameraParam returns camera parameters

◆ getCalibrationParam()

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

Get the calibration parameters.

Parameters
configThe configured parameters
Returns
OBCalibrationParam The calibration parameters

◆ getD2CDepthProfileList()

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

Return a list of D2C-enabled depth sensor resolutions corresponding to the input color sensor resolution.

Parameters
colorProfileThe input color sensor resolution
alignModeThe input align mode
Returns
std::shared_ptr<StreamProfileList> A list of depth sensor resolutions

◆ getD2CValidArea()

OBRect ob::Pipeline::getD2CValidArea ( uint32_t  minimumDistance,
uint32_t  maximumDistance = 0 
)

Get the valid area between the minimum distance and maximum distance after D2C.

Parameters
minimumDistanceThe minimum working distance
maximumDistanceThe maximum working distance (optional)
Returns
OBRect The area information valid after D2C at the working distance

◆ switchConfig()

void ob::Pipeline::switchConfig ( std::shared_ptr< Config config)

Dynamically switch the corresponding config configuration.

Parameters
configThe updated config configuration

◆ startRecord()

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

Start recording.

Parameters
filenameThe name of the record file

◆ stopRecord()

void ob::Pipeline::stopRecord ( )

Stop recording.


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