Update Orbbec SDK to version 2.5.0

This commit is contained in:
obyalian
2025-09-02 17:03:39 +08:00
committed by xiexun
parent e2e0664615
commit fef7345e6d
19 changed files with 180 additions and 82 deletions
@@ -19,26 +19,26 @@
extern "C" { extern "C" {
#endif #endif
typedef struct ob_context_t ob_context; typedef struct ob_context_t ob_context;
typedef struct ob_device_t ob_device; typedef struct ob_device_t ob_device;
typedef struct ob_device_info_t ob_device_info; typedef struct ob_device_info_t ob_device_info;
typedef struct ob_device_list_t ob_device_list; typedef struct ob_device_list_t ob_device_list;
typedef struct ob_record_device_t ob_record_device; typedef struct ob_record_device_t ob_record_device;
typedef struct ob_playback_device_t ob_playback_device; typedef struct ob_playback_device_t ob_playback_device;
typedef struct ob_camera_param_list_t ob_camera_param_list; typedef struct ob_camera_param_list_t ob_camera_param_list;
typedef struct ob_sensor_t ob_sensor; typedef struct ob_sensor_t ob_sensor;
typedef struct ob_sensor_list_t ob_sensor_list; typedef struct ob_sensor_list_t ob_sensor_list;
typedef struct ob_stream_profile_t ob_stream_profile; typedef struct ob_stream_profile_t ob_stream_profile;
typedef struct ob_stream_profile_list_t ob_stream_profile_list; typedef struct ob_stream_profile_list_t ob_stream_profile_list;
typedef struct ob_frame_t ob_frame; typedef struct ob_frame_t ob_frame;
typedef struct ob_filter_t ob_filter; typedef struct ob_filter_t ob_filter;
typedef struct ob_filter_list_t ob_filter_list; typedef struct ob_filter_list_t ob_filter_list;
typedef struct ob_pipeline_t ob_pipeline; typedef struct ob_pipeline_t ob_pipeline;
typedef struct ob_config_t ob_config; typedef struct ob_config_t ob_config;
typedef struct ob_depth_work_mode_list_t ob_depth_work_mode_list; typedef struct ob_depth_work_mode_list_t ob_depth_work_mode_list;
typedef struct ob_device_preset_list_t ob_device_preset_list; typedef struct ob_device_preset_list_t ob_device_preset_list;
typedef struct ob_filter_config_schema_list_t ob_filter_config_schema_list; typedef struct ob_filter_config_schema_list_t ob_filter_config_schema_list;
typedef struct ob_device_frame_interleave_list_t ob_device_frame_interleave_list; typedef struct ob_device_frame_interleave_list_t ob_device_frame_interleave_list;
typedef struct ob_preset_resolution_config_list_t ob_preset_resolution_config_list; typedef struct ob_preset_resolution_config_list_t ob_preset_resolution_config_list;
#define OB_WIDTH_ANY 0 #define OB_WIDTH_ANY 0
@@ -126,17 +126,17 @@ typedef struct ob_error {
* @brief Enumeration value describing the sensor type * @brief Enumeration value describing the sensor type
*/ */
typedef enum { typedef enum {
OB_SENSOR_UNKNOWN = 0, /**< Unknown type sensor */ OB_SENSOR_UNKNOWN = 0, /**< Unknown type sensor */
OB_SENSOR_IR = 1, /**< IR */ OB_SENSOR_IR = 1, /**< IR */
OB_SENSOR_COLOR = 2, /**< Color */ OB_SENSOR_COLOR = 2, /**< Color */
OB_SENSOR_DEPTH = 3, /**< Depth */ OB_SENSOR_DEPTH = 3, /**< Depth */
OB_SENSOR_ACCEL = 4, /**< Accel */ OB_SENSOR_ACCEL = 4, /**< Accel */
OB_SENSOR_GYRO = 5, /**< Gyro */ OB_SENSOR_GYRO = 5, /**< Gyro */
OB_SENSOR_IR_LEFT = 6, /**< left IR for stereo camera*/ OB_SENSOR_IR_LEFT = 6, /**< left IR for stereo camera*/
OB_SENSOR_IR_RIGHT = 7, /**< Right IR for stereo camera*/ OB_SENSOR_IR_RIGHT = 7, /**< Right IR for stereo camera*/
OB_SENSOR_RAW_PHASE = 8, /**< Raw Phase */ OB_SENSOR_RAW_PHASE = 8, /**< Raw Phase */
OB_SENSOR_CONFIDENCE = 9,/**< Confidence */ OB_SENSOR_CONFIDENCE = 9, /**< Confidence */
OB_SENSOR_TYPE_COUNT, /**The total number of sensor types, is not a valid sensor type */ OB_SENSOR_TYPE_COUNT, /**The total number of sensor types, is not a valid sensor type */
} OBSensorType, } OBSensorType,
ob_sensor_type; ob_sensor_type;
@@ -144,18 +144,18 @@ typedef enum {
* @brief Enumeration value describing the type of data stream * @brief Enumeration value describing the type of data stream
*/ */
typedef enum { typedef enum {
OB_STREAM_UNKNOWN = -1, /**< Unknown type stream */ OB_STREAM_UNKNOWN = -1, /**< Unknown type stream */
OB_STREAM_VIDEO = 0, /**< Video stream (infrared, color, depth streams are all video streams) */ OB_STREAM_VIDEO = 0, /**< Video stream (infrared, color, depth streams are all video streams) */
OB_STREAM_IR = 1, /**< IR stream */ OB_STREAM_IR = 1, /**< IR stream */
OB_STREAM_COLOR = 2, /**< color stream */ OB_STREAM_COLOR = 2, /**< color stream */
OB_STREAM_DEPTH = 3, /**< depth stream */ OB_STREAM_DEPTH = 3, /**< depth stream */
OB_STREAM_ACCEL = 4, /**< Accelerometer data stream */ OB_STREAM_ACCEL = 4, /**< Accelerometer data stream */
OB_STREAM_GYRO = 5, /**< Gyroscope data stream */ OB_STREAM_GYRO = 5, /**< Gyroscope data stream */
OB_STREAM_IR_LEFT = 6, /**< Left IR stream for stereo camera */ OB_STREAM_IR_LEFT = 6, /**< Left IR stream for stereo camera */
OB_STREAM_IR_RIGHT = 7, /**< Right IR stream for stereo camera */ OB_STREAM_IR_RIGHT = 7, /**< Right IR stream for stereo camera */
OB_STREAM_RAW_PHASE = 8, /**< RawPhase Stream */ OB_STREAM_RAW_PHASE = 8, /**< RawPhase Stream */
OB_STREAM_CONFIDENCE = 9, /**< Confidence Stream*/ OB_STREAM_CONFIDENCE = 9, /**< Confidence Stream*/
OB_STREAM_TYPE_COUNT, /**< The total number of stream type,is not a valid stream type */ OB_STREAM_TYPE_COUNT, /**< The total number of stream type,is not a valid stream type */
} OBStreamType, } OBStreamType,
ob_stream_type; ob_stream_type;
@@ -163,20 +163,20 @@ typedef enum {
* @brief Enumeration value describing the type of frame * @brief Enumeration value describing the type of frame
*/ */
typedef enum { typedef enum {
OB_FRAME_UNKNOWN = -1, /**< Unknown frame type */ OB_FRAME_UNKNOWN = -1, /**< Unknown frame type */
OB_FRAME_VIDEO = 0, /**< Video frame */ OB_FRAME_VIDEO = 0, /**< Video frame */
OB_FRAME_IR = 1, /**< IR frame */ OB_FRAME_IR = 1, /**< IR frame */
OB_FRAME_COLOR = 2, /**< Color frame */ OB_FRAME_COLOR = 2, /**< Color frame */
OB_FRAME_DEPTH = 3, /**< Depth frame */ OB_FRAME_DEPTH = 3, /**< Depth frame */
OB_FRAME_ACCEL = 4, /**< Accelerometer data frame */ OB_FRAME_ACCEL = 4, /**< Accelerometer data frame */
OB_FRAME_SET = 5, /**< Frame collection (internally contains a variety of data frames) */ OB_FRAME_SET = 5, /**< Frame collection (internally contains a variety of data frames) */
OB_FRAME_POINTS = 6, /**< Point cloud frame */ OB_FRAME_POINTS = 6, /**< Point cloud frame */
OB_FRAME_GYRO = 7, /**< Gyroscope data frame */ OB_FRAME_GYRO = 7, /**< Gyroscope data frame */
OB_FRAME_IR_LEFT = 8, /**< Left IR frame for stereo camera */ OB_FRAME_IR_LEFT = 8, /**< Left IR frame for stereo camera */
OB_FRAME_IR_RIGHT = 9, /**< Right IR frame for stereo camera */ OB_FRAME_IR_RIGHT = 9, /**< Right IR frame for stereo camera */
OB_FRAME_RAW_PHASE = 10, /**< Raw Phase frame*/ OB_FRAME_RAW_PHASE = 10, /**< Raw Phase frame*/
OB_FRAME_CONFIDENCE = 11,/**< Confidence frame*/ OB_FRAME_CONFIDENCE = 11, /**< Confidence frame*/
OB_FRAME_TYPE_COUNT, /**< The total number of frame types, is not a valid frame type */ OB_FRAME_TYPE_COUNT, /**< The total number of frame types, is not a valid frame type */
} OBFrameType, } OBFrameType,
ob_frame_type; ob_frame_type;
@@ -1736,6 +1736,16 @@ typedef enum {
} ob_playback_status, } ob_playback_status,
OBPlaybackStatus; OBPlaybackStatus;
/**
* @brief Intra-camera Sync Reference based on the exposure start time, the exposure middle time, or the exposure end time.
*/
typedef enum {
START_OF_EXPOSURE = 0, /**< start of exposure */
MIDDLE_OF_EXPOSURE, /**< middle of exposure */
END_OF_EXPOSURE, /**< end of exposure */
} ob_intra_camera_sync_reference,
OBIntraCameraSyncReference;
// For compatibility // For compatibility
#define OB_FRAME_METADATA_TYPE_LASER_POWER_MODE OB_FRAME_METADATA_TYPE_LASER_POWER_LEVEL #define OB_FRAME_METADATA_TYPE_LASER_POWER_MODE OB_FRAME_METADATA_TYPE_LASER_POWER_LEVEL
#define OB_FRAME_METADATA_TYPE_EMITTER_MODE OB_FRAME_METADATA_TYPE_LASER_STATUS #define OB_FRAME_METADATA_TYPE_EMITTER_MODE OB_FRAME_METADATA_TYPE_LASER_STATUS
@@ -538,12 +538,18 @@ typedef enum {
/** /**
* @brief Confidence stream flip enable * @brief Confidence stream flip enable
*/ */
OB_PROP_CONFIDENCE_FLIP_BOOL = 230, OB_PROP_CONFIDENCE_FLIP_BOOL = 230,
/** /**
* @brief Confidence stream rotate angle{0, 90, 180, 270} * @brief Confidence stream rotate angle{0, 90, 180, 270}
*/ */
OB_PROP_CONFIDENCE_ROTATE_INT = 231, OB_PROP_CONFIDENCE_ROTATE_INT = 231,
/**
* @brief Intra-camera Sync Reference based on the exposure start time, the exposure middle time, or the exposure end time. the definition in @ref
* OBIntraCameraSyncReference
*/
OB_PROP_INTRA_CAMERA_SYNC_REFERENCE_INT = 236,
/** /**
* @brief Baseline calibration parameters * @brief Baseline calibration parameters
@@ -818,7 +818,7 @@ public:
*/ */
OBSpatialFastFilterParams getFilterParams() { OBSpatialFastFilterParams getFilterParams() {
OBSpatialFastFilterParams params{}; OBSpatialFastFilterParams params{};
params.radius = static_cast<uint8_t>(getConfigValue("radius")); params.radius = static_cast<uint8_t>(getConfigValue("radius"));
return params; return params;
} }
@@ -832,7 +832,6 @@ public:
} }
}; };
/** /**
* @brief The Spatial Moderate Filter utilizes an optimized average smoothing algorithm, * @brief The Spatial Moderate Filter utilizes an optimized average smoothing algorithm,
* to achieve a balance between processing speed and the quality of smoothing achieved. * to achieve a balance between processing speed and the quality of smoothing achieved.
@@ -872,7 +871,7 @@ public:
*/ */
OBIntPropertyRange getRadiusRange() { OBIntPropertyRange getRadiusRange() {
OBIntPropertyRange range{}; OBIntPropertyRange range{};
const auto & schemaVec = getConfigSchemaVec(); const auto &schemaVec = getConfigSchemaVec();
for(const auto &item: schemaVec) { for(const auto &item: schemaVec) {
if(strcmp(item.name, "radius") == 0) { if(strcmp(item.name, "radius") == 0) {
range = getPropertyRange<OBIntPropertyRange>(item, getConfigValue("radius")); range = getPropertyRange<OBIntPropertyRange>(item, getConfigValue("radius"));
@@ -924,7 +923,6 @@ public:
} }
}; };
/** /**
* @brief Hole filling filter,the processing performed depends on the selected hole filling mode. * @brief Hole filling filter,the processing performed depends on the selected hole filling mode.
*/ */
@@ -1157,24 +1155,33 @@ public:
}; };
/** /**
* @brief Define the Filter type map * @brief Returns the mapping of filter type names to their corresponding type_index.
*/ */
static const std::unordered_map<std::string, std::type_index> obFilterTypeMap = { inline const std::unordered_map<std::string, std::type_index> &getFilterTypeMap() {
{ "PointCloudFilter", typeid(PointCloudFilter) }, { "Align", typeid(Align) }, static const std::unordered_map<std::string, std::type_index> filterTypeMap = {
{ "FormatConverter", typeid(FormatConvertFilter) }, { "HDRMerge", typeid(HdrMerge) }, { "PointCloudFilter", typeid(PointCloudFilter) }, { "Align", typeid(Align) },
{ "SequenceIdFilter", typeid(SequenceIdFilter) }, { "DecimationFilter", typeid(DecimationFilter) }, { "FormatConverter", typeid(FormatConvertFilter) }, { "HDRMerge", typeid(HdrMerge) },
{ "ThresholdFilter", typeid(ThresholdFilter) }, { "SpatialAdvancedFilter", typeid(SpatialAdvancedFilter) }, { "SequenceIdFilter", typeid(SequenceIdFilter) }, { "DecimationFilter", typeid(DecimationFilter) },
{ "HoleFillingFilter", typeid(HoleFillingFilter) }, { "NoiseRemovalFilter", typeid(NoiseRemovalFilter) }, { "ThresholdFilter", typeid(ThresholdFilter) }, { "SpatialAdvancedFilter", typeid(SpatialAdvancedFilter) },
{ "TemporalFilter", typeid(TemporalFilter) }, { "DisparityTransform", typeid(DisparityTransform) } { "HoleFillingFilter", typeid(HoleFillingFilter) }, { "NoiseRemovalFilter", typeid(NoiseRemovalFilter) },
}; { "TemporalFilter", typeid(TemporalFilter) }, { "DisparityTransform", typeid(DisparityTransform) },
{ "SpatialFastFilter", typeid(SpatialFastFilter) }, { "SpatialModerateFilter", typeid(SpatialModerateFilter) },
};
return filterTypeMap;
}
/** /**
* @brief Define the is() template function for the Filter class * @brief Define the is() template function for the Filter class
*
* @note When adding a new filter class, ensure the filter type map
* (see getFilterTypeMap()) is updated accordingly to maintain correct type matching.
*/ */
template <typename T> bool Filter::is() { template <typename T> bool Filter::is() {
std::string name = type(); std::string name = type();
auto it = obFilterTypeMap.find(name);
if(it != obFilterTypeMap.end()) { const auto &filterTypeMap = getFilterTypeMap();
auto it = filterTypeMap.find(name);
if(it != filterTypeMap.end()) {
return std::type_index(typeid(T)) == it->second; return std::type_index(typeid(T)) == it->second;
} }
return false; return false;
@@ -8,12 +8,12 @@ set(CMAKE_IMPORT_FILE_VERSION 1)
# Import target "ob::OrbbecSDK" for configuration "Release" # Import target "ob::OrbbecSDK" for configuration "Release"
set_property(TARGET ob::OrbbecSDK APPEND PROPERTY IMPORTED_CONFIGURATIONS RELEASE) set_property(TARGET ob::OrbbecSDK APPEND PROPERTY IMPORTED_CONFIGURATIONS RELEASE)
set_target_properties(ob::OrbbecSDK PROPERTIES set_target_properties(ob::OrbbecSDK PROPERTIES
IMPORTED_LOCATION_RELEASE "${_IMPORT_PREFIX}/lib/libOrbbecSDK.so.2.4.11" IMPORTED_LOCATION_RELEASE "${_IMPORT_PREFIX}/lib/libOrbbecSDK.so.2.5.0"
IMPORTED_SONAME_RELEASE "libOrbbecSDK.so.2" IMPORTED_SONAME_RELEASE "libOrbbecSDK.so.2"
) )
list(APPEND _cmake_import_check_targets ob::OrbbecSDK ) list(APPEND _cmake_import_check_targets ob::OrbbecSDK )
list(APPEND _cmake_import_check_files_for_ob::OrbbecSDK "${_IMPORT_PREFIX}/lib/libOrbbecSDK.so.2.4.11" ) list(APPEND _cmake_import_check_files_for_ob::OrbbecSDK "${_IMPORT_PREFIX}/lib/libOrbbecSDK.so.2.5.0" )
# Commands beyond this point should not need to know the version. # Commands beyond this point should not need to know the version.
set(CMAKE_IMPORT_FILE_VERSION) set(CMAKE_IMPORT_FILE_VERSION)
@@ -1 +1 @@
libOrbbecSDK.so.2.4.11 libOrbbecSDK.so.2.5.0
@@ -8,12 +8,12 @@ set(CMAKE_IMPORT_FILE_VERSION 1)
# Import target "ob::OrbbecSDK" for configuration "Release" # Import target "ob::OrbbecSDK" for configuration "Release"
set_property(TARGET ob::OrbbecSDK APPEND PROPERTY IMPORTED_CONFIGURATIONS RELEASE) set_property(TARGET ob::OrbbecSDK APPEND PROPERTY IMPORTED_CONFIGURATIONS RELEASE)
set_target_properties(ob::OrbbecSDK PROPERTIES set_target_properties(ob::OrbbecSDK PROPERTIES
IMPORTED_LOCATION_RELEASE "${_IMPORT_PREFIX}/lib/libOrbbecSDK.so.2.4.11" IMPORTED_LOCATION_RELEASE "${_IMPORT_PREFIX}/lib/libOrbbecSDK.so.2.5.0"
IMPORTED_SONAME_RELEASE "libOrbbecSDK.so.2" IMPORTED_SONAME_RELEASE "libOrbbecSDK.so.2"
) )
list(APPEND _cmake_import_check_targets ob::OrbbecSDK ) list(APPEND _cmake_import_check_targets ob::OrbbecSDK )
list(APPEND _cmake_import_check_files_for_ob::OrbbecSDK "${_IMPORT_PREFIX}/lib/libOrbbecSDK.so.2.4.11" ) list(APPEND _cmake_import_check_files_for_ob::OrbbecSDK "${_IMPORT_PREFIX}/lib/libOrbbecSDK.so.2.5.0" )
# Commands beyond this point should not need to know the version. # Commands beyond this point should not need to know the version.
set(CMAKE_IMPORT_FILE_VERSION) set(CMAKE_IMPORT_FILE_VERSION)
+1 -1
View File
@@ -1 +1 @@
libOrbbecSDK.so.2.4.11 libOrbbecSDK.so.2.5.0
+77 -1
View File
@@ -1424,6 +1424,82 @@
<Format>Y8</Format> <Format>Y8</Format>
</RightIR> </RightIR>
</Gemini336L> </Gemini336L>
<!-- Gemini2R config -->
<Gemini338>
<!-- Default backend for Linux UVC devices. If the LinuxUVCBackend is set to "Auto,"
this item will determine the device's speciality. Optional values: V4L2, LibUVC -->
<LinuxUVCDefaultBackend>LibUVC</LinuxUVCDefaultBackend>
<Misc>
<GlobalTimestampFitterEnable>true</GlobalTimestampFitterEnable>
<!-- Global timestamp fitter refresh interval, unit: milliseconds, default value: 1000,
minimum value: 100, it is recommended not to be greater than 1000 -->
<GlobalTimestampFitterInterval>1000</GlobalTimestampFitterInterval>
<!-- Global timestamp fitter queue size, default value: 100, minimum value: 20 -->
<GlobalTimestampFitterQueueSize>100</GlobalTimestampFitterQueueSize>
</Misc>
<DepthPostProcessing>
<HardwareNoiseRemoveFilter>false</HardwareNoiseRemoveFilter>
<SoftwareNoiseRemoveFilter>true</SoftwareNoiseRemoveFilter>
</DepthPostProcessing>
<!-- Whether to enable heartbeat by default -->
<DefaultHeartBeat>0</DefaultHeartBeat>
<!-- Whether to enable firmware upgrade foolproof by default, only internal version
supports -->
<FirmwareUpgradeFoolproof>1</FirmwareUpgradeFoolproof>
<!-- Depth Filter Params -->
<!--
<DepthFilterDDOConfig>./Gemini2_v1.0.json</DepthFilterDDOConfig>
-->
<Depth>
<!-- The resolution width is enabled by default, int type -->
<Width>848</Width>
<!-- High resolution is enabled by default, int type -->
<Height>480</Height>
<!-- The frame rate of the resolution enabled by default, int type -->
<FPS>30</FPS>
<Format>Y16</Format>
</Depth>
<Color>
<!-- The resolution width is enabled by default, int type -->
<Width>1280</Width>
<!-- High resolution is enabled by default, int type -->
<Height>720</Height>
<!-- The frame rate of the resolution enabled by default, int type -->
<FPS>30</FPS>
<Format>MJPG</Format>
</Color>
<IR>
<!-- The resolution width is enabled by default, int type -->
<Width>848</Width>
<!-- High resolution is enabled by default, int type -->
<Height>480</Height>
<!-- The frame rate of the resolution enabled by default, int type -->
<FPS>30</FPS>
<Format>Y8</Format>
</IR>
<LeftIR>
<!-- The resolution width is enabled by default, int type -->
<Width>848</Width>
<!-- High resolution is enabled by default, int type -->
<Height>480</Height>
<!-- The frame rate of the resolution enabled by default, int type -->
<FPS>30</FPS>
<Format>Y8</Format>
</LeftIR>
<RightIR>
<!-- The resolution width is enabled by default, int type -->
<Width>848</Width>
<!-- High resolution is enabled by default, int type -->
<Height>480</Height>
<!-- The frame rate of the resolution enabled by default, int type -->
<FPS>30</FPS>
<Format>Y8</Format>
</RightIR>
</Gemini338>
<!--DaBaiA config--> <!--DaBaiA config-->
<DaBaiA> <DaBaiA>
@@ -2689,4 +2765,4 @@
</Color> </Color>
</GeminiEW> </GeminiEW>
</Device> </Device>
</Config> </Config>
@@ -584,7 +584,6 @@ class OBCameraNode {
int depth_brightness_ = -1; int depth_brightness_ = -1;
int depth_exposure_ = -1; int depth_exposure_ = -1;
int depth_gain_ = -1; int depth_gain_ = -1;
int mean_intensity_set_point_ = -1;
int ir_exposure_ = -1; int ir_exposure_ = -1;
int ir_gain_ = -1; int ir_gain_ = -1;
int ir_ae_max_exposure_ = -1; int ir_ae_max_exposure_ = -1;