| OrbbecSDK 1.10.18 OrbbecSDK: Software-Development-Kit for Orbbec 3D Cameras

Loading...
Searching...
No Matches
Public Member Functions | Friends | List of all members
ob::Config Class Reference

Config class for configuring pipeline parameters. More...

`#include <Pipeline.hpp>`

## Public Member Functions
| Config ()
| Construct a new Config object.
| ~Config () noexcept
| Destroy the Config object.
void | enableStream (std::shared_ptr< StreamProfile > streamProfile)
| Enable a stream to be used in the pipeline.
void | enableAllStream ()
| Enable all streams to be used in the pipeline.
void | enableVideoStream (ob_stream_type type, int width=OB_WIDTH_ANY, int height=OB_HEIGHT_ANY, int fps=OB_FPS_ANY, OBFormat format=OB_FORMAT_ANY)
| Enable a video stream to be used in the pipeline.
void | enableAccelStream (ob_accel_full_scale_range fullScaleRange=OB_ACCEL_FULL_SCALE_RANGE_ANY, ob_accel_sample_rate sampleRate=OB_ACCEL_SAMPLE_RATE_ANY)
| Enable an accelerometer stream to be used in the pipeline.
void | enableGyroStream (ob_gyro_full_scale_range fullScaleRange=OB_GYRO_FULL_SCALE_RANGE_ANY, ob_gyro_sample_rate sampleRate=OB_GYRO_SAMPLE_RATE_ANY)
| Enable a gyroscope stream to be used in the pipeline.
void | disableStream (OBStreamType streamType)
| Disable a stream to be used in the pipeline.
void | disableAllStream ()
| Disable all streams to be used in the pipeline.
std::shared_ptr< StreamProfileList > | getEnabledStreamProfileList () const
| Get the Enabled Stream Profile List.
void | setAlignMode (OBAlignMode mode)
| Set the alignment mode.
void | setDepthScaleRequire (bool enable)
| Set whether the depth needs to be scaled after setting D2C.
void | setD2CTargetResolution (uint32_t d2cTargetWidth, uint32_t d2cTargetHeight)
| Set the D2C target resolution.
void | setFrameAggregateOutputMode (OBFrameAggregateOutputMode mode)
| Set the frame aggregation output mode for the pipeline configuration.

## Friends
class | Pipeline

## Detailed Description

Config class for configuring pipeline parameters.

The Config class provides an interface for configuring pipeline parameters.

Definition at line 210 of file Pipeline.hpp.

## Constructor & Destructor Documentation

## ◆ Config()

ob::Config::Config | ( |  | ) |

Construct a new Config object.

## ◆ ~Config()

ob::Config::~Config | ( |  | ) |
| noexcept

Destroy the Config object.

## Member Function Documentation

## ◆ enableStream()

void ob::Config::enableStream | ( | std::shared_ptr< StreamProfile > | streamProfile | ) |

Enable a stream to be used in the pipeline.

Parameters

  streamProfile | The stream configuration to be enabled

## ◆ enableAllStream()

void ob::Config::enableAllStream | ( |  | ) |

Enable all streams to be used in the pipeline.

Deprecated:
  Use enableStream(std::shared_ptr<StreamProfile> streamProfile) instead

## ◆ enableVideoStream()

void ob::Config::enableVideoStream | ( | ob_stream_type | type,
|  | int | width = `OB_WIDTH_ANY`,
|  | int | height = `OB_HEIGHT_ANY`,
|  | int | fps = `OB_FPS_ANY`,
|  | OBFormat | format = `OB_FORMAT_ANY`
| ) |  |

Enable a video stream to be used in the pipeline.

This function allows users to enable a video stream with customizable parameters. If no parameters are specified, the stream will be enabled with default resolution settings. Users who wish to set custom resolutions should refer to the product manual, as available resolutions vary by camera model.

Parameters

  type | The video stream type.
  width | The video stream width (default is OB_WIDTH_ANY, which selects the default resolution).
  height | The video stream height (default is OB_HEIGHT_ANY, which selects the default resolution).
  fps | The video stream frame rate (default is OB_FPS_ANY, which selects the default frame rate).
  format | The video stream format (default is OB_FORMAT_ANY, which selects the default format).

## ◆ enableAccelStream()

