| OrbbecSDK 1.5.7 OrbbecSDK: Software-Development-Kit for Orbbec 3D-Sensor devices

- Main Page
- Namespaces
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

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. More...
| 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. More...
| Pipeline (const char *filename)
| Create a pipeline for playback of recorded stream files. More...
| ~Pipeline () noexcept
void | start (std::shared_ptr< Config > config)
| Start the pipeline with configuration parameters. More...
void | start (std::shared_ptr< Config > config, FrameSetCallback callback)
| Start the pipeline and set the frameset data callback. More...
void | stop ()
| Stop pipeline. More...
std::shared_ptr< Config > | getConfig ()
| Get pipeline configuration parameters. More...
std::shared_ptr< FrameSet > | waitForFrames (uint32_t timeout_ms)
| Waiting for frame set data. More...
std::shared_ptr< Device > | getDevice ()
| Get device object. More...
std::shared_ptr< Playback > | getPlayback ()
| Get playback object. More...
std::shared_ptr< StreamProfileList > | getStreamProfileList (OBSensorType sensorType)
| Get the stream profile of specified sensor. More...
void | enableFrameSync ()
| Turn on frame synchronization. More...
void | disableFrameSync ()
| Turn off frame synchronization. More...
OBCameraParam | getCameraParam ()
| Get camera parameters. More...
std::shared_ptr< StreamProfileList > | getD2CDepthProfileList (std::shared_ptr< StreamProfile > colorProfile, OBAlignMode alignMode)
| Return a list of D2C-enabled depth sensor resolutions corresponding to the input color sensor resolution. More...
OBRect | getD2CValidArea (uint32_t minimumDistance, uint32_t maximumDistance=0)
| Get valid area between minimum distance and maximum distance after D2C. More...
void | switchConfig (std::shared_ptr< Config > config)
| Dynamically switch the corresponding config configuration. More...
void | startRecord (const char *filename)
| start recording More...
void | stopRecord ()
| Stop recording. More...

## Detailed Description

Definition at line 32 of file Pipeline.hpp.

## Constructor & Destructor Documentation

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.

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.

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

Create a pipeline for playback of recorded stream files.

Parameters

  filename | Playback file path

ob::Pipeline::~Pipeline | ( |  | ) |
| noexcept

## Member Function Documentation

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

Start the pipeline with configuration parameters.

Parameters

  config | Parameter configuration of pipeline

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

Start the pipeline and set the frameset data callback.

Parameters

  config | parameter configuration of pipeline
  callback | Set the callback to be triggered when all frame data in the frame set arrives

void ob::Pipeline::stop | ( |  | ) |

Stop pipeline.

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

Get pipeline configuration parameters.

Returns
  std::shared_ptr<Config> returns the configured parameters

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

Waiting for frame set data.

Parameters

  timeout_ms | Waiting timeout (ms)

Returns
  std::shared_ptr<FrameSet> returns the waiting frame set data

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

Get device object.

Returns
  std::shared_ptr<Device> returns the device object

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

Get playback object.

Returns
  std::shared_ptr<Playback> returns the playback object

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

Get the stream profile of specified sensor.

Parameters

  sensorType | Type of sensor

Returns
  std::shared_ptr<StreamProfileList> returns the stream configuration list

void ob::Pipeline::enableFrameSync | ( |  | ) |

Turn on frame synchronization.

void ob::Pipeline::disableFrameSync | ( |  | ) |

Turn off frame synchronization.

OBCameraParam ob::Pipeline::getCameraParam | ( |  | ) |

Get camera parameters.

Attention
  If D2C is enabled, it will return the camera parameters after D2C, if not, it will return to the default parameters

Returns
  OBCameraParam returns camera parameters

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

  colorProfile | Input color sensor resolution
  alignMode | Input align mode

Returns
  std::shared_ptr<StreamProfileList> returns a list of depth sensor resolutions

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

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

Parameters

  minimumDistance | minimum working distance
  maximumDistance | maximum working distance

Returns
  OBRect returns the area information valid after D2C at the working distance

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

Dynamically switch the corresponding config configuration.

Parameters

  config | Updated config configuration

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

start recording

Parameters

  filename | Record file name

void ob::Pipeline::stopRecord | ( |  | ) |

Stop recording.

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

- /root/libobsensor/include/libobsensor/hpp/Pipeline.hpp