mirror of
https://github.com/orbbec/OrbbecSDK_ROS2.git
synced 2026-10-03 19:47:46 +08:00
update OrbbecSDK version
This commit is contained in:
@@ -1562,13 +1562,13 @@ typedef struct {
|
||||
} OBDispOffsetConfig, ob_disp_offset_config;
|
||||
|
||||
/**
|
||||
* @details Defines the original resolution and scaling factor for down-sampling.
|
||||
* @details Defines the original resolution and hardware decimation factor for down-sampling.
|
||||
*/
|
||||
typedef struct {
|
||||
uint32_t originWidth;
|
||||
uint32_t originHeight;
|
||||
uint32_t scaleFactor;
|
||||
} OBDownSampleConfig, ob_down_sample_config;
|
||||
uint32_t decimationFactor;
|
||||
} OBHardwareDecimationConfig, ob_hardware_decimation_config;
|
||||
|
||||
/**
|
||||
* @brief Frame metadata types
|
||||
|
||||
@@ -236,8 +236,9 @@ OB_EXPORT void ob_config_enable_video_stream(ob_config *config, ob_stream_type s
|
||||
* @param[in] format The format of the video stream
|
||||
* @param[out] error Pointer to an error object that will be set if an error occurs.
|
||||
*/
|
||||
OB_EXPORT void ob_config_enable_video_stream_by_down_sample_config(ob_config *config, ob_stream_type stream_type, ob_down_sample_config down_sample_config,
|
||||
uint32_t fps, ob_format format, ob_error **error);
|
||||
OB_EXPORT void ob_config_enable_video_stream_by_down_sample_config(ob_config *config, ob_stream_type stream_type,
|
||||
ob_hardware_decimation_config down_sample_config, uint32_t fps, ob_format format,
|
||||
ob_error **error);
|
||||
|
||||
/**
|
||||
* @brief Enable accelerometer stream with specified parameters
|
||||
@@ -352,6 +353,23 @@ OB_EXPORT ob_camera_param ob_pipeline_get_camera_param(ob_pipeline *pipeline, ob
|
||||
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);
|
||||
|
||||
/**
|
||||
* @brief Get the current camera parameters with down-sampled depth profile
|
||||
*
|
||||
* @param[in] pipeline pipeline object
|
||||
* @param[in] colorWidth color width
|
||||
* @param[in] colorHeight color height
|
||||
* @param[in] originDepthWidth original depth width before down-sampling
|
||||
* @param[in] originDepthHeight original depth height before down-sampling
|
||||
* @param[in] decimationFactor depth down-sampling factor
|
||||
* @param[out] error Log error messages
|
||||
*
|
||||
* @return ob_camera_param returns camera internal parameters
|
||||
*/
|
||||
OB_EXPORT ob_camera_param ob_pipeline_get_camera_param_with_down_sample_profile(ob_pipeline *pipeline, uint32_t colorWidth, uint32_t colorHeight,
|
||||
uint32_t originDepthWidth, uint32_t originDepthHeight,
|
||||
uint32_t decimationFactor, ob_error **error);
|
||||
|
||||
/**
|
||||
* @brief Get device calibration parameters with the specified configuration
|
||||
*
|
||||
|
||||
@@ -253,9 +253,9 @@ OB_EXPORT ob_camera_distortion ob_video_stream_profile_get_distortion(const ob_s
|
||||
* @param[in] profile Stream profile object.
|
||||
* @param[out] error Pointer to an error object that will be set if an error occurs.
|
||||
*
|
||||
* @return ob_down_sample_config The down-sampling configuration of the stream.
|
||||
* @return ob_hardware_decimation_config The down-sampling configuration of the stream.
|
||||
*/
|
||||
OB_EXPORT ob_down_sample_config ob_video_stream_profile_get_down_sample_config(const ob_stream_profile *profile, ob_error **error);
|
||||
OB_EXPORT ob_hardware_decimation_config ob_video_stream_profile_get_down_sample_config(const ob_stream_profile *profile, ob_error **error);
|
||||
|
||||
/**
|
||||
* @brief Set the distortion of the video stream profile
|
||||
@@ -428,8 +428,8 @@ OB_EXPORT ob_stream_profile *ob_stream_profile_list_get_video_stream_profile(con
|
||||
* @return The matched stream profile.
|
||||
*/
|
||||
OB_EXPORT ob_stream_profile *ob_stream_profile_list_get_video_stream_profile_by_down_sample_config(const ob_stream_profile_list *profile_list,
|
||||
ob_down_sample_config down_sample_config, ob_format format,
|
||||
int fps, ob_error **error);
|
||||
ob_hardware_decimation_config down_sample_config,
|
||||
ob_format format, int fps, ob_error **error);
|
||||
|
||||
/**
|
||||
* @brief Match the corresponding ob_stream_profile through the passed parameters. If there are multiple matches,
|
||||
|
||||
@@ -133,7 +133,8 @@ public:
|
||||
* @param[in] fps The video stream frame rate (default is OB_FPS_ANY, which selects the default frame rate).
|
||||
* @param[in] format The video stream format (default is OB_FORMAT_ANY, which selects the default format).
|
||||
*/
|
||||
void enableVideoStream(OBSensorType sensorType, OBDownSampleConfig downSampleConfig, uint32_t fps = OB_FPS_ANY, OBFormat format = OB_FORMAT_ANY) const {
|
||||
void enableVideoStream(OBSensorType sensorType, OBHardwareDecimationConfig downSampleConfig, uint32_t fps = OB_FPS_ANY,
|
||||
OBFormat format = OB_FORMAT_ANY) const {
|
||||
auto streamType = ob::TypeHelper::convertSensorTypeToStreamType(sensorType);
|
||||
ob_error *error = nullptr;
|
||||
ob_config_enable_video_stream_by_down_sample_config(impl_, streamType, downSampleConfig, fps, format, &error);
|
||||
@@ -470,6 +471,13 @@ public:
|
||||
return cameraParam;
|
||||
}
|
||||
|
||||
OBCameraParam getCameraParamWithProfile(uint32_t colorWidth, uint32_t colorHeight, uint32_t depthWidth, uint32_t depthHeight, uint32_t decimationFactor) {
|
||||
ob_error *error = nullptr;
|
||||
OBCameraParam cameraParam = ob_pipeline_get_camera_param_with_down_sample_profile(impl_, colorWidth, colorHeight, depthWidth, depthHeight, decimationFactor, &error);
|
||||
Error::handle(&error);
|
||||
return cameraParam;
|
||||
}
|
||||
|
||||
OBCalibrationParam getCalibrationParam(std::shared_ptr<Config> config) {
|
||||
ob_error *error = nullptr;
|
||||
OBCalibrationParam calibrationParam = ob_pipeline_get_calibration_param(impl_, config->getImpl(), &error);
|
||||
|
||||
@@ -106,7 +106,7 @@ public:
|
||||
*/
|
||||
void bindExtrinsicTo(const OBStreamType &targetStreamType, const OBExtrinsic &extrinsic) {
|
||||
ob_error *error = nullptr;
|
||||
ob_stream_profile_set_extrinsic_to_type(const_cast<ob_stream_profile_t *>(impl_),targetStreamType,extrinsic, &error);
|
||||
ob_stream_profile_set_extrinsic_to_type(const_cast<ob_stream_profile_t *>(impl_), targetStreamType, extrinsic, &error);
|
||||
Error::handle(&error);
|
||||
}
|
||||
|
||||
@@ -258,9 +258,9 @@ public:
|
||||
* @brief Get the down-sampling configuration of the stream.
|
||||
* @brief Includes original resolution and scale factor.
|
||||
*
|
||||
* @return OBDownSampleConfig Return the down-sampling configuration.
|
||||
* @return OBHardwareDecimationConfig Return the down-sampling configuration.
|
||||
*/
|
||||
OBDownSampleConfig getDownSampleConfig() const {
|
||||
OBHardwareDecimationConfig getDownSampleConfig() const {
|
||||
ob_error *error = nullptr;
|
||||
auto downSampleConfig = ob_video_stream_profile_get_down_sample_config(const_cast<ob_stream_profile_t *>(impl_), &error);
|
||||
Error::handle(&error);
|
||||
@@ -538,7 +538,7 @@ public:
|
||||
*
|
||||
* @return std::shared_ptr<VideoStreamProfile> Return the matched video stream profile.
|
||||
*/
|
||||
std::shared_ptr<VideoStreamProfile> getVideoStreamProfile(OBDownSampleConfig downSampleConfig, OBFormat format = OB_FORMAT_ANY,
|
||||
std::shared_ptr<VideoStreamProfile> getVideoStreamProfile(OBHardwareDecimationConfig downSampleConfig, OBFormat format = OB_FORMAT_ANY,
|
||||
int fps = OB_FPS_ANY) const {
|
||||
ob_error *error = nullptr;
|
||||
auto profile = ob_stream_profile_list_get_video_stream_profile_by_down_sample_config(impl_, downSampleConfig, format, fps, &error);
|
||||
|
||||
Reference in New Issue
Block a user