void ob::Config::enableAccelStream | ( | ob_accel_full_scale_range | fullScaleRange = `OB_ACCEL_FULL_SCALE_RANGE_ANY`,
|  | ob_accel_sample_rate | sampleRate = `OB_ACCEL_SAMPLE_RATE_ANY`
| ) |  |

Enable an accelerometer stream to be used in the pipeline.

This function allows users to enable an accelerometer stream with customizable parameters. If no parameters are specified, the stream will be enabled with default settings. Users who wish to set custom full-scale ranges or sample rates should refer to the product manual, as available settings vary by device model.

Parameters

  fullScaleRange | The full-scale range of the accelerometer (default is OB_ACCEL_FULL_SCALE_RANGE_ANY, which selects the default range).
  sampleRate | The sample rate of the accelerometer (default is OB_ACCEL_SAMPLE_RATE_ANY, which selects the default rate).

## ◆ enableGyroStream()

void ob::Config::enableGyroStream | ( | ob_gyro_full_scale_range | fullScaleRange = `OB_GYRO_FULL_SCALE_RANGE_ANY`,
|  | ob_gyro_sample_rate | sampleRate = `OB_GYRO_SAMPLE_RATE_ANY`
| ) |  |

Enable a gyroscope stream to be used in the pipeline.

This function allows users to enable a gyroscope stream with customizable parameters. If no parameters are specified, the stream will be enabled with default settings. Users who wish to set custom full-scale ranges or sample rates should refer to the product manual, as available settings vary by device model.

Parameters

  fullScaleRange | The full-scale range of the gyroscope (default is OB_GYRO_FULL_SCALE_RANGE_ANY, which selects the default range).
  sampleRate | The sample rate of the gyroscope (default is OB_GYRO_SAMPLE_RATE_ANY, which selects the default rate).

## ◆ disableStream()

void ob::Config::disableStream | ( | OBStreamType | streamType | ) |

Disable a stream to be used in the pipeline.

Parameters

  streamType | The stream configuration to be disabled

## ◆ disableAllStream()

void ob::Config::disableAllStream | ( |  | ) |

Disable all streams to be used in the pipeline.

## ◆ getEnabledStreamProfileList()

std::shared_ptr< StreamProfileList > ob::Config::getEnabledStreamProfileList | ( |  | ) | const

Get the Enabled Stream Profile List.

Returns
  std::shared_ptr<StreamProfileList>

## ◆ setAlignMode()

void ob::Config::setAlignMode | ( | OBAlignMode | mode | ) |

Set the alignment mode.

Parameters

  mode | The alignment mode

## ◆ setDepthScaleRequire()

void ob::Config::setDepthScaleRequire | ( | bool | enable | ) |

Set whether the depth needs to be scaled after setting D2C.

Parameters

  enable | Whether scaling is required

## ◆ setD2CTargetResolution()

void ob::Config::setD2CTargetResolution | ( | uint32_t | d2cTargetWidth,
|  | uint32_t | d2cTargetHeight
| ) |  |

Set the D2C target resolution.

The D2C target resolution is applicable to cases where the color stream is not enabled using the OrbbecSDK and the depth needs to be D2C.

Note
  When you use OrbbecSDK to enable the color stream, you also use this interface to set the D2C target resolution. The configuration of the enabled Color stream is preferred for D2C.

Parameters

  d2cTargetWidth | The D2C target width resolution
  d2cTargetHeight | The D2C target height resolution

## ◆ setFrameAggregateOutputMode()

void ob::Config::setFrameAggregateOutputMode | ( | OBFrameAggregateOutputMode | mode | ) |

Set the frame aggregation output mode for the pipeline configuration.

The processing strategy when the FrameSet generated by the frame aggregation function does not contain the frames of all opened streams (which can be caused by different frame rates of each stream, or by the loss of frames of one stream): drop directly or output to the user.

Parameters

  mode | The frame aggregation output mode to be set (default mode is OB_FRAME_AGGREGATE_OUTPUT_ANY_SITUATION)

## Friends And Related Symbol Documentation

## ◆ Pipeline

friend class Pipeline
| friend

Definition at line 332 of file Pipeline.hpp.

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

- E:/Projects/Jenkins/workspace/OrbbecSDK/libobsensor/include/libobsensor/hpp/Pipeline.hpp