Skip to content

Commit

Permalink
Update SDK sdk to v1.10.16
Browse files Browse the repository at this point in the history
  • Loading branch information
jian-dong committed Nov 5, 2024
1 parent 9d65c81 commit f9a4a36
Show file tree
Hide file tree
Showing 26 changed files with 228 additions and 16 deletions.
19 changes: 19 additions & 0 deletions sdk/include/libobsensor/h/Context.h
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,25 @@ void ob_load_license(const char *filePath, const char *key, ob_error **error);
*/
void ob_load_license_from_data(const char *data, uint32_t dataLen, const char *key, ob_error **error);

/**
* @brief Set the UVC backend for the specified context
* This function configures the Universal Video Class (UVC) backend for the given context, allowing the selection of a specific backend for
* video capture operations.
*
* @attention This function is only supported on Linux (ARM) platforms.
* Some devices, like the Dabai series, do not support V4L2. Therefore, the default backend is LIBUVC. Ensure that the device
* supports V4L2 before setting it as the backend.
*
* @param[in] context Pointer to the context object
* @param[in] uvc_backend Specifies the UVC backend to use:
* - `UVC_BACKEND_AUTO`: Automatically selects between
* V4L2 or libuvc based on metadata support.
* - `UVC_BACKEND_LIBUVC`: Forces the use of libuvc.
* - `UVC_BACKEND_V4L2`: Forces the use of V4L2.
* @param[out] error Pointer to an error object that will be populated if an error occurs.
*/
void ob_set_uvc_backend(ob_context *context, ob_uvc_backend uvc_backend, ob_error **error);

#ifdef __cplusplus
}
#endif
83 changes: 82 additions & 1 deletion sdk/include/libobsensor/h/Filter.h
Original file line number Diff line number Diff line change
Expand Up @@ -248,12 +248,93 @@ ob_spatial_advanced_filter_params ob_spatial_advanced_filter_get_filter_params(o
/**
* @brief Set the spatial advanced filter params.
*
* @param[in] filter A temporal_filter object.
* @param[in] filter A spatial advanced filter object.
* @param[in] params ob_spatial_advanced_filter_params.
* @param[out] error Log error messages.
*/
void ob_spatial_advanced_filter_set_filter_params(ob_filter *filter, ob_spatial_advanced_filter_params params, ob_error **error);

/**
* @brief Create a spatial fast filter.
* @param[out] error Log error messages.
* @return A depth_filter object.
*/
ob_filter *ob_create_spatial_fast_filter(ob_error **error);

/**
* @brief Get the spatial fast filter window size range.
*
* @param[in] filter A spatial fast filter object.
* @param[out] error Log error messages.
* @return ob_uint8_property_range the filter window size value of property range.
*/
ob_uint8_property_range ob_spatial_fast_filter_get_size_range(ob_filter *filter, ob_error **error);

/**
* @brief Set the spatial fast filter params.
*
* @param[in] filter A spatial fast filter object.
* @param[in] params ob_spatial_fast_filter_params.
* @param[out] error Log error messages.
*/
void ob_spatial_fast_filter_set_filter_params(ob_filter *filter, ob_spatial_fast_filter_params params, ob_error **error);

/**
* @brief Get the spatial fast filter params.
*
* @param[in] filter A spatial fast filter object.
* @param[out] error Log error messages.
* @return ob_spatial_fast_filter_params.
*/
ob_spatial_fast_filter_params ob_spatial_fast_filter_get_filter_params(ob_filter *filter, ob_error **error);

/**
* @brief Create a spatial moderate filter.
* @param[out] error Log error messages.
* @return A depth_filter object.
*/
ob_filter *ob_create_spatial_moderate_filter(ob_error **error);
/**
* @brief Get the spatial moderate filter disp diff range.
*
* @param[in] filter A spatial moderate filter object.
* @param[out] error Log error messages.
* @return ob_uint16_property_range the dispdiff value of property range.
*/
ob_uint16_property_range ob_spatial_moderate_filter_get_disp_diff_range(ob_filter *filter, ob_error **error);
/**
* @brief Get the spatial moderate filter magnitude range.
*
* @param[in] filter A spatial moderate filter object.
* @param[out] error Log error messages.
* @return ob_uint8_property_range the magnitude value of property range.
*/
ob_uint8_property_range ob_spatial_moderate_filter_get_magnitude_range(ob_filter *filter, ob_error **error);
/**
* @brief Get the spatial moderate filter window size range.
*
* @param[in] filter A spatial moderate filter object.
* @param[out] error Log error messages.
* @return ob_uint8_property_range the filter window size value of property range.
*/
ob_uint8_property_range ob_spatial_moderate_filter_get_size_range(ob_filter *filter, ob_error **error);
/**
* @brief Get the spatial moderate filter params.
*
* @param[in] filter A spatial moderate filter object.
* @param[out] error Log error messages.
* @return ob_spatial_moderate_filter_params.
*/
ob_spatial_moderate_filter_params ob_spatial_moderate_filter_get_filter_params(ob_filter *filter, ob_error **error);
/**
* @brief Set the spatial moderate filter params.
*
* @param[in] filter A spatial moderate filter object.
* @param[in] params ob_spatial_moderate_filter_params.
* @param[out] error Log error messages.
*/
void ob_spatial_moderate_filter_set_filter_params(ob_filter *filter, ob_spatial_moderate_filter_params params, ob_error **error);

/**
* @brief Create a noise removal filter.
* @param[out] error Log error messages.
Expand Down
31 changes: 25 additions & 6 deletions sdk/include/libobsensor/h/ObTypes.h
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,7 @@ typedef enum {
OB_FRAME_IR_LEFT = 8, /**< Left IR frame */
OB_FRAME_IR_RIGHT = 9, /**< Right IR frame */
OB_FRAME_RAW_PHASE = 10, /**< Rawphase frame*/
OB_FRAME_TYPE_COUNT, /**< The total number of frame types, is not a valid frame type */
} OBFrameType,
ob_frame_type;

