OrbbecSDK 2.5.5
OrbbecSDK: Software-Development-Kit for Orbbec 3D Cameras
Loading...
Searching...
No Matches
Pipeline.h File Reference

The SDK's advanced API can quickly implement functions such as switching streaming, frame synchronization, software filtering, etc., suitable for applications, and the algorithm focuses on rgbd data stream scenarios. If you are on real-time or need to handle synchronization separately, align the scene. Please use the interface of Device's Lower API. More...

#include "ObTypes.h"

Go to the source code of this file.

Macros

#define ob_config_set_depth_scale_require   ob_config_set_depth_scale_after_align_require

Functions

OB_EXPORT ob_pipelineob_create_pipeline (ob_error **error)
 Create a pipeline object.
OB_EXPORT ob_pipelineob_create_pipeline_with_device (const ob_device *dev, ob_error **error)
 Using device objects to create pipeline objects.
OB_EXPORT void ob_delete_pipeline (ob_pipeline *pipeline, ob_error **error)
 Delete pipeline objects.
OB_EXPORT void ob_pipeline_start (ob_pipeline *pipeline, ob_error **error)
 Start the pipeline with default parameters.
OB_EXPORT void ob_pipeline_start_with_config (ob_pipeline *pipeline, const ob_config *config, ob_error **error)
 Start the pipeline with configuration parameters.
OB_EXPORT void ob_pipeline_start_with_callback (ob_pipeline *pipeline, const ob_config *config, ob_frameset_callback callback, void *user_data, ob_error **error)
 Start the pipeline and set the frame collection data callback.
OB_EXPORT void ob_pipeline_stop (ob_pipeline *pipeline, ob_error **error)
 Stop pipeline.
OB_EXPORT ob_configob_pipeline_get_config (const ob_pipeline *pipeline, ob_error **error)
 Get the configuration object associated with the pipeline.
OB_EXPORT void ob_pipeline_switch_config (ob_pipeline *pipeline, ob_config *config, ob_error **error)
 Switch the corresponding configuration.
OB_EXPORT ob_frameob_pipeline_wait_for_frameset (ob_pipeline *pipeline, uint32_t timeout_ms, ob_error **error)
 Wait for a set of frames to be returned synchronously.
OB_EXPORT ob_deviceob_pipeline_get_device (const ob_pipeline *pipeline, ob_error **error)
 Get the device object associated with the pipeline.
OB_EXPORT ob_stream_profile_listob_pipeline_get_stream_profile_list (const ob_pipeline *pipeline, ob_sensor_type sensorType, ob_error **error)
 Get the stream profile list associated with the pipeline.
OB_EXPORT void ob_pipeline_enable_frame_sync (ob_pipeline *pipeline, ob_error **error)
 Enable frame synchronization.
OB_EXPORT void ob_pipeline_disable_frame_sync (ob_pipeline *pipeline, ob_error **error)
 Disable frame synchronization.
OB_EXPORT ob_stream_profile_listob_get_d2c_depth_profile_list (const ob_pipeline *pipeline, const ob_stream_profile *color_profile, ob_align_mode align_mode, ob_error **error)
 Return a list of D2C-enabled depth sensor resolutions corresponding to the input color sensor resolution.
OB_EXPORT ob_configob_create_config (ob_error **error)
 Create the pipeline configuration.
OB_EXPORT void ob_delete_config (ob_config *config, ob_error **error)
 Delete the pipeline configuration.
OB_EXPORT void ob_config_enable_stream (ob_config *config, ob_stream_type stream_type, ob_error **error)
 Enable a stream with default profile.
OB_EXPORT void ob_config_enable_all_stream (ob_config *config, ob_error **error)
 Enable all streams in the pipeline configuration.
OB_EXPORT void ob_config_enable_stream_with_stream_profile (ob_config *config, const ob_stream_profile *profile, ob_error **error)
 Enable a stream according to the stream profile.
OB_EXPORT void ob_config_enable_video_stream (ob_config *config, ob_stream_type stream_type, uint32_t width, uint32_t height, uint32_t fps, ob_format format, ob_error **error)
 Enable video stream with specified parameters.
OB_EXPORT void ob_config_enable_accel_stream (ob_config *config, ob_accel_full_scale_range full_scale_range, ob_accel_sample_rate sample_rate, ob_error **error)
 Enable accelerometer stream with specified parameters.
