OrbbecSDK 1.10.18
OrbbecSDK: Software-Development-Kit for Orbbec 3D Cameras
|
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. | |
ob_pipeline * | ob_create_pipeline_with_device (ob_device *dev, ob_error **error) |
Using device objects to create pipeline objects. | |
ob_pipeline * | ob_create_pipeline_with_playback_file (const char *file_name, ob_error **error) |
Use the playback file to create a pipeline object. | |
void | ob_delete_pipeline (ob_pipeline *pipeline, ob_error **error) |
Delete pipeline objects. | |
void | ob_pipeline_start (ob_pipeline *pipeline, ob_error **error) |
Start the pipeline with default parameters. | |
void | ob_pipeline_start_with_config (ob_pipeline *pipeline, ob_config *config, ob_error **error) |
Start the pipeline with configuration parameters. | |
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. | |
void | ob_pipeline_stop (ob_pipeline *pipeline, ob_error **error) |
Stop pipeline. | |
ob_config * | ob_pipeline_get_config (ob_pipeline *pipeline, ob_error **error) |
Get the configuration object associated with the pipeline. | |
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. | |
ob_device * | ob_pipeline_get_device (ob_pipeline *pipeline, ob_error **error) |
Get the device object associated with the pipeline. | |
ob_playback * | ob_pipeline_get_playback (ob_pipeline *pipeline, ob_error **error) |
Get the playback object associated with the pipeline. | |
ob_stream_profile_list * | ob_pipeline_get_stream_profile_list (ob_pipeline *pipeline, ob_sensor_type sensorType, ob_error **error) |
Get the stream profile list associated with the pipeline. | |
void | ob_pipeline_enable_frame_sync (ob_pipeline *pipeline, ob_error **error) |
Enable frame synchronization. | |
void | ob_pipeline_disable_frame_sync (ob_pipeline *pipeline, ob_error **error) |
Disable frame synchronization. | |
void | ob_pipeline_switch_config (ob_pipeline *pipeline, ob_config *config, ob_error **error) |
Dynamically switch the corresponding configuration. | |
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_camera_param | ob_pipeline_get_camera_param (ob_pipeline *pipeline, ob_error **error) |
Get current camera parameters. | |
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. | |
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) |
Return a list of D2C-enabled depth sensor resolutions corresponding to the input color sensor resolution. | |
ob_rect | ob_get_d2c_valid_area (ob_pipeline *pipeline, uint32_t distance, ob_error **error) |
Get the valid area after D2C (DEPRECATED) | |
ob_rect | ob_get_d2c_range_valid_area (ob_pipeline *pipeline, uint32_t minimum_distance, uint32_t maximum_distance, ob_error **error) |
Get the valid area between the minimum distance and maximum distance after D2C. | |
void | ob_pipeline_start_record (ob_pipeline *pipeline, const char *file_name, ob_error **error) |
Start recording. | |
void | ob_pipeline_stop_record (ob_pipeline *pipeline, ob_error **error) |
Stop recording. | |
ob_config * | ob_create_config (ob_error **error) |
Create the pipeline configuration. | |
void | ob_delete_config (ob_config *config, ob_error **error) |
Delete the pipeline configuration. | |
void | ob_config_enable_stream (ob_config *config, ob_stream_profile *profile, ob_error **error) |
Enable the specified stream in the pipeline configuration. | |
void | ob_config_enable_video_stream (ob_config *config, ob_stream_type type, int width, int height, int fps, ob_format format, ob_error **error) |
Enable a video stream to be used in the configuration. | |
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 an accelerometer stream to be used in the configuration. | |
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 a gyroscope stream to be used in the configuration. | |
void | ob_config_enable_all_stream (ob_config *config, ob_error **error) |
Enable all streams in the pipeline configuration. | |
ob_stream_profile_list * | ob_config_get_enabled_stream_profile_list (ob_config *config, ob_error **error) |
Get the enabled stream profile list in the pipeline configuration. | |
void | ob_config_disable_stream (ob_config *config, ob_stream_type type, ob_error **error) |
Disable a specific stream in the pipeline configuration. | |
void | ob_config_disable_all_stream (ob_config *config, ob_error **error) |
Disable all streams in the pipeline configuration. | |
void | ob_config_set_align_mode (ob_config *config, ob_align_mode mode, ob_error **error) |
Set the alignment mode for the pipeline configuration. | |
void | ob_config_set_depth_scale_require (ob_config *config, bool enable, ob_error **error) |
Set whether depth scaling is required after setting D2C. | |
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 target resolution for D2C, which is applicable when the color stream is not enabled using the OrbbecSDK and the depth needs to be D2C Note: When using the OrbbecSDK to enable the color stream, this interface should also be used to set the D2C target resolution. The configuration of the enabled color stream is preferred for D2C. | |
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 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.
ob_pipeline * ob_create_pipeline | ( | ob_error ** | error | ) |
Create a pipeline object.
[out] | error | Log error messages |
ob_pipeline * ob_create_pipeline_with_device | ( | ob_device * | dev, |
ob_error ** | error | ||
) |
Using device objects to create pipeline objects.
[in] | dev | Device object used to create pipeline |
[out] | error | Log error messages |
ob_pipeline * ob_create_pipeline_with_playback_file | ( | const char * | file_name, |
ob_error ** | error | ||
) |
Use the playback file to create a pipeline object.
[in] | file_name | The playback file path used to create the pipeline |
[out] | error | Log error messages |
void ob_delete_pipeline | ( | ob_pipeline * | pipeline, |
ob_error ** | error | ||
) |
Delete pipeline objects.
[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.
[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.
[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.
[in] | pipeline | pipeline object |
[in] | config | Parameters to be configured |
[in] | callback | Trigger a callback when all frame data in the frameset 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.
[in] | pipeline | pipeline object |
[out] | error | Log error messages |
ob_config * ob_pipeline_get_config | ( | ob_pipeline * | pipeline, |
ob_error ** | error | ||
) |
Get the configuration object associated with the pipeline.
Returns default configuration if the user has not configured
[in] | pipeline | The pipeline object |
[out] | error | Log error messages |
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.
[in] | pipeline | The pipeline object |
[in] | timeout_ms | The timeout for waiting (in milliseconds) |
[out] | error | Log error messages |
ob_device * ob_pipeline_get_device | ( | ob_pipeline * | pipeline, |
ob_error ** | error | ||
) |
Get the device object associated with the pipeline.
[in] | pipeline | The pipeline object |
[out] | error | Log error messages |
ob_playback * ob_pipeline_get_playback | ( | ob_pipeline * | pipeline, |
ob_error ** | error | ||
) |
Get the playback object associated with the pipeline.
[in] | pipeline | The pipeline object |
[out] | error | Log error messages |
ob_stream_profile_list * ob_pipeline_get_stream_profile_list | ( | ob_pipeline * | pipeline, |
ob_sensor_type | sensorType, | ||
ob_error ** | error | ||
) |
Get the stream profile list associated with the pipeline.
[in] | pipeline | The pipeline object |
[in] | sensorType | The sensor type. The supported sensor types can be obtained through the ob_device_get_sensor_list() interface. |
[out] | error | Log error messages |
void ob_pipeline_enable_frame_sync | ( | ob_pipeline * | pipeline, |
ob_error ** | error | ||
) |
Enable frame synchronization.
[in] | pipeline | The pipeline object |
[out] | error | Log error messages |
void ob_pipeline_disable_frame_sync | ( | ob_pipeline * | pipeline, |
ob_error ** | error | ||
) |
Disable frame synchronization.
[in] | pipeline | The 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 configuration.
[in] | pipeline | The pipeline object |
[in] | config | The pipeline configuration |
[out] | error | Log error messages |
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.
[in] | pipeline | pipeline object |
[in] | colorWidth | color width |
[in] | colorHeight | color height |
[in] | depthWidth | depth width |
[in] | depthHeight | depth height |
[out] | error | Log error messages |
ob_camera_param ob_pipeline_get_camera_param | ( | ob_pipeline * | pipeline, |
ob_error ** | error | ||
) |
Get current camera parameters.
[in] | pipeline | pipeline object |
[out] | error | Log error messages |
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.
[in] | pipeline | pipeline object |
[in] | config | The pipeline configuration |
[out] | error | Log error messages |
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 | ||
) |
Return a list of D2C-enabled depth sensor resolutions corresponding to the input color sensor resolution.
[in] | pipeline | The pipeline object |
[in] | color_profile | The input profile of the color sensor |
[in] | align_mode | The input align mode |
[out] | error | Log error messages |
ob_rect ob_get_d2c_valid_area | ( | ob_pipeline * | pipeline, |
uint32_t | distance, | ||
ob_error ** | error | ||
) |
Get the valid area after D2C (DEPRECATED)
[in] | pipeline | The pipeline object |
[in] | distance | The working distance |
[out] | error | Log error messages |
ob_rect ob_get_d2c_range_valid_area | ( | ob_pipeline * | pipeline, |
uint32_t | minimum_distance, | ||
uint32_t | maximum_distance, | ||
ob_error ** | error | ||
) |
Get the valid area between the minimum distance and maximum distance after D2C.
[in] | pipeline | The pipeline object |
[in] | minimum_distance | The minimum working distance |
[in] | maximum_distance | The maximum working distance |
[out] | error | Log error messages |
void ob_pipeline_start_record | ( | ob_pipeline * | pipeline, |
const char * | file_name, | ||
ob_error ** | error | ||
) |
Start recording.
[in] | pipeline | The pipeline object |
[in] | file_name | The recorded file path |
[out] | error | Log error messages |
void ob_pipeline_stop_record | ( | ob_pipeline * | pipeline, |
ob_error ** | error | ||
) |
Stop recording.
[in] | pipeline | The pipeline object |
[out] | error | Log error messages |
Create the pipeline configuration.
[out] | error | Log error messages |
Delete the pipeline configuration.
[in] | config | The configuration to be deleted |
[out] | error | Log error messages |
void ob_config_enable_stream | ( | ob_config * | config, |
ob_stream_profile * | profile, | ||
ob_error ** | error | ||
) |
Enable the specified stream in the pipeline configuration.
[in] | config | The pipeline configuration |
[in] | profile | The stream configuration to be enabled |
[out] | error | Log error messages |
void ob_config_enable_video_stream | ( | ob_config * | config, |
ob_stream_type | type, | ||
int | width, | ||
int | height, | ||
int | fps, | ||
ob_format | format, | ||
ob_error ** | error | ||
) |
Enable a video stream to be used in the configuration.
This function configures and enables a video stream with specific parameters. Users must specify all parameters explicitly as C does not support default arguments. Refer to the product manual for details on supported resolutions and formats for different camera models.
config | Pointer to the configuration structure. |
type | The video stream type. |
width | The video stream width. |
height | The video stream height. |
fps | The video stream frame rate. |
format | The video stream format. |
error | Pointer to store the error if operation fails. |
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 an accelerometer stream to be used in the configuration.
This function configures and enables an accelerometer stream with specific parameters. Users must specify all parameters explicitly. For details on available full-scale ranges and sample rates, please refer to the product manual.
config | Pointer to the configuration structure. |
fullScaleRange | The full-scale range of the accelerometer. |
sampleRate | The sample rate of the accelerometer. |
error | Pointer to store the error if operation fails. |
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 a gyroscope stream to be used in the configuration.
This function configures and enables a gyroscope stream with specific parameters. Users must specify all parameters explicitly. For details on available full-scale ranges and sample rates, please refer to the product manual.
config | Pointer to the configuration structure. |
fullScaleRange | The full-scale range of the gyroscope. |
sampleRate | The sample rate of the gyroscope. |
error | Pointer to store the error if operation fails. |
Enable all streams in the pipeline configuration.
[in] | config | The pipeline configuration |
[out] | error | Log error messages |
ob_stream_profile_list * ob_config_get_enabled_stream_profile_list | ( | ob_config * | config, |
ob_error ** | error | ||
) |
Get the enabled stream profile list in the pipeline configuration.
config | The pipeline configuration |
error | Log error messages |
void ob_config_disable_stream | ( | ob_config * | config, |
ob_stream_type | type, | ||
ob_error ** | error | ||
) |
Disable a specific stream in the pipeline configuration.
[in] | config | The pipeline configuration |
[in] | type | The type of stream to be disabled |
[out] | error | Log error messages |
Disable all streams in the pipeline configuration.
[in] | config | The pipeline configuration |
[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 for the pipeline configuration.
[in] | config | The pipeline configuration |
[in] | mode | The alignment mode to be set |
[out] | error | Log error messages |
Set whether depth scaling is required after setting D2C.
[in] | config | The pipeline configuration |
[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 target resolution for D2C, which is applicable when the color stream is not enabled using the OrbbecSDK and the depth needs to be D2C Note: When using the OrbbecSDK to enable the color stream, this interface should also be used to set the D2C target resolution. The configuration of the enabled color stream is preferred for D2C.
[in] | config | The pipeline configuration |
[in] | d2c_target_width | The target width for D2C |
[in] | d2c_target_height | The target height for D2C |
[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 | ||
) |
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.
[in] | config | The pipeline configuration |
[in] | mode | The frame aggregation output mode to be set (default mode is OB_FRAME_AGGREGATE_OUTPUT_FULL_FRAME_REQUIRE) |
[out] | error | Log error messages |