Expand Down Expand Up @@ -973,6 +974,18 @@ typedef struct {
uint16_t radius; // hole_fill
} OBSpatialAdvancedFilterParams, ob_spatial_advanced_filter_params;


typedef struct {
uint8_t size; //median filter window size
} OBSpatialFastFilterParams, ob_spatial_fast_filter_params;


typedef struct {
uint8_t size ;
uint8_t magnitude ; // magnitude
uint16_t disp_diff ;
} OBSpatialModerateFilterParams, ob_spatial_moderate_filter_params;

typedef enum OB_EDGE_NOISE_REMOVAL_TYPE {
OB_MG_FILTER = 0,
OB_MGH_FILTER = 1, // horizontal MG
Expand Down Expand Up @@ -1440,13 +1453,19 @@ typedef struct {
int16_t y1_bottom;
} AE_ROI, ob_region_of_interest, OBRegionOfInterest;

typedef struct {
uint8_t enable;
uint8_t offset0;
uint8_t offset1;
uint8_t reserved;
} DISP_OFFSET_CONFIG, ob_disp_offset_config, OBDispOffsetConfig;

typedef struct{
uint8_t enable;
uint8_t offset0;
uint8_t offset1;
uint8_t reserved;
}DISP_OFFSET_CONFIG,ob_disp_offset_config,OBDispOffsetConfig;
typedef enum {
UVC_BACKEND_AUTO = 0,
UVC_BACKEND_LIBUVC = 1,
UVC_BACKEND_V4L2 = 2,
} UVC_BACKEND,
ob_uvc_backend, OBUvcBackend;

/**
* @brief Frame metadata types
Expand Down
17 changes: 17 additions & 0 deletions sdk/include/libobsensor/hpp/Context.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -143,5 +143,22 @@ class OB_EXTENSION_API Context {
* @param key The decryption key.
*/
static void loadLicenseFromData(const char *data, uint32_t dataLen, const char *key = OB_DEFAULT_DECRYPT_KEY);

/**
* @brief Set the UVC backend for the specified context
* This function configures the Universal Video Class (UVC) backend for the given context, allowing the selection of a specific backend for
* video capture operations.
*
* @attention This function is only supported on Linux (ARM) platforms.
* Some devices, like the Dabai series, do not support V4L2. Therefore, the default backend is LIBUVC. Ensure that the device
* supports V4L2 before setting it as the backend.
*
* @param[in] uvcBackend Specifies the UVC backend to use:
* - `UVC_BACKEND_AUTO`: Automatically selects between
* V4L2 or libuvc based on metadata support.
* - `UVC_BACKEND_LIBUVC`: Forces the use of libuvc.
* - `UVC_BACKEND_V4L2`: Forces the use of V4L2.
*/
void setUVCBackend(OBUvcBackend uvcBackend);
};
} // namespace ob
84 changes: 80 additions & 4 deletions sdk/include/libobsensor/hpp/Filter.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ class OB_EXTENSION_API TemporalFilter : public Filter {
};