OB_EXPORT void ob_config_enable_gyro_stream (ob_config *config, ob_gyro_full_scale_range full_scale_range, ob_gyro_sample_rate sample_rate, ob_error **error)
 Enable gyroscope stream with specified parameters.
OB_EXPORT ob_stream_profile_listob_config_get_enabled_stream_profile_list (const ob_config *config, ob_error **error)
 Get the enabled stream profile list in the pipeline configuration.
OB_EXPORT void ob_config_disable_stream (ob_config *config, ob_stream_type type, ob_error **error)
 Disable a specific stream in the pipeline configuration.
OB_EXPORT void ob_config_disable_all_stream (ob_config *config, ob_error **error)
 Disable all streams in the pipeline configuration.
OB_EXPORT void ob_config_set_align_mode (ob_config *config, ob_align_mode mode, ob_error **error)
 Set the alignment mode for the pipeline configuration.
OB_EXPORT void ob_config_set_depth_scale_after_align_require (ob_config *config, bool enable, ob_error **error)
 Set whether depth scaling is required after enable depth to color alignment.
OB_EXPORT void ob_config_set_frame_aggregate_output_mode (ob_config *config, ob_frame_aggregate_output_mode mode, ob_error **error)
 Set the frame aggregation output mode for the pipeline configuration.
OB_EXPORT ob_camera_param ob_pipeline_get_camera_param (ob_pipeline *pipeline, ob_error **error)
 Get current camera parameters.
OB_EXPORT ob_camera_param ob_pipeline_get_camera_param_with_profile (ob_pipeline *pipeline, uint32_t colorWidth, uint32_t colorHeight, uint32_t depthWidth, uint32_t depthHeight, ob_error **error)
 Get the current camera parameters.
OB_EXPORT ob_calibration_param ob_pipeline_get_calibration_param (ob_pipeline *pipeline, ob_config *config, ob_error **error)
 Get device calibration parameters with the specified configuration.

Detailed Description

The SDK's advanced API can quickly implement functions such as switching streaming, frame synchronization, software filtering, etc., suitable for applications, and the algorithm focuses on rgbd data stream scenarios. If you are on real-time or need to handle synchronization separately, align the scene. Please use the interface of Device's Lower API.

Definition in file Pipeline.h.

Macro Definition Documentation

◆ ob_config_set_depth_scale_require

#define ob_config_set_depth_scale_require   ob_config_set_depth_scale_after_align_require

Definition at line 330 of file Pipeline.h.

Function Documentation

◆ ob_create_pipeline()

OB_EXPORT ob_pipeline * ob_create_pipeline ( ob_error ** error)

Create a pipeline object.

Parameters
[out]errorPointer to an error object that will be set if an error occurs.
Returns
ob_pipeline* return the pipeline object

Referenced by ob::Pipeline::Pipeline().

◆ ob_create_pipeline_with_device()

OB_EXPORT ob_pipeline * ob_create_pipeline_with_device ( const ob_device * dev,
ob_error ** error )

Using device objects to create pipeline objects.

Parameters
[in]devDevice object used to create pipeline
[out]errorPointer to an error object that will be set if an error occurs.
Returns
ob_pipeline* return the pipeline object

Referenced by ob::Pipeline::Pipeline().

◆ ob_delete_pipeline()

OB_EXPORT void ob_delete_pipeline ( ob_pipeline * pipeline,
ob_error ** error )

Delete pipeline objects.

Parameters
[in]pipelineThe pipeline object to be deleted
[out]errorPointer to an error object that will be set if an error occurs.

Referenced by ob::Pipeline::~Pipeline().

◆ ob_pipeline_start()

OB_EXPORT void ob_pipeline_start ( ob_pipeline * pipeline,
ob_error ** error )

Start the pipeline with default parameters.

Parameters
[in]pipelinepipeline object
[out]errorPointer to an error object that will be set if an error occurs.

◆ ob_pipeline_start_with_config()

OB_EXPORT void ob_pipeline_start_with_config ( ob_pipeline * pipeline,
const ob_config * config,
ob_error ** error )

Start the pipeline with configuration parameters.

Parameters
[in]pipelinepipeline object
[in]configParameters to be configured
[out]errorPointer to an error object that will be set if an error occurs.

Referenced by ob::Pipeline::start().

◆ ob_pipeline_start_with_callback()

