diff --git a/orbbec_camera/SDK/include/libobsensor/h/Error.h b/orbbec_camera/SDK/include/libobsensor/h/Error.h index ffa5e5d6..d814103e 100644 --- a/orbbec_camera/SDK/include/libobsensor/h/Error.h +++ b/orbbec_camera/SDK/include/libobsensor/h/Error.h @@ -24,7 +24,7 @@ ob_status ob_error_status(ob_error *error); * @param[in] error The error object. * @return The error message. */ -const char *ob_error_message(ob_error *error); +const char *ob_error_message(const ob_error *error); /** * @brief Get the name of the API function that caused the error. diff --git a/orbbec_camera/SDK/include/libobsensor/h/Property.h b/orbbec_camera/SDK/include/libobsensor/h/Property.h index 65ae774a..edf573ee 100644 --- a/orbbec_camera/SDK/include/libobsensor/h/Property.h +++ b/orbbec_camera/SDK/include/libobsensor/h/Property.h @@ -384,6 +384,10 @@ typedef enum { * @brief Query the status of laser pulse width protection (read-only) */ OB_PROP_LASER_PULSE_WIDTH_PROTECTION_STATUS_BOOL = 149, + /** + * @brief depth noise removal filter + */ + OB_PROP_DEPTH_NOISE_REMOVAL_FILTER_BOOL = 165, /** * @brief Laser always on, true: always on, false: off, laser will be turned off when out of exposure time @@ -415,23 +419,23 @@ typedef enum { /** * @brief slave device sync status - */ - OB_PROP_SLAVE_DEVICE_SYNC_STATUS_BOOL = 188, + */ + OB_PROP_SLAVE_DEVICE_SYNC_STATUS_BOOL = 188, - /** + /** * @brief Color AE max exposure - */ - OB_PROP_COLOR_AE_MAX_EXPOSURE_INT = 189, + */ + OB_PROP_COLOR_AE_MAX_EXPOSURE_INT = 189, /** * @brief IR AE max exposure - */ - OB_PROP_IR_AE_MAX_EXPOSURE_INT = 190, + */ + OB_PROP_IR_AE_MAX_EXPOSURE_INT = 190, /** * @brief disparity search range mode - */ - OB_PROP_DISP_SEARCH_RANGE_MODE_INT = 191, + */ + OB_PROP_DISP_SEARCH_RANGE_MODE_INT = 191, /** * @brief Baseline calibration parameters @@ -712,6 +716,11 @@ typedef enum { */ OB_PROP_SDK_IR_RIGHT_FRAME_UNPACK_BOOL = 3012, + /** + * @brief depth Margin Filter + */ + OB_PROP_SDK_DEPTH_RECTIFY_MG_FILTER_BOOL = 3013, + /** * @brief Calibration JSON file read from device (Femto Mega, read only) */ diff --git a/orbbec_camera/SDK/include/libobsensor/hpp/Utils.hpp b/orbbec_camera/SDK/include/libobsensor/hpp/Utils.hpp index eefa9cfd..567dbf0b 100644 --- a/orbbec_camera/SDK/include/libobsensor/hpp/Utils.hpp +++ b/orbbec_camera/SDK/include/libobsensor/hpp/Utils.hpp @@ -6,155 +6,133 @@ #pragma once #include "Types.hpp" -#include "Frame.hpp" namespace ob { class Device; class OB_EXTENSION_API CoordinateTransformHelper { - public: - /** - * @brief Transform a 3d point of a source coordinate system into a 3d point of the target - * coordinate system. - * - * @param calibrationParam Device calibration param,see pipeline::getCalibrationParam - * @param sourcePoint3f Source 3d point value - * @param sourceSensorType Source sensor type - * @param targetSensorType Target sensor type - * @param targetPoint3f Target 3d point value - * - * @return bool Transform result - */ - static bool calibration3dTo3d(const OBCalibrationParam calibrationParam, - const OBPoint3f sourcePoint3f, const OBSensorType sourceSensorType, - const OBSensorType targetSensorType, OBPoint3f *targetPoint3f); +public: + /** + * @brief Transform a 3d point of a source coordinate system into a 3d point of the target coordinate system. + * + * @param calibrationParam Device calibration param,see pipeline::getCalibrationParam + * @param sourcePoint3f Source 3d point value + * @param sourceSensorType Source sensor type + * @param targetSensorType Target sensor type + * @param targetPoint3f Target 3d point value + * + * @return bool Transform result + */ + static bool calibration3dTo3d(const OBCalibrationParam calibrationParam, const OBPoint3f sourcePoint3f, const OBSensorType sourceSensorType, + const OBSensorType targetSensorType, OBPoint3f *targetPoint3f); - /** - * @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 calibrationParam Device calibration param,see pipeline::getCalibrationParam - * @param sourcePoint2f Source 2d point value - * @param sourceDepthPixelValue The depth of sourcePoint2f in millimeters - * @param sourceSensorType Source sensor type - * @param targetSensorType Target sensor type - * @param targetPoint3f Target 3d point value - * - * @return bool Transform result - */ - static bool calibration2dTo3d(const OBCalibrationParam calibrationParam, - const OBPoint2f sourcePoint2f, const float sourceDepthPixelValue, - const OBSensorType sourceSensorType, - const OBSensorType targetSensorType, OBPoint3f *targetPoint3f); + /** + * @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 calibrationParam Device calibration param,see pipeline::getCalibrationParam + * @param sourcePoint2f Source 2d point value + * @param sourceDepthPixelValue The depth of sourcePoint2f in millimeters + * @param sourceSensorType Source sensor type + * @param targetSensorType Target sensor type + * @param targetPoint3f Target 3d point value + * + * @return bool Transform result + */ + static bool calibration2dTo3d(const OBCalibrationParam calibrationParam, const OBPoint2f sourcePoint2f, const float sourceDepthPixelValue, + const OBSensorType sourceSensorType, const OBSensorType targetSensorType, OBPoint3f *targetPoint3f); - /** - * @brief Transform a 2d pixel coordinate with an associated depth value of the source camera into - * a 3d point of the target coordinate system. - * @brief This function uses undistortion, which may result in longer processing time. - * - * @param calibrationParam Device calibration param,see pipeline::getCalibrationParam - * @param sourcePoint2f Source 2d point value - * @param sourceDepthPixelValue The depth of sourcePoint2f in millimeters - * @param sourceSensorType Source sensor type - * @param targetSensorType Target sensor type - * @param targetPoint3f Target 3d point value - * - * @return bool Transform result - */ - static bool calibration2dTo3dUndistortion(const OBCalibrationParam calibrationParam, - const OBPoint2f sourcePoint2f, - const float sourceDepthPixelValue, - const OBSensorType sourceSensorType, - const OBSensorType targetSensorType, - OBPoint3f *targetPoint3f); + /** + * @brief Transform a 2d pixel coordinate with an associated depth value of the source camera into a 3d point of the target coordinate system. + * @brief This function uses undistortion, which may result in longer processing time. + * + * @param calibrationParam Device calibration param,see pipeline::getCalibrationParam + * @param sourcePoint2f Source 2d point value + * @param sourceDepthPixelValue The depth of sourcePoint2f in millimeters + * @param sourceSensorType Source sensor type + * @param targetSensorType Target sensor type + * @param targetPoint3f Target 3d point value + * + * @return bool Transform result + */ + static bool calibration2dTo3dUndistortion(const OBCalibrationParam calibrationParam, const OBPoint2f sourcePoint2f, const float sourceDepthPixelValue, + const OBSensorType sourceSensorType, const OBSensorType targetSensorType, OBPoint3f *targetPoint3f); - /** - * @brief Transform a 3d point of a source coordinate system into a 2d pixel coordinate of the - * target camera. - * - * @param calibrationParam Device calibration param,see pipeline::getCalibrationParam - * @param sourcePoint3f Source 3d point value - * @param sourceSensorType Source sensor type - * @param targetSensorType Target sensor type - * @param targetPoint2f Target 2d point value - * - * @return bool Transform result - */ - static bool calibration3dTo2d(const OBCalibrationParam calibrationParam, - const OBPoint3f sourcePoint3f, const OBSensorType sourceSensorType, - const OBSensorType targetSensorType, OBPoint2f *targetPoint2f); + /** + * @brief Transform a 3d point of a source coordinate system into a 2d pixel coordinate of the target camera. + * + * @param calibrationParam Device calibration param,see pipeline::getCalibrationParam + * @param sourcePoint3f Source 3d point value + * @param sourceSensorType Source sensor type + * @param targetSensorType Target sensor type + * @param targetPoint2f Target 2d point value + * + * @return bool Transform result + */ + static bool calibration3dTo2d(const OBCalibrationParam calibrationParam, const OBPoint3f sourcePoint3f, const OBSensorType sourceSensorType, + const OBSensorType targetSensorType, OBPoint2f *targetPoint2f); - /** - * @brief Transform a 2d pixel coordinate with an associated depth value of the source camera into - * a 2d pixel coordinate of the target camera - * - * @param calibrationParam Device calibration param,see pipeline::getCalibrationParam - * @param sourcePoint2f Source 2d point value - * @param sourceDepthPixelValue The depth of sourcePoint2f in millimeters - * @param sourceSensorType Source sensor type - * @param targetSensorType Target sensor type - * @param targetPoint2f Target 2d point value - * - * @return bool Transform result - */ - static bool calibration2dTo2d(const OBCalibrationParam calibrationParam, - const OBPoint2f sourcePoint2f, const float sourceDepthPixelValue, - const OBSensorType sourceSensorType, - const OBSensorType targetSensorType, OBPoint2f *targetPoint2f); + /** + * @brief Transform a 2d pixel coordinate with an associated depth value of the source camera into a 2d pixel coordinate of the target camera + * + * @param calibrationParam Device calibration param,see pipeline::getCalibrationParam + * @param sourcePoint2f Source 2d point value + * @param sourceDepthPixelValue The depth of sourcePoint2f in millimeters + * @param sourceSensorType Source sensor type + * @param targetSensorType Target sensor type + * @param targetPoint2f Target 2d point value + * + * @return bool Transform result + */ + static bool calibration2dTo2d(const OBCalibrationParam calibrationParam, const OBPoint2f sourcePoint2f, const float sourceDepthPixelValue, + const OBSensorType sourceSensorType, const OBSensorType targetSensorType, OBPoint2f *targetPoint2f); - /** - * @brief Transforms the depth frame into the geometry of the color camera. - * - * @param device Device handle - * @param depthFrame Input depth frame - * @param targetColorCameraWidth Target color camera width - * @param targetColorCameraHeight Target color camera height - * - * @return std::shared_ptr Transformed depth frame - */ - static std::shared_ptr transformationDepthFrameToColorCamera( - std::shared_ptr device, std::shared_ptr depthFrame, - uint32_t targetColorCameraWidth, uint32_t targetColorCameraHeight); + /** + * @brief Transforms the depth frame into the geometry of the color camera. + * + * @param device Device handle + * @param depthFrame Input depth frame + * @param targetColorCameraWidth Target color camera width + * @param targetColorCameraHeight Target color camera height + * + * @return std::shared_ptr Transformed depth frame + */ + static std::shared_ptr transformationDepthFrameToColorCamera(std::shared_ptr device, std::shared_ptr depthFrame, + uint32_t targetColorCameraWidth, uint32_t targetColorCameraHeight); - /** - * @brief Init transformation tables - * - * @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*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 - * - * @return bool Transform result - */ - static bool transformationInitXYTables(const OBCalibrationParam calibrationParam, - const OBSensorType sensorType, float *data, - uint32_t *dataSize, OBXYTables *xyTables); + /** + * @brief Init transformation tables + * + * @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*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 + * + * @return bool Transform result + */ + static bool transformationInitXYTables(const OBCalibrationParam calibrationParam, const OBSensorType sensorType, float *data, uint32_t *dataSize, + OBXYTables *xyTables); - /** - * @brief Transform depth image to point cloud data - * - * @param xyTables input xy tables,see CoordinateTransformHelper::transformationInitXYTables - * @param depthImageData input depth image data - * @param pointCloudData output point cloud data - * - */ - static void transformationDepthToPointCloud(OBXYTables *xyTables, const void *depthImageData, - void *pointCloudData); + /** + * @brief Transform depth image to point cloud data + * + * @param xyTables input xy tables,see CoordinateTransformHelper::transformationInitXYTables + * @param depthImageData input depth image data + * @param pointCloudData output point cloud data + * + */ + 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); + /** + * @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.1.10 b/orbbec_camera/SDK/lib/arm32/libOrbbecSDK.so.1.10 index 0afd92f2..e1fa96b8 120000 --- a/orbbec_camera/SDK/lib/arm32/libOrbbecSDK.so.1.10 +++ b/orbbec_camera/SDK/lib/arm32/libOrbbecSDK.so.1.10 @@ -1 +1 @@ -libOrbbecSDK.so.1.10.8 \ No newline at end of file +libOrbbecSDK.so.1.10.9 \ No newline at end of file diff --git a/orbbec_camera/SDK/lib/arm32/libOrbbecSDK.so.1.10.8 b/orbbec_camera/SDK/lib/arm32/libOrbbecSDK.so.1.10.9 similarity index 68% rename from orbbec_camera/SDK/lib/arm32/libOrbbecSDK.so.1.10.8 rename to orbbec_camera/SDK/lib/arm32/libOrbbecSDK.so.1.10.9 index f361e8c7..c06f5aa8 100644 Binary files a/orbbec_camera/SDK/lib/arm32/libOrbbecSDK.so.1.10.8 and b/orbbec_camera/SDK/lib/arm32/libOrbbecSDK.so.1.10.9 differ diff --git a/orbbec_camera/SDK/lib/arm64/libOrbbecSDK.so.1.10 b/orbbec_camera/SDK/lib/arm64/libOrbbecSDK.so.1.10 index 0afd92f2..e1fa96b8 120000 --- a/orbbec_camera/SDK/lib/arm64/libOrbbecSDK.so.1.10 +++ b/orbbec_camera/SDK/lib/arm64/libOrbbecSDK.so.1.10 @@ -1 +1 @@ -libOrbbecSDK.so.1.10.8 \ No newline at end of file +libOrbbecSDK.so.1.10.9 \ No newline at end of file diff --git a/orbbec_camera/SDK/lib/arm64/libOrbbecSDK.so.1.10.8 b/orbbec_camera/SDK/lib/arm64/libOrbbecSDK.so.1.10.9 similarity index 63% rename from orbbec_camera/SDK/lib/arm64/libOrbbecSDK.so.1.10.8 rename to orbbec_camera/SDK/lib/arm64/libOrbbecSDK.so.1.10.9 index 808ff895..aead0244 100644 Binary files a/orbbec_camera/SDK/lib/arm64/libOrbbecSDK.so.1.10.8 and b/orbbec_camera/SDK/lib/arm64/libOrbbecSDK.so.1.10.9 differ diff --git a/orbbec_camera/SDK/lib/x64/libOrbbecSDK.so.1.10 b/orbbec_camera/SDK/lib/x64/libOrbbecSDK.so.1.10 index 0afd92f2..e1fa96b8 120000 --- a/orbbec_camera/SDK/lib/x64/libOrbbecSDK.so.1.10 +++ b/orbbec_camera/SDK/lib/x64/libOrbbecSDK.so.1.10 @@ -1 +1 @@ -libOrbbecSDK.so.1.10.8 \ No newline at end of file +libOrbbecSDK.so.1.10.9 \ No newline at end of file diff --git a/orbbec_camera/SDK/lib/x64/libOrbbecSDK.so.1.10.8 b/orbbec_camera/SDK/lib/x64/libOrbbecSDK.so.1.10.9 similarity index 65% rename from orbbec_camera/SDK/lib/x64/libOrbbecSDK.so.1.10.8 rename to orbbec_camera/SDK/lib/x64/libOrbbecSDK.so.1.10.9 index 59f4d6ce..e5746629 100644 Binary files a/orbbec_camera/SDK/lib/x64/libOrbbecSDK.so.1.10.8 and b/orbbec_camera/SDK/lib/x64/libOrbbecSDK.so.1.10.9 differ