/**
* @brief Spatial advanced filte smooths the image by calculating frame with alpha and delta settings
* @brief Spatial advanced filter smooths the image by calculating frame with alpha and delta settings
* alpha defines the weight of the current pixel for smoothing,
* delta defines the depth gradient below which the smoothing will occur as number of depth levels.
*/
Expand All @@ -276,21 +276,21 @@ class OB_EXTENSION_API SpatialAdvancedFilter : public Filter {
/**
* @brief Get the spatial advanced filter dispdiff range.
*
* @return OBFloatPropertyRange the dispdiff value of property range.
* @return OBUint16PropertyRange the dispdiff value of property range.
*/
OBUint16PropertyRange getDispDiffRange();

/**
* @brief Get the spatial advanced filter radius range.
*
* @return OBFloatPropertyRange the radius value of property range.
* @return OBUint16PropertyRange the radius value of property range.
*/
OBUint16PropertyRange getRadiusRange();

/**
* @brief Get the spatial advanced filter magnitude range.
*
* @return OBFloatPropertyRange the magnitude value of property range.
* @return OBIntPropertyRange the magnitude value of property range.
*/
OBIntPropertyRange getMagnitudeRange();

Expand All @@ -310,6 +310,73 @@ class OB_EXTENSION_API SpatialAdvancedFilter : public Filter {
};

/**
* @brief Spatial fast filter smooths the image by calculating frame with filter window size settings
*/
class OB_EXTENSION_API SpatialFastFilter : public Filter {
public:
SpatialFastFilter();
/**
* @brief Get the spatial fast filter window size range
*
* @return OBUint8PropertyRange the windows size value of property range.
*/
OBUint8PropertyRange getSizeRange();

/**
* @brief Get the spatial fast filter params.
*
* @return OBSpatialFastFilterParams
*/
OBSpatialFastFilterParams getFilterParams();
/**
* @brief Set the spatial fast filter params.
*
* @param params OBSpatialFastFilterParams.
*/
void setFilterParams(OBSpatialFastFilterParams params);
};

/**
* @brief Spatial moderate filter smooths the image by calculating frame with filter window size,magnitude and disp diff settings
*/
class OB_EXTENSION_API SpatialModerateFilter : public Filter {
public:
SpatialModerateFilter();
/**
* @brief Get the spatial moderate filter window size range
*
* @return OBUint8PropertyRange the windows size value of property range.
*/
OBUint8PropertyRange getSizeRange();

/**
* @brief Get the spatial moderate filter magnitude range.
*
* @return OBUint8PropertyRange the magnitude value of property range.
*/
OBUint8PropertyRange getMagnitudeRange();
/**
* @brief Get the spatial moderate filter dispdiff range.
*
* @return OBUint16PropertyRange the dispdiff value of property range.
*/
OBUint16PropertyRange getDispDiffRange();

/**
* @brief Get the spatial moderate filter params.
*
* @return OBSpatialModerateFilterParams
*/
OBSpatialModerateFilterParams getFilterParams();
/**
* @brief Set the spatial moderate filter params.
*
* @param params OBSpatialModerateFilterParams.
*/
void setFilterParams(OBSpatialModerateFilterParams params);
};

/**
* @brief Depth to disparity or disparity to depth
*/
class OB_EXTENSION_API DisparityTransform : public Filter {
Expand Down Expand Up @@ -542,6 +609,15 @@ template <typename T> bool Filter::is() {
if(name == "SpatialAdvancedFilter") {
return typeid(T) == typeid(SpatialAdvancedFilter);
}

if(name == "SpatialFastFilter") {
return typeid(T) == typeid(SpatialFastFilter);
}

if(name == "SpatialModerateFilter") {
return typeid(T) == typeid(SpatialModerateFilter);
}

if(name == "TemporalFilter") {
return typeid(T) == typeid(TemporalFilter);
}
Expand Down
2 changes: 1 addition & 1 deletion sdk/lib/arm32/libOrbbecSDK.so.1.10
Binary file not shown.
2 changes: 1 addition & 1 deletion sdk/lib/arm64/libOrbbecSDK.so.1.10
Binary file not shown.
Binary file modified sdk/lib/arm64/liblive555.so
Binary file not shown.
2 changes: 1 addition & 1 deletion sdk/lib/linux_x64/libOrbbecSDK.so.1.10
Binary file not shown.
Binary file modified sdk/lib/linux_x64/liblive555.so
Binary file not shown.
Binary file not shown.
2 changes: 1 addition & 1 deletion sdk/lib/macOS/libOrbbecSDK.1.10.dylib
2 changes: 1 addition & 1 deletion sdk/lib/macOS/libOrbbecSDK.dylib
Binary file modified sdk/lib/macOS/liblive555.dylib
Binary file not shown.
Binary file modified sdk/lib/macOS/libob_usb.dylib
Binary file not shown.
Binary file modified sdk/lib/win_x64/OrbbecSDK.dll
Binary file not shown.
Binary file modified sdk/lib/win_x64/OrbbecSDK.lib
Binary file not shown.
Binary file modified sdk/lib/win_x64/live555.dll
Binary file not shown.
Binary file modified sdk/lib/win_x64/ob_usb.dll
Binary file not shown.
Binary file modified sdk/lib/win_x86/OrbbecSDK.dll
Binary file not shown.
Binary file modified sdk/lib/win_x86/OrbbecSDK.lib
Binary file not shown.
Binary file modified sdk/lib/win_x86/live555.dll
Binary file not shown.
Binary file modified sdk/lib/win_x86/ob_usb.dll
Binary file not shown.

0 comments on commit f9a4a36

Please sign in to comment.