OB_EXPORT void ob_pipeline_start_with_callback ( ob_pipeline * pipeline,
const ob_config * config,
ob_frameset_callback callback,
void * user_data,
ob_error ** error )

Start the pipeline and set the frame collection data callback.

Attention
After start the pipeline with this interface, the frames will be output to the callback function and cannot be obtained frames by call @ob_pipeline_wait_for_frameset
Parameters
[in]pipelinepipeline object
[in]configParameters to be configured
[in]callbackTrigger a callback when all frame data in the frameset arrives
[in]user_dataPass in any user data and get it from the callback
[out]errorPointer to an error object that will be set if an error occurs.

Referenced by ob::Pipeline::start().

◆ ob_pipeline_stop()

OB_EXPORT void ob_pipeline_stop ( ob_pipeline * pipeline,
ob_error ** error )

Stop pipeline.

Parameters
[in]pipelinepipeline object
[out]errorPointer to an error object that will be set if an error occurs.

Referenced by ob::Pipeline::stop().

◆ ob_pipeline_get_config()

OB_EXPORT ob_config * ob_pipeline_get_config ( const ob_pipeline * pipeline,
ob_error ** error )

Get the configuration object associated with the pipeline.

Returns default configuration if the user has not configured

Parameters
[in]pipelineThe pipeline object
[out]errorPointer to an error object that will be set if an error occurs.
Returns
ob_config* The configuration object

Referenced by ob::Pipeline::getConfig().

◆ ob_pipeline_switch_config()

OB_EXPORT void ob_pipeline_switch_config ( ob_pipeline * pipeline,
ob_config * config,
ob_error ** error )

Switch the corresponding configuration.

Parameters
[in]pipelineThe pipeline object
[in]configThe pipeline configuration
[out]errorLog error messages

◆ ob_pipeline_wait_for_frameset()

OB_EXPORT ob_frame * ob_pipeline_wait_for_frameset ( ob_pipeline * pipeline,
uint32_t timeout_ms,
ob_error ** error )

Wait for a set of frames to be returned synchronously.

Parameters
[in]pipelineThe pipeline object
[in]timeout_msThe timeout for waiting (in milliseconds)
[out]errorPointer to an error object that will be set if an error occurs.
Returns
ob_frame* The frameset that was waited for. A frameset is a special frame that can be used to obtain independent frames from the set.

Referenced by ob::Pipeline::waitForFrameset().

◆ ob_pipeline_get_device()

OB_EXPORT ob_device * ob_pipeline_get_device ( const ob_pipeline * pipeline,
ob_error ** error )

Get the device object associated with the pipeline.

Parameters
[in]pipelineThe pipeline object
[out]errorPointer to an error object that will be set if an error occurs.
Returns
ob_device* The device object

Referenced by ob::Pipeline::getDevice().

◆ ob_pipeline_get_stream_profile_list()

OB_EXPORT ob_stream_profile_list * ob_pipeline_get_stream_profile_list ( const ob_pipeline * pipeline,
ob_sensor_type sensorType,
ob_error ** error )

Get the stream profile list associated with the pipeline.

Parameters
[in]pipelineThe pipeline object
[in]sensorTypeThe sensor type. The supported sensor types can be obtained through the ob_device_get_sensor_list() interface.
[out]errorPointer to an error object that will be set if an error occurs.
Returns
ob_stream_profile_list* The stream profile list

Referenced by ob::Pipeline::getStreamProfileList().

◆ ob_pipeline_enable_frame_sync()

OB_EXPORT void ob_pipeline_enable_frame_sync ( ob_pipeline * pipeline,
ob_error ** error )

Enable frame synchronization.

Synchronize the frames of different streams by using the timestamp information of the frames.

Dynamically (when pipeline is started) enable/disable frame synchronization is allowed.

Parameters
[in]pipelineThe pipeline object
[out]errorPointer to an error object that will be set if an error occurs.

Referenced by ob::Pipeline::enableFrameSync().

◆ ob_pipeline_disable_frame_sync()

OB_EXPORT void ob_pipeline_disable_frame_sync ( ob_pipeline * pipeline,
ob_error ** error )

Disable frame synchronization.

Parameters
[in]pipelineThe pipeline object
[out]errorPointer to an error object that will be set if an error occurs.

Referenced by ob::Pipeline::disableFrameSync().

◆ ob_get_d2c_depth_profile_list()

