OrbbecSDK  1.5.7
OrbbecSDK: Software-Development-Kit for Orbbec 3D-Sensor devices
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_pipelineob_create_pipeline (ob_error **error)
 Create a pipeline object. More...
 
ob_pipelineob_create_pipeline_with_device (ob_device *dev, ob_error **error)
 Using device objects to create pipeline objects. More...
 
ob_pipelineob_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_configob_pipeline_get_config (ob_pipeline *pipeline, ob_error **error)
 Get current pipeline parameters. More...
 
ob_frameob_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_deviceob_pipeline_get_device (ob_pipeline *pipeline, ob_error **error)
 Get device from the pipeline. More...
 
ob_playbackob_pipeline_get_playback (ob_pipeline *pipeline, ob_error **error)
 Get playback object from pipeline. More...
 
ob_stream_profile_listob_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_listob_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_configob_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]errorLog 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]devDevice object used to create pipeline
[out]errorLog 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_nameThe playback file path used to create the pipeline
[out]errorLog error messages
Returns
ob_pipeline* returns the pipeline object
void ob_delete_pipeline ( ob_pipeline pipeline,
ob_error **  error 
)

Delete pipeline objects.

Parameters
[in]pipelineThe pipeline object to be deleted
[out]errorLog error messages
void ob_pipeline_start ( ob_pipeline pipeline,
ob_error **  error 
)

Start the pipeline with default parameters.

Parameters
[in]pipelinepipeline object
[out]errorLog 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]pipelinepipeline object
[in]configParameters to be configured
[out]errorLog 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]pipelinepipeline object
[in]configParameters to be configured
[in]callbackTrigger a callback when all frame data in the frame set arrives
[in]user_dataPass in any user data and get it from the callback
[out]errorLog error messages
void ob_pipeline_stop ( ob_pipeline pipeline,
ob_error **  error 
)

Stop pipeline.

Parameters
[in]pipelinepipeline object
[out]errorLog error messages
ob_config* ob_pipeline_get_config ( ob_pipeline pipeline,
ob_error **  error 
)

Get current pipeline parameters.

Parameters
[in]pipelinepipeline object
[out]errorLog 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]pipelinepipeline object
[in]timeout_msWaiting timeout (ms)
[out]errorLog 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]pipelinepipeline object
[out]errorLog 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]pipelinepipeline objet
[out]errorLog 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]pipelinepipeline object
[in]sensor_typesensor type, the sensor_type type supported by the camera can be obtained through the ob_device_get_sensor_list() interface
[out]profile_countThe number of stream configurations obtained
[out]errorLog 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]pipelinepipeline object
[out]errorLog error messages
void ob_pipeline_disable_frame_sync ( ob_pipeline pipeline,
ob_error **  error 
)

Disable frame synchronization.

Parameters
[in]pipelinepipeline object
[out]errorLog error messages
void ob_pipeline_switch_config ( ob_pipeline pipeline,
ob_config config,
ob_error **  error 
)

Dynamically switch the corresponding config configuration.

Parameters
[in]pipelinepipeline object
[in]configpipeline configuration
[out]errorLog 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]pipelinepipeline object
[out]errorLog 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]pipelinepipeline object
[in]color_profileInput resolution of Color Sensor
[in]align_modeInput align mode
[out]errorLog 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]pipelinepipeline object
[in]distanceworking distance
[out]errorLog 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]pipelinepipeline object
[in]minimum_distanceminimum working distance
[in]maximum_distancemaximum working distance
[out]errorLog 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]pipelinepipeline object
[in]file_nameRecorded file path
[out]errorLog error messages
void ob_pipeline_stop_record ( ob_pipeline pipeline,
ob_error **  error 
)

Turn off recording.

Parameters
[in]pipelinepipeline object
[out]errorLog error messages
ob_config* ob_create_config ( ob_error **  error)

Create the pipeline configuration.

Parameters
[out]errorLog 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]configConfiguration to be deleted
[out]errorLog 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]configConfiguration of pipeline
[in]profileThe configuration of the stream to be opened
[out]errorLog error messages
void ob_config_enable_all_stream ( ob_config config,
ob_error **  error 
)

Configure all streams to be enabled.

Parameters
[in]configConfiguration of pipeline
[out]errorLog 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]configConfiguration of pipeline
[in]profileThe configuration of the stream to be closed
[out]errorLog error messages
void ob_config_disable_all_stream ( ob_config config,
ob_error **  error 
)

Configure all streams to be disabled.

Parameters
[in]configConfiguration of pipeline
[out]errorLog error messages
void ob_config_set_align_mode ( ob_config config,
ob_align_mode  mode,
ob_error **  error 
)

Set the alignment mode.

Parameters
[in]configconfig object
[in]modealignment mode
[out]errorLog 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]configconfig object
[in]enableWhether scaling is required
[out]errorLog 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]configconfig object
[in]d2c_target_widthThe D2C target has a wide resolution
[in]d2c_target_heightThe D2C targets has a high resolution
[out]errorLog 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
configconfig object
modeframe aggregation output mode(default mode is OB_FRAME_AGGREGATE_OUTPUT_ANY_SITUATION)
errorLog error messages