diff --git a/orbbec_camera/SDK/include/libobsensor/h/Filter.h b/orbbec_camera/SDK/include/libobsensor/h/Filter.h index 030816d7..8705b1a6 100644 --- a/orbbec_camera/SDK/include/libobsensor/h/Filter.h +++ b/orbbec_camera/SDK/include/libobsensor/h/Filter.h @@ -297,6 +297,69 @@ void ob_noise_removal_filter_set_filter_params(ob_filter *filter, ob_noise_remov */ ob_noise_removal_filter_params ob_noise_removal_filter_get_filter_params(ob_filter *filter, ob_error **error); +/** + * @brief Create a edge noise removal filter. + * @param[out] error Log error messages. + * @return A depth_filter object. + */ +ob_filter *ob_create_edge_noise_removal_filter(ob_error **error); + +/** + * @brief Set the edge noise removal filter params. + * + * @param[in] filter edge noise removal filter object. + * @param[in] params ob_edge_noise_removal_filter_params. + * @param[out] error Log error messages. + */ +void ob_edge_noise_removal_filter_set_filter_params(ob_filter *filter, ob_edge_noise_removal_filter_params params, ob_error **error); + +/** + * @brief Get the edge noise removal filter params. + * + * @param[in] filter edge noise removal filter object. + * @param[out] error Log error messages. + * @return ob_edge_noise_removal_filter_params. + */ +ob_edge_noise_removal_filter_params ob_edge_noise_removal_filter_get_filter_params(ob_filter *filter, ob_error **error); + + +/** + * @brief Get the noise removal filter margin left th range. + * + * @param[in] filter A edge noise removal filter object. + * @param[out] error Log error messages. + * @return ob_uint16_property_range the margin_left_th value of property range. + */ +ob_uint16_property_range ob_edge_noise_removal_filter_get_margin_left_th_range(ob_filter *filter, ob_error **error); + +/** + * @brief Get the noise removal filter margin right th range. + * + * @param[in] filter A edge noise removal filter object. + * @param[out] error Log error messages. + * @return ob_uint16_property_range the margin_right_th value of property range. + */ +ob_uint16_property_range ob_edge_noise_removal_filter_get_margin_right_th_range(ob_filter *filter, ob_error **error); + +/** + * @brief Get the noise removal filter margin top th range. + * + * @param[in] filter A edge noise removal filter object. + * @param[out] error Log error messages. + * @return ob_uint16_property_range the margin_top_th value of property range. + */ +ob_uint16_property_range ob_edge_noise_removal_filter_get_margin_top_th_range(ob_filter *filter, ob_error **error); + +/** + * @brief Get the noise removal filter margin bottom th range. + * + * @param[in] filter A edge noise removal filter object. + * @param[out] error Log error messages. + * @return ob_uint16_property_range the margin_bottom_th value of property range. + */ +ob_uint16_property_range ob_edge_noise_removal_filter_get_margin_bottom_th_range(ob_filter *filter, ob_error **error); + + /** * @brief Create a decimation filter. * @param[out] error Log error messages. diff --git a/orbbec_camera/SDK/include/libobsensor/h/Frame.h b/orbbec_camera/SDK/include/libobsensor/h/Frame.h index 43a2e7d2..c4eec8f9 100644 --- a/orbbec_camera/SDK/include/libobsensor/h/Frame.h +++ b/orbbec_camera/SDK/include/libobsensor/h/Frame.h @@ -68,6 +68,16 @@ uint64_t ob_frame_time_stamp_us(ob_frame *frame, ob_error **error); */ uint64_t ob_frame_system_time_stamp(ob_frame *frame, ob_error **error); +/** + * @brief Get the system timestamp of the frame in microseconds. + * @brief The system timestamp is the time point when the frame was received by the host, on host clock domain. + * + * @param[in] frame Frame object + * @param[out] error Log error messages + * @return uint64_t return the frame system timestamp in microseconds + */ +uint64_t ob_frame_system_time_stamp_us(ob_frame *frame, ob_error **error); + /** * @brief Get the global timestamp of the frame in microseconds. * @brief The global timestamp is the time point when the frame was was captured by the device, and has been converted to the host clock domain. The diff --git a/orbbec_camera/SDK/include/libobsensor/h/ObTypes.h b/orbbec_camera/SDK/include/libobsensor/h/ObTypes.h index 2bccdd23..7a5f1ce2 100644 --- a/orbbec_camera/SDK/include/libobsensor/h/ObTypes.h +++ b/orbbec_camera/SDK/include/libobsensor/h/ObTypes.h @@ -965,6 +965,22 @@ typedef struct { uint16_t radius; // hole_fill } OBSpatialAdvancedFilterParams, ob_spatial_advanced_filter_params; +typedef enum OB_EDGE_NOISE_REMOVAL_TYPE { + OB_MG_FILTER = 0, + OB_MGH_FILTER = 1, // horizontal MG + OB_MGA_FILTER = 2, // asym MG + OB_MGC_FILTER = 3, +} OBEdgeNoiseRemovalType, + ob_edge_noise_removal_type; + +typedef struct { + OBEdgeNoiseRemovalType type; + uint16_t marginLeftTh; + uint16_t marginRightTh; + uint16_t marginTopTh; + uint16_t marginBottomTh; +} OBEdgeNoiseRemovalFilterParams, ob_edge_noise_removal_filter_params; + /** * @brief 去噪方式 */ diff --git a/orbbec_camera/SDK/include/libobsensor/h/Property.h b/orbbec_camera/SDK/include/libobsensor/h/Property.h index cdffd75e..9f6cab5b 100644 --- a/orbbec_camera/SDK/include/libobsensor/h/Property.h +++ b/orbbec_camera/SDK/include/libobsensor/h/Property.h @@ -651,6 +651,11 @@ typedef enum { */ OB_PROP_HDR_MERGE_BOOL = 2037, + /** + * @brief Color camera FOCUS + */ + OB_PROP_COLOR_FOCUS_INT = 2038, + /** * @brief Software disparity to depth */ diff --git a/orbbec_camera/SDK/include/libobsensor/h/Utils.h b/orbbec_camera/SDK/include/libobsensor/h/Utils.h index 702dfa5d..b0dc071c 100644 --- a/orbbec_camera/SDK/include/libobsensor/h/Utils.h +++ b/orbbec_camera/SDK/include/libobsensor/h/Utils.h @@ -37,6 +37,23 @@ bool ob_calibration_3d_to_3d(const ob_calibration_param calibration_param, const bool ob_calibration_2d_to_3d(const ob_calibration_param calibration_param, const ob_point2f source_point2f, const float source_depth_pixel_value, const ob_sensor_type source_sensor_type, const ob_sensor_type target_sensor_type, ob_point3f *target_point3f, ob_error **error); +/** + * @brief Transform a 2d pixel coordinate with an associated depth value of the source camera into a 3d point of the target coordinate system. + * + * @param[in] calibration_param Device calibration param,see pipeline::getCalibrationParam + * @param[in] source_point2f Source 2d point value + * @param[in] source_depth_pixel_value The depth of sourcePoint2f in millimeters + * @param[in] source_sensor_type Source sensor type + * @param[in] target_sensor_type Target sensor type + * @param[out] target_point3f Target 3d point value + * @param[out] error Log error messages + * + * @return bool Transform result + */ +bool ob_calibration_2d_to_3d_undistortion(const ob_calibration_param calibration_param, const ob_point2f source_point2f, const float source_depth_pixel_value, + const ob_sensor_type source_sensor_type, const ob_sensor_type target_sensor_type, ob_point3f *target_point3f, + ob_error **error); + /** * @brief Transform a 3d point of a source coordinate system into a 2d pixel coordinate of the target camera. * @@ -88,7 +105,7 @@ ob_frame *transformation_depth_frame_to_color_camera(ob_device *device, ob_frame * @param[in] calibration_param Device calibration param,see pipeline::getCalibrationParam * @param[in] sensor_type sensor type * @param[in] data input data,needs to be allocated externally.During initialization, the external allocation size is 'data_size', for example, data_size = 1920 - * * 1080 * 2 (1920 * 1080 represents the image resolution, and 2 represents two LUTs, one for x-coordinate and one for y-coordinate). + * * 1080 * 2*sizeof(float) (1920 * 1080 represents the image resolution, and 2 represents two LUTs, one for x-coordinate and one for y-coordinate). * @param[in] data_size input data size * @param[out] xy_tables output xy tables * @param[out] error Log error messages @@ -108,6 +125,18 @@ bool transformation_init_xy_tables(const ob_calibration_param calibration_param, */ void transformation_depth_to_pointcloud(ob_xy_tables *xy_tables, const void *depth_image_data, void *pointcloud_data, ob_error **error); +/** + * @brief Transform depth image to point cloud data + * + * @param[in] xy_tables input xy tables,see transformation_init_xy_tables + * @param[in] depth_image_data input depth image data + * @param[in] color_image_data input color image data (only RGB888 support) + * @param[out] pointcloud_data output point cloud data + * @param[out] error Log error messages + */ +void transformation_depth_to_rgbd_pointcloud(ob_xy_tables *xy_tables, const void *depth_image_data, const void *color_image_data, void *pointcloud_data, + ob_error **error); + #ifdef __cplusplus } #endif \ No newline at end of file diff --git a/orbbec_camera/SDK/include/libobsensor/hpp/Filter.hpp b/orbbec_camera/SDK/include/libobsensor/hpp/Filter.hpp index 71ddc63c..d646dfc8 100644 --- a/orbbec_camera/SDK/include/libobsensor/hpp/Filter.hpp +++ b/orbbec_camera/SDK/include/libobsensor/hpp/Filter.hpp @@ -474,6 +474,53 @@ public: OBUint8PropertyRange getScaleRange(); }; +/** + * @brief The edge noise removal filter,removing scattering depth pixels. + */ +class OB_EXTENSION_API EdgeNoiseRemovalFilter : public Filter { +public: + EdgeNoiseRemovalFilter(); + + /** + * @brief Set the edge noise removal filter params. + * + * @param[in] params ob_edge_noise_removal_filter_params. + */ + void setFilterParams(OBEdgeNoiseRemovalFilterParams filterParams); + + /** + * @brief Get the edge noise removal filter params. + * + * @return OBEdgeNoiseRemovalFilterParams. + */ + OBEdgeNoiseRemovalFilterParams getFilterParams(); + + /** + * @brief Get the edge noise removal filter margin left th range. + * @return OBUint16PropertyRange The disp diff of property range. + */ + OBUint16PropertyRange getMarginLeftThRange(); + + /** + * @brief Get the edge noise removal filter margin right th range. + * @return OBUint16PropertyRange The max size of property range. + */ + OBUint16PropertyRange getMarginRightThRange(); + + /** + * @brief Get the edge noise removal filter margin top th range. + * @return OBUint16PropertyRange The disp diff of property range. + */ + OBUint16PropertyRange getMarginTopThRange(); + + /** + * @brief Get the edge noise removal filter margin bottom th range. + * @return OBUint16PropertyRange The max size of property range. + */ + OBUint16PropertyRange getMarginBottomThRange(); +}; + + // Define the is() template function for the Filter class template bool Filter::is() { std::string name = type(); @@ -519,6 +566,9 @@ template bool Filter::is() { if(name == "Align") { return typeid(T) == typeid(Align); } + if(name == "EdgeNoiseRemovalFilter") { + return typeid(T) == typeid(Align); + } return false; } diff --git a/orbbec_camera/SDK/include/libobsensor/hpp/Frame.hpp b/orbbec_camera/SDK/include/libobsensor/hpp/Frame.hpp index 5151611a..f5b57982 100644 --- a/orbbec_camera/SDK/include/libobsensor/hpp/Frame.hpp +++ b/orbbec_camera/SDK/include/libobsensor/hpp/Frame.hpp @@ -110,6 +110,14 @@ public: */ uint64_t systemTimeStamp(); + /** + * @brief Get the system timestamp of the frame in microseconds. + * @brief The system timestamp is the time point when the frame was received by the host, on host clock domain. + * + * @return uint64_t The system timestamp of the frame in microseconds. + */ + uint64_t systemTimeStampUs(); + /** * @brief Get the global timestamp of the frame in microseconds. * @brief The global timestamp is the time point when the frame was was captured by the device, and has been converted to the host clock domain. The diff --git a/orbbec_camera/SDK/include/libobsensor/hpp/Utils.hpp b/orbbec_camera/SDK/include/libobsensor/hpp/Utils.hpp index 28034372..567dbf0b 100644 --- a/orbbec_camera/SDK/include/libobsensor/hpp/Utils.hpp +++ b/orbbec_camera/SDK/include/libobsensor/hpp/Utils.hpp @@ -105,7 +105,7 @@ public: * @param calibrationParam Device calibration param,see pipeline::getCalibrationParam * @param sensorType sensor type * @param data input data,needs to be allocated externally.During initialization, the external allocation size is 'dataSize', for example, dataSize = 1920 * - * 1080 * 2 (1920 * 1080 represents the image resolution, and 2 represents two LUTs, one for x-coordinate and one for y-coordinate). + * 1080 * 2*sizeof(float) (1920 * 1080 represents the image resolution, and 2 represents two LUTs, one for x-coordinate and one for y-coordinate). * @param dataSize input data size * @param xyTables output xy tables * @@ -123,5 +123,16 @@ public: * */ static void transformationDepthToPointCloud(OBXYTables *xyTables, const void *depthImageData, void *pointCloudData); + + /** + * @brief Transform depth image to RGBD point cloud data + * + * @param xyTables input xy tables,see CoordinateTransformHelper::transformationInitXYTables + * @param depthImageData input depth image data + * @param colorImageData input color image data (only RGB888 support) + * @param pointCloudData output RGBD point cloud data + * + */ + static void transformationDepthToRGBDPointCloud(OBXYTables *xyTables, const void *depthImageData, const void *colorImageData, void *pointCloudData); }; } // namespace ob diff --git a/orbbec_camera/SDK/lib/arm32/libOrbbecSDK.so b/orbbec_camera/SDK/lib/arm32/libOrbbecSDK.so index cbc0ec35..1ae2c0e8 120000 --- a/orbbec_camera/SDK/lib/arm32/libOrbbecSDK.so +++ b/orbbec_camera/SDK/lib/arm32/libOrbbecSDK.so @@ -1 +1 @@ -libOrbbecSDK.so.1.9 \ No newline at end of file +libOrbbecSDK.so.1.10 \ No newline at end of file diff --git a/orbbec_camera/SDK/lib/arm32/libOrbbecSDK.so.1.10 b/orbbec_camera/SDK/lib/arm32/libOrbbecSDK.so.1.10 new file mode 120000 index 00000000..7b054f6b --- /dev/null +++ b/orbbec_camera/SDK/lib/arm32/libOrbbecSDK.so.1.10 @@ -0,0 +1 @@ +libOrbbecSDK.so.1.10.0 \ No newline at end of file diff --git a/orbbec_camera/SDK/lib/arm32/libOrbbecSDK.so.1.9.2 b/orbbec_camera/SDK/lib/arm32/libOrbbecSDK.so.1.10.0 similarity index 61% rename from orbbec_camera/SDK/lib/arm32/libOrbbecSDK.so.1.9.2 rename to orbbec_camera/SDK/lib/arm32/libOrbbecSDK.so.1.10.0 index 92073385..27ac2430 100644 Binary files a/orbbec_camera/SDK/lib/arm32/libOrbbecSDK.so.1.9.2 and b/orbbec_camera/SDK/lib/arm32/libOrbbecSDK.so.1.10.0 differ diff --git a/orbbec_camera/SDK/lib/arm32/libOrbbecSDK.so.1.9 b/orbbec_camera/SDK/lib/arm32/libOrbbecSDK.so.1.9 deleted file mode 120000 index 57c26c77..00000000 --- a/orbbec_camera/SDK/lib/arm32/libOrbbecSDK.so.1.9 +++ /dev/null @@ -1 +0,0 @@ -libOrbbecSDK.so.1.9.2 \ No newline at end of file diff --git a/orbbec_camera/SDK/lib/arm64/libOrbbecSDK.so b/orbbec_camera/SDK/lib/arm64/libOrbbecSDK.so index cbc0ec35..1ae2c0e8 120000 --- a/orbbec_camera/SDK/lib/arm64/libOrbbecSDK.so +++ b/orbbec_camera/SDK/lib/arm64/libOrbbecSDK.so @@ -1 +1 @@ -libOrbbecSDK.so.1.9 \ No newline at end of file +libOrbbecSDK.so.1.10 \ No newline at end of file diff --git a/orbbec_camera/SDK/lib/arm64/libOrbbecSDK.so.1.10 b/orbbec_camera/SDK/lib/arm64/libOrbbecSDK.so.1.10 new file mode 120000 index 00000000..7b054f6b --- /dev/null +++ b/orbbec_camera/SDK/lib/arm64/libOrbbecSDK.so.1.10 @@ -0,0 +1 @@ +libOrbbecSDK.so.1.10.0 \ No newline at end of file diff --git a/orbbec_camera/SDK/lib/arm64/libOrbbecSDK.so.1.9.2 b/orbbec_camera/SDK/lib/arm64/libOrbbecSDK.so.1.10.0 similarity index 58% rename from orbbec_camera/SDK/lib/arm64/libOrbbecSDK.so.1.9.2 rename to orbbec_camera/SDK/lib/arm64/libOrbbecSDK.so.1.10.0 index bca5ba13..f41f128e 100644 Binary files a/orbbec_camera/SDK/lib/arm64/libOrbbecSDK.so.1.9.2 and b/orbbec_camera/SDK/lib/arm64/libOrbbecSDK.so.1.10.0 differ diff --git a/orbbec_camera/SDK/lib/arm64/libOrbbecSDK.so.1.9 b/orbbec_camera/SDK/lib/arm64/libOrbbecSDK.so.1.9 deleted file mode 120000 index 57c26c77..00000000 --- a/orbbec_camera/SDK/lib/arm64/libOrbbecSDK.so.1.9 +++ /dev/null @@ -1 +0,0 @@ -libOrbbecSDK.so.1.9.2 \ No newline at end of file diff --git a/orbbec_camera/SDK/lib/x64/libOrbbecSDK.so b/orbbec_camera/SDK/lib/x64/libOrbbecSDK.so index cbc0ec35..1ae2c0e8 120000 --- a/orbbec_camera/SDK/lib/x64/libOrbbecSDK.so +++ b/orbbec_camera/SDK/lib/x64/libOrbbecSDK.so @@ -1 +1 @@ -libOrbbecSDK.so.1.9 \ No newline at end of file +libOrbbecSDK.so.1.10 \ No newline at end of file diff --git a/orbbec_camera/SDK/lib/x64/libOrbbecSDK.so.1.10 b/orbbec_camera/SDK/lib/x64/libOrbbecSDK.so.1.10 new file mode 120000 index 00000000..7b054f6b --- /dev/null +++ b/orbbec_camera/SDK/lib/x64/libOrbbecSDK.so.1.10 @@ -0,0 +1 @@ +libOrbbecSDK.so.1.10.0 \ No newline at end of file diff --git a/orbbec_camera/SDK/lib/x64/libOrbbecSDK.so.1.9.2 b/orbbec_camera/SDK/lib/x64/libOrbbecSDK.so.1.10.0 similarity index 59% rename from orbbec_camera/SDK/lib/x64/libOrbbecSDK.so.1.9.2 rename to orbbec_camera/SDK/lib/x64/libOrbbecSDK.so.1.10.0 index 64d99258..25f3dd23 100644 Binary files a/orbbec_camera/SDK/lib/x64/libOrbbecSDK.so.1.9.2 and b/orbbec_camera/SDK/lib/x64/libOrbbecSDK.so.1.10.0 differ diff --git a/orbbec_camera/SDK/lib/x64/libOrbbecSDK.so.1.9 b/orbbec_camera/SDK/lib/x64/libOrbbecSDK.so.1.9 deleted file mode 120000 index 57c26c77..00000000 --- a/orbbec_camera/SDK/lib/x64/libOrbbecSDK.so.1.9 +++ /dev/null @@ -1 +0,0 @@ -libOrbbecSDK.so.1.9.2 \ No newline at end of file