OB_EXPORT ob_stream_profile_list * ob_get_d2c_depth_profile_list ( const ob_pipeline * pipeline,
const ob_stream_profile * color_profile,
ob_align_mode align_mode,
ob_error ** error )

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

Parameters
[in]pipelineThe pipeline object
[in]color_profileThe input profile of the color sensor
[in]align_modeThe input align mode
[out]errorPointer to an error object that will be set if an error occurs.
Returns
ob_stream_profile_list* The list of D2C-enabled depth sensor resolutions

Referenced by ob::Pipeline::getD2CDepthProfileList().

◆ ob_create_config()

OB_EXPORT ob_config * ob_create_config ( ob_error ** error)

Create the pipeline configuration.

Parameters
[out]errorPointer to an error object that will be set if an error occurs.
Returns
ob_config* The configuration object

Referenced by ob::Config::Config().

◆ ob_delete_config()

OB_EXPORT void ob_delete_config ( ob_config * config,
ob_error ** error )

Delete the pipeline configuration.

Parameters
[in]configThe configuration to be deleted
[out]errorPointer to an error object that will be set if an error occurs.

Referenced by ob::Config::~Config().

◆ ob_config_enable_stream()

OB_EXPORT void ob_config_enable_stream ( ob_config * config,
ob_stream_type stream_type,
ob_error ** error )

Enable a stream with default profile.

Parameters
[in]configThe pipeline configuration object
[in]stream_typeThe type of the stream to be enabled
[out]errorPointer to an error object that will be set if an error occurs.

Referenced by ob::Config::enableStream().

◆ ob_config_enable_all_stream()

OB_EXPORT void ob_config_enable_all_stream ( ob_config * config,
ob_error ** error )

Enable all streams in the pipeline configuration.

Parameters
[in]configThe pipeline configuration
[out]errorLog error messages

Referenced by ob::Config::enableAllStream().

◆ ob_config_enable_stream_with_stream_profile()

OB_EXPORT void ob_config_enable_stream_with_stream_profile ( ob_config * config,
const ob_stream_profile * profile,
ob_error ** error )

Enable a stream according to the stream profile.

Parameters
[in]configThe pipeline configuration object
[in]profileThe stream profile to be enabled
[out]errorPointer to an error object that will be set if an error occurs.

Referenced by ob::Config::enableStream().

◆ ob_config_enable_video_stream()

OB_EXPORT void ob_config_enable_video_stream ( ob_config * config,
ob_stream_type stream_type,
uint32_t width,
uint32_t height,
uint32_t fps,
ob_format format,
ob_error ** error )

Enable video stream with specified parameters.

Attention
The stream_type should be a video stream type, such as OB_STREAM_IR, OB_STREAM_COLOR, OB_STREAM_DEPTH, etc.
Parameters
[in]configThe pipeline configuration object
[in]stream_typeThe type of the stream to be enabled
[in]widthThe width of the video stream
[in]heightThe height of the video stream
[in]fpsThe frame rate of the video stream
[in]formatThe format of the video stream
[out]errorPointer to an error object that will be set if an error occurs.

Referenced by ob::Config::enableVideoStream().

◆ ob_config_enable_accel_stream()

OB_EXPORT void ob_config_enable_accel_stream ( ob_config * config,
ob_accel_full_scale_range full_scale_range,
ob_accel_sample_rate sample_rate,
ob_error ** error )

Enable accelerometer stream with specified parameters.

Parameters
[in]configThe pipeline configuration object
[in]full_scale_rangeThe full scale range of the accelerometer
[in]sample_rateThe sample rate of the accelerometer
[out]errorPointer to an error object that will be set if an error occurs.

Referenced by ob::Config::enableAccelStream().

◆ ob_config_enable_gyro_stream()

OB_EXPORT void ob_config_enable_gyro_stream ( ob_config * config,
ob_gyro_full_scale_range full_scale_range,
ob_gyro_sample_rate sample_rate,
ob_error ** error )

Enable gyroscope stream with specified parameters.

Parameters
[in]configThe pipeline configuration object
[in]full_scale_rangeThe full scale range of the gyroscope
[in]sample_rateThe sample rate of the gyroscope
[out]errorPointer to an error object that will be set if an error occurs.

Referenced by ob::Config::enableGyroStream().

◆ ob_config_get_enabled_stream_profile_list()

OB_EXPORT ob_stream_profile_list * ob_config_get_enabled_stream_profile_list ( const ob_config * config,
ob_error ** error )

Get the enabled stream profile list in the pipeline configuration.

Parameters
configThe pipeline configuration object
errorPointer to an error object that will be set if an error occurs.
Returns
ob_stream_profile_list* The enabled stream profile list, should be released by ob_delete_stream_profile_list after use

Referenced by ob::Config::getEnabledStreamProfileList().

◆ ob_config_disable_stream()

OB_EXPORT void ob_config_disable_stream ( ob_config * config,
ob_stream_type type,
ob_error ** error )

Disable a specific stream in the pipeline configuration.

Parameters
[in]configThe pipeline configuration object
[in]typeThe type of stream to be disabled
[out]errorPointer to an error object that will be set if an error occurs.

Referenced by ob::Config::disableStream().

◆ ob_config_disable_all_stream()

OB_EXPORT void ob_config_disable_all_stream ( ob_config * config,
ob_error ** error )

Disable all streams in the pipeline configuration.

Parameters
[in]configThe pipeline configuration object
[out]errorPointer to an error object that will be set if an error occurs.

Referenced by ob::Config::disableAllStream().

◆ ob_config_set_align_mode()

OB_EXPORT void ob_config_set_align_mode ( ob_config * config,
ob_align_mode mode,
ob_error ** error )

Set the alignment mode for the pipeline configuration.

Parameters
[in]configThe pipeline configuration object
[in]modeThe alignment mode to be set
[out]errorPointer to an error object that will be set if an error occurs.

Referenced by ob::Config::setAlignMode().

◆ ob_config_set_depth_scale_after_align_require()

OB_EXPORT void ob_config_set_depth_scale_after_align_require ( ob_config * config,
bool enable,
ob_error ** error )

Set whether depth scaling is required after enable depth to color alignment.

After enabling depth to color alignment, the depth image may need to be scaled to match the color image size.

Parameters
[in]configThe pipeline configuration object
[in]enableWhether scaling is required
[out]errorPointer to an error object that will be set if an error occurs.

Referenced by ob::Config::setDepthScaleRequire().

◆ ob_config_set_frame_aggregate_output_mode()

OB_EXPORT void ob_config_set_frame_aggregate_output_mode ( ob_config * config,
ob_frame_aggregate_output_mode mode,
ob_error ** error )

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
[in]configThe pipeline configuration object
[in]modeThe frame aggregation output mode to be set (default mode is OB_FRAME_AGGREGATE_OUTPUT_ANY_SITUATION)
[out]errorPointer to an error object that will be set if an error occurs.

Referenced by ob::Config::setFrameAggregateOutputMode().

◆ ob_pipeline_get_camera_param()

OB_EXPORT ob_camera_param ob_pipeline_get_camera_param ( ob_pipeline * pipeline,
ob_error ** error )

Get current camera parameters.

Attention
If D2C is enabled, it will return the camera parameters after D2C, if not, it will return to the default parameters
Parameters
[in]pipelinepipeline object
[out]errorLog error messages
Returns
ob_camera_param The camera internal parameters

Referenced by ob::Pipeline::getCameraParam().

◆ ob_pipeline_get_camera_param_with_profile()

OB_EXPORT ob_camera_param ob_pipeline_get_camera_param_with_profile ( ob_pipeline * pipeline,
uint32_t colorWidth,
uint32_t colorHeight,
uint32_t depthWidth,
uint32_t depthHeight,
ob_error ** error )

Get the current camera parameters.

Parameters
[in]pipelinepipeline object
[in]colorWidthcolor width
[in]colorHeightcolor height
[in]depthWidthdepth width
[in]depthHeightdepth height
[out]errorLog error messages
Returns
ob_camera_param returns camera internal parameters

Referenced by ob::Pipeline::getCameraParamWithProfile().

◆ ob_pipeline_get_calibration_param()

OB_EXPORT ob_calibration_param ob_pipeline_get_calibration_param ( ob_pipeline * pipeline,
ob_config * config,
ob_error ** error )

Get device calibration parameters with the specified configuration.

Parameters
[in]pipelinepipeline object
[in]configThe pipeline configuration
[out]errorLog error messages
Returns
ob_calibration_param The calibration parameters

Referenced by ob::Pipeline::getCalibrationParam().