update OrbbecSDK version to 2.9.1

This commit is contained in:
ob-yalian
2026-06-25 16:08:20 +08:00
parent 58e1a1f8cf
commit 1ce0cafee8
20 changed files with 169 additions and 12 deletions
@@ -342,6 +342,74 @@ OB_EXPORT OBPresetResolutionConfig ob_device_preset_resolution_config_list_get_i
*/
OB_EXPORT void ob_delete_preset_resolution_config_list(ob_preset_resolution_config_list *ob_preset_resolution_config_list, ob_error **error);
/**
* @brief Check if the device supports color preset.
*
* @param[in] device The device object.
* @param[out] error Pointer to an error object that will be set if an error occurs.
*
* @return bool Returns true if the device supports color preset.
*/
OB_EXPORT bool ob_device_is_color_preset_supported(const ob_device *device, ob_error **error);
/**
* @brief Get the current color preset name.
*
* @param[in] device The device object.
* @param[out] error Pointer to an error object that will be set if an error occurs.
*
* @return const char* The current color preset name.
*/
OB_EXPORT const char *ob_device_get_current_color_preset_name(const ob_device *device, ob_error **error);
/**
* @brief Switch the color preset by name.
*
* @param[in] device The device object.
* @param[in] preset_name The color preset name.
* @param[out] error Pointer to an error object that will be set if an error occurs.
*/
OB_EXPORT void ob_device_switch_color_preset(ob_device *device, const char *preset_name, ob_error **error);
/**
* @brief Get the available color preset list.
*
* @param[in] device The device object.
* @param[out] error Pointer to an error object that will be set if an error occurs.
*
* @return ob_color_preset_list* The color preset list.
*/
OB_EXPORT ob_color_preset_list *ob_device_get_color_preset_list(const ob_device *device, ob_error **error);
/**
* @brief Get the number of color preset in the list.
*
* @param[in] list The color preset list.
* @param[out] error Pointer to an error object that will be set if an error occurs.
*
* @return uint32_t The number of color preset in the list.
*/
OB_EXPORT uint32_t ob_color_preset_list_get_count(const ob_color_preset_list *list, ob_error **error);
/**
* @brief Get the name of color preset at the specified index.
*
* @param[in] list The color preset list.
* @param[in] index The index of the color preset.
* @param[out] error Pointer to an error object that will be set if an error occurs.
*
* @return const char* The name of the color preset.
*/
OB_EXPORT const char *ob_color_preset_list_get_name(const ob_color_preset_list *list, uint32_t index, ob_error **error);
/**
* @brief Delete the color preset list.
*
* @param[in] list The color preset list.
* @param[out] error Pointer to an error object that will be set if an error occurs.
*/
OB_EXPORT void ob_delete_color_preset_list(ob_color_preset_list *list, ob_error **error);
// The following interfaces are deprecated and are retained here for compatibility purposes.
#define ob_depth_work_mode_list_count ob_depth_work_mode_list_get_count
#define ob_device_preset_list_count ob_device_preset_list_get_count
@@ -41,6 +41,7 @@ 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_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_color_preset_list_t ob_color_preset_list;
#define OB_WIDTH_ANY 0
#define OB_HEIGHT_ANY 0
@@ -99,6 +99,16 @@ typedef enum {
*/
OB_PROP_DEPTH_NOISE_REMOVAL_FILTER_BOOL = 24,
/**
* @brief Depth outliers filter switch
*/
OB_PROP_DEPTH_OUTLIERS_FILTER_BOOL = 25,
/**
* @brief Depth outliers filter search range mode
*/
OB_PROP_DEPTH_OUTLIERS_FILTER_SEARCH_MODE_INT = 26,
/**
* @brief LDP status
*/
@@ -27,6 +27,7 @@ namespace ob {
class DeviceInfo;
class SensorList;
class DevicePresetList;
class ColorPresetList;
class OBDepthWorkModeList;
class CameraParamList;
class DeviceFrameInterleaveList;
@@ -511,6 +512,53 @@ public:
return std::make_shared<OBDepthWorkModeList>(list);
}
/**
* @brief Check if the device supports color preset.
*
* @return bool Returns true if the device supports color preset.
*/
bool isColorPresetSupported() const {
ob_error *error = nullptr;
auto result = ob_device_is_color_preset_supported(impl_, &error);
Error::handle(&error);
return result;
}
/**
* @brief Get the current color preset name.
*
* @return const char* The current color preset name.
*/
const char *getCurrentColorPresetName() const {
ob_error *error = nullptr;
const char *name = ob_device_get_current_color_preset_name(impl_, &error);
Error::handle(&error);
return name;
}
/**
* @brief Switch the color preset by name.
*
* @param[in] presetName The color preset name.
*/
void switchColorPreset(const char *presetName) const {
ob_error *error = nullptr;
ob_device_switch_color_preset(impl_, presetName, &error);
Error::handle(&error);
}
/**
* @brief Get the available color preset list.
*
* @return std::shared_ptr<ColorPresetList> The color preset list.
*/
std::shared_ptr<ColorPresetList> getColorPresetList() const {
ob_error *error = nullptr;
auto list = ob_device_get_color_preset_list(impl_, &error);
Error::handle(&error);
return std::make_shared<ColorPresetList>(list);
}
/**
* @brief Device restart
* @attention The device will be disconnected and reconnected. After the device is disconnected, the access to the Device object interface may be abnormal.
@@ -1654,6 +1702,36 @@ public:
}
};
/**
* @brief Class representing a list of color presets
*/
class ColorPresetList {
private:
ob_color_preset_list *impl_ = nullptr;
public:
explicit ColorPresetList(ob_color_preset_list *impl) : impl_(impl) {}
~ColorPresetList() noexcept {
ob_error *error = nullptr;
ob_delete_color_preset_list(impl_, &error);
Error::handle(&error, false);
}
uint32_t getCount() const {
ob_error *error = nullptr;
auto count = ob_color_preset_list_get_count(impl_, &error);
Error::handle(&error);
return count;
}
const char *getName(uint32_t index) const {
ob_error *error = nullptr;
const char *name = ob_color_preset_list_get_name(impl_, index, &error);
Error::handle(&error);
return name;
}
};
/**
* @brief Class representing a list of camera parameters
*/
@@ -8,12 +8,12 @@ set(CMAKE_IMPORT_FILE_VERSION 1)
# Import target "ob::OrbbecSDK" for configuration "Release"
set_property(TARGET ob::OrbbecSDK APPEND PROPERTY IMPORTED_CONFIGURATIONS RELEASE)
set_target_properties(ob::OrbbecSDK PROPERTIES
IMPORTED_LOCATION_RELEASE "${_IMPORT_PREFIX}/lib/libOrbbecSDK.so.2.9.0"
IMPORTED_LOCATION_RELEASE "${_IMPORT_PREFIX}/lib/libOrbbecSDK.so.2.9.1"
IMPORTED_SONAME_RELEASE "libOrbbecSDK.so.2"
)
list(APPEND _cmake_import_check_targets ob::OrbbecSDK )
list(APPEND _cmake_import_check_files_for_ob::OrbbecSDK "${_IMPORT_PREFIX}/lib/libOrbbecSDK.so.2.9.0" )
list(APPEND _cmake_import_check_files_for_ob::OrbbecSDK "${_IMPORT_PREFIX}/lib/libOrbbecSDK.so.2.9.1" )
# Commands beyond this point should not need to know the version.
set(CMAKE_IMPORT_FILE_VERSION)
@@ -9,19 +9,19 @@
# The variable CVF_VERSION must be set before calling configure_file().
set(PACKAGE_VERSION "2.9.0")
set(PACKAGE_VERSION "2.9.1")
if(PACKAGE_VERSION VERSION_LESS PACKAGE_FIND_VERSION)
set(PACKAGE_VERSION_COMPATIBLE FALSE)
else()
if("2.9.0" MATCHES "^([0-9]+)\\.")
if("2.9.1" MATCHES "^([0-9]+)\\.")
set(CVF_VERSION_MAJOR "${CMAKE_MATCH_1}")
if(NOT CVF_VERSION_MAJOR VERSION_EQUAL 0)
string(REGEX REPLACE "^0+" "" CVF_VERSION_MAJOR "${CVF_VERSION_MAJOR}")
endif()
else()
set(CVF_VERSION_MAJOR "2.9.0")
set(CVF_VERSION_MAJOR "2.9.1")
endif()
if(PACKAGE_FIND_VERSION_RANGE)
@@ -1 +1 @@
libOrbbecSDK.so.2.9.0
libOrbbecSDK.so.2.9.1
@@ -8,12 +8,12 @@ set(CMAKE_IMPORT_FILE_VERSION 1)
# Import target "ob::OrbbecSDK" for configuration "Release"
set_property(TARGET ob::OrbbecSDK APPEND PROPERTY IMPORTED_CONFIGURATIONS RELEASE)
set_target_properties(ob::OrbbecSDK PROPERTIES
IMPORTED_LOCATION_RELEASE "${_IMPORT_PREFIX}/lib/libOrbbecSDK.so.2.9.0"
IMPORTED_LOCATION_RELEASE "${_IMPORT_PREFIX}/lib/libOrbbecSDK.so.2.9.1"
IMPORTED_SONAME_RELEASE "libOrbbecSDK.so.2"
)
list(APPEND _cmake_import_check_targets ob::OrbbecSDK )
list(APPEND _cmake_import_check_files_for_ob::OrbbecSDK "${_IMPORT_PREFIX}/lib/libOrbbecSDK.so.2.9.0" )
list(APPEND _cmake_import_check_files_for_ob::OrbbecSDK "${_IMPORT_PREFIX}/lib/libOrbbecSDK.so.2.9.1" )
# Commands beyond this point should not need to know the version.
set(CMAKE_IMPORT_FILE_VERSION)
@@ -9,19 +9,19 @@
# The variable CVF_VERSION must be set before calling configure_file().
set(PACKAGE_VERSION "2.9.0")
set(PACKAGE_VERSION "2.9.1")
if(PACKAGE_VERSION VERSION_LESS PACKAGE_FIND_VERSION)
set(PACKAGE_VERSION_COMPATIBLE FALSE)
else()
if("2.9.0" MATCHES "^([0-9]+)\\.")
if("2.9.1" MATCHES "^([0-9]+)\\.")
set(CVF_VERSION_MAJOR "${CMAKE_MATCH_1}")
if(NOT CVF_VERSION_MAJOR VERSION_EQUAL 0)
string(REGEX REPLACE "^0+" "" CVF_VERSION_MAJOR "${CVF_VERSION_MAJOR}")
endif()
else()
set(CVF_VERSION_MAJOR "2.9.0")
set(CVF_VERSION_MAJOR "2.9.1")
endif()
if(PACKAGE_FIND_VERSION_RANGE)
+1 -1
View File
@@ -1 +1 @@
libOrbbecSDK.so.2.9.0
libOrbbecSDK.so.2.9.1