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

- Main Page
- Namespaces
- Classes
- Files

- File List
- File Members

Functions
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.

## Functions
ob_pipeline * | ob_create_pipeline (ob_error **error)
| Create a pipeline object. More...
ob_pipeline * | ob_create_pipeline_with_device (ob_device *dev, ob_error **error)
| Using device objects to create pipeline objects. More...
ob_pipeline * | ob_create_pipeline_with_playback_file (const char *file_name, ob_error **error)
| Use the playback file to create a pipeline object. More...
void | ob_delete_pipeline (ob_pipeline *pipeline, ob_error **error)
| Delete pipeline objects. More...
void | ob_pipeline_start (ob_pipeline *pipeline, ob_error **error)
| Start the pipeline with default parameters. More...
void | ob_pipeline_start_with_config (ob_pipeline *pipeline, ob_config *config, ob_error **error)
| Start the pipeline with configuration parameters. More...
void | ob_pipeline_start_with_callback (ob_pipeline *pipeline, ob_config *config, ob_frameset_callback callback, void *user_data, ob_error **error)
| Start the pipeline and set the frame collection data callback. More...
void | ob_pipeline_stop (ob_pipeline *pipeline, ob_error **error)
| Stop pipeline. More...
ob_config * | ob_pipeline_get_config (ob_pipeline *pipeline, ob_error **error)
| Get current pipeline parameters. More...
ob_frame * | ob_pipeline_wait_for_frameset (ob_pipeline *pipeline, uint32_t timeout_ms, ob_error **error)
| Waiting for the return of a set of frames in the form of synchronous blocking. More...
ob_device * | ob_pipeline_get_device (ob_pipeline *pipeline, ob_error **error)
| Get device from the pipeline. More...
ob_playback * | ob_pipeline_get_playback (ob_pipeline *pipeline, ob_error **error)
| Get playback object from pipeline. More...
ob_stream_profile_list * | ob_pipeline_get_stream_profile_list (ob_pipeline *pipeline, ob_sensor_type sensorType, ob_error **error)
| Get stream profile from the pipeline. More...
void | ob_pipeline_enable_frame_sync (ob_pipeline *pipeline, ob_error **error)
| Enable frame synchronization. More...
void | ob_pipeline_disable_frame_sync (ob_pipeline *pipeline, ob_error **error)
| Disable frame synchronization. More...
void | ob_pipeline_switch_config (ob_pipeline *pipeline, ob_config *config, ob_error **error)
| Dynamically switch the corresponding config configuration. More...
ob_camera_param | ob_pipeline_get_camera_param (ob_pipeline *pipeline, ob_error **error)
| Get current camera parameters. More...
ob_stream_profile_list * | ob_get_d2c_depth_profile_list (ob_pipeline *pipeline, ob_stream_profile *color_profile, ob_align_mode align_mode, ob_error **error)
| Returns a list of D2C-enabled depth sensor resolutions corresponding to the input color sensor resolution. More...
ob_rect | ob_get_d2c_valid_area (ob_pipeline *pipeline, uint32_t distance, ob_error **error)
| Get valid area after D2C (DEPRECATED) More...
ob_rect | ob_get_d2c_range_valid_area (ob_pipeline *pipeline, uint32_t minimum_distance, uint32_t maximum_distance, ob_error **error)
| Get valid area between minimum distance and maximum distance after D2C. More...
void | ob_pipeline_start_record (ob_pipeline *pipeline, const char *file_name, ob_error **error)
| Start recording. More...
void | ob_pipeline_stop_record (ob_pipeline *pipeline, ob_error **error)
| Turn off recording. More...
ob_config * | ob_create_config (ob_error **error)
| Create the pipeline configuration. More...
void | ob_delete_config (ob_config *config, ob_error **error)
| Delete the pipeline configuration. More...
void | ob_config_enable_stream (ob_config *config, ob_stream_profile *profile, ob_error **error)
| Configure the stream to be enabled. More...
void | ob_config_enable_all_stream (ob_config *config, ob_error **error)
| Configure all streams to be enabled. More...
void | ob_config_disable_stream (ob_config *config, ob_stream_type type, ob_error **error)
| Configure the stream to be disabled. More...
void | ob_config_disable_all_stream (ob_config *config, ob_error **error)
| Configure all streams to be disabled. More...
void | ob_config_set_align_mode (ob_config *config, ob_align_mode mode, ob_error **error)
| Set the alignment mode. More...
void | ob_config_set_depth_scale_require (ob_config *config, bool enable, ob_error **error)
| Whether the depth needs to be scaled after setting D2C. More...
void | ob_config_set_d2c_target_resolution (ob_config *config, uint32_t d2c_target_width, uint32_t d2c_target_height, ob_error **error)
| Set the D2C target resolution, which 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. More...
void | ob_config_set_frame_aggregate_output_mode (ob_config *config, ob_frame_aggregate_output_mode mode, ob_error **error)
| Frame aggregation output mode. More...

## 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.

## Function Documentation

ob_pipeline* ob_create_pipeline | ( | ob_error ** | error | ) |

Create a pipeline object.

Parameters

  [out] | error | Log error messages

Returns
  ob_pipeline* returns the pipeline object

ob_pipeline* ob_create_pipeline_with_device | ( | ob_device * | dev,
|  | ob_error ** | error
| ) |  |

Using device objects to create pipeline objects.

Parameters

  [in] | dev | Device object used to create pipeline
  [out] | error | Log error messages

Returns
  ob_pipeline* returns the pipeline object

ob_pipeline* ob_create_pipeline_with_playback_file | ( | const char * | file_name,
|  | ob_error ** | error
| ) |  |

Use the playback file to create a pipeline object.

Parameters

  [in] | file_name | The playback file path used to create the pipeline
  [out] | error | Log error messages

Returns
  ob_pipeline* returns the pipeline object

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

Delete pipeline objects.

Parameters

  [in] | pipeline | The pipeline object to be deleted
  [out] | error | Log error messages

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

Start the pipeline with default parameters.

Parameters

  [in] | pipeline | pipeline object
  [out] | error | Log error messages

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

Start the pipeline with configuration parameters.

Parameters

  [in] | pipeline | pipeline object
  [in] | config | Parameters to be configured
  [out] | error | Log error messages

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

Start the pipeline and set the frame collection data callback.

Parameters

  [in] | pipeline | pipeline object
  [in] | config | Parameters to be configured
  [in] | callback | Trigger a callback when all frame data in the frame set arrives
  [in] | user_data | Pass in any user data and get it from the callback
  [out] | error | Log error messages

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

Stop pipeline.

Parameters

  [in] | pipeline | pipeline object
  [out] | error | Log error messages

ob_config* ob_pipeline_get_config | ( | ob_pipeline * | pipeline,
|  | ob_error ** | error
| ) |  |

Get current pipeline parameters.

Parameters

  [in] | pipeline | pipeline object
  [out] | error | Log error messages

Returns
  ob_config* returns pipeline parameters

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

Waiting for the return of a set of frames in the form of synchronous blocking.

Parameters

  [in] | pipeline | pipeline object
  [in] | timeout_ms | Waiting timeout (ms)
  [out] | error | Log error messages

Returns
  ob_frame* returns the waiting frameset, frameset is a special frame, you can use the frameset related interface to obtain the independent frame in the set

ob_device* ob_pipeline_get_device | ( | ob_pipeline * | pipeline,
|  | ob_error ** | error
| ) |  |

Get device from the pipeline.

Parameters

  [in] | pipeline | pipeline object
  [out] | error | Log error messages

Returns
  ob_device* returns the device object

ob_playback* ob_pipeline_get_playback | ( | ob_pipeline * | pipeline,
|  | ob_error ** | error
| ) |  |

Get playback object from pipeline.

Parameters

  [in] | pipeline | pipeline objet
  [out] | error | Log error messages

Returns
  ob_playback* returns the playback object

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

Get stream profile from the pipeline.

Parameters

  [in] | pipeline | pipeline object
  [in] | sensor_type | sensor type, the sensor_type type supported by the camera can be obtained through the ob_device_get_sensor_list() interface
  [out] | profile_count | The number of stream configurations obtained
  [out] | error | Log error messages

Returns
  ob_stream_profile_list* returns to the stream profile list

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

Enable frame synchronization.

Parameters

  [in] | pipeline | pipeline object
  [out] | error | Log error messages

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

Disable frame synchronization.

Parameters

  [in] | pipeline | pipeline object
  [out] | error | Log error messages

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

Dynamically switch the corresponding config configuration.

Parameters

  [in] | pipeline | pipeline object
  [in] | config | pipeline configuration
  [out] | error | Log error messages

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] | pipeline | pipeline object
  [out] | error | Log error messages

Returns
  ob_camera_param returns camera internal parameters

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

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

Parameters

  [in] | pipeline | pipeline object
  [in] | color_profile | Input resolution of Color Sensor
  [in] | align_mode | Input align mode
  [out] | error | Log error messages

Returns
  ob_stream_profile_list*

ob_rect ob_get_d2c_valid_area | ( | ob_pipeline * | pipeline,
|  | uint32_t | distance,
|  | ob_error ** | error
| ) |  |

Get valid area after D2C (DEPRECATED)

Parameters

  [in] | pipeline | pipeline object
  [in] | distance | working distance
  [out] | error | Log error messages

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

ob_rect ob_get_d2c_range_valid_area | ( | ob_pipeline * | pipeline,
|  | uint32_t | minimum_distance,
|  | uint32_t | maximum_distance,
|  | ob_error ** | error
| ) |  |

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

Parameters

  [in] | pipeline | pipeline object
  [in] | minimum_distance | minimum working distance
  [in] | maximum_distance | maximum working distance
  [out] | error | Log error messages

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

void ob_pipeline_start_record | ( | ob_pipeline * | pipeline,
|  | const char * | file_name,
|  | ob_error ** | error
| ) |  |

Start recording.

Parameters

  [in] | pipeline | pipeline object
  [in] | file_name | Recorded file path
  [out] | error | Log error messages

void ob_pipeline_stop_record | ( | ob_pipeline * | pipeline,
|  | ob_error ** | error
| ) |  |

Turn off recording.

Parameters

  [in] | pipeline | pipeline object
  [out] | error | Log error messages

ob_config* ob_create_config | ( | ob_error ** | error | ) |

Create the pipeline configuration.

Parameters

  [out] | error | Log error messages

Returns
  ob_config* returns the configuration object

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

Delete the pipeline configuration.

Parameters

  [in] | config | Configuration to be deleted
  [out] | error | Log error messages

void ob_config_enable_stream | ( | ob_config * | config,
|  | ob_stream_profile * | profile,
|  | ob_error ** | error
| ) |  |

Configure the stream to be enabled.

Parameters

  [in] | config | Configuration of pipeline
  [in] | profile | The configuration of the stream to be opened
  [out] | error | Log error messages

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

Configure all streams to be enabled.

Parameters

  [in] | config | Configuration of pipeline
  [out] | error | Log error messages

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

Configure the stream to be disabled.

Parameters

  [in] | config | Configuration of pipeline
  [in] | profile | The configuration of the stream to be closed
  [out] | error | Log error messages

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

Configure all streams to be disabled.

Parameters

  [in] | config | Configuration of pipeline
  [out] | error | Log error messages

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

Set the alignment mode.

Parameters

  [in] | config | config object
  [in] | mode | alignment mode
  [out] | error | Log error messages

void ob_config_set_depth_scale_require | ( | ob_config * | config,
|  | bool | enable,
|  | ob_error ** | error
| ) |  |

Whether the depth needs to be scaled after setting D2C.

Parameters

  [in] | config | config object
  [in] | enable | Whether scaling is required
  [out] | error | Log error messages

void ob_config_set_d2c_target_resolution | ( | ob_config * | config,
|  | uint32_t | d2c_target_width,
|  | uint32_t | d2c_target_height,
|  | ob_error ** | error
| ) |  |

Set the D2C target resolution, which 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

  [in] | config | config object
  [in] | d2c_target_width | The D2C target has a wide resolution
  [in] | d2c_target_height | The D2C targets has a high resolution
  [out] | error | Log error messages

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

Frame aggregation output mode.

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

  config | config object
  mode | frame aggregation output mode（default mode is OB_FRAME_AGGREGATE_OUTPUT_ANY_SITUATION）
  error | Log error messages