1.更新orbbecSDK 1.9.1;2.gemini2增加深度滤波配置功能;3.增加IMU同时输出topic.

This commit is contained in:
lixiaobin
2023-12-20 17:56:37 +08:00
parent 9ddd0a764b
commit 3fd37a7ce5
40 changed files with 1264 additions and 294 deletions
@@ -26,9 +26,11 @@ class CameraParamList;
class OBDepthWorkModeList;
class OB_EXTENSION_API Device {
private:
protected:
std::unique_ptr<DeviceImpl> impl_;
Device(Device &&device);
public:
/**
* @brief Describe the entity of the RGBD camera, representing a specific model of RGBD camera
@@ -299,6 +301,13 @@ public:
*/
bool isPropertySupported(OBPropertyID propertyId, OBPermissionType permission);
/**
* @brief Check if the global timestamp is supported for the device
*
* @return Whether the global timestamp is supported
*/
bool isGlobalTimestampSupported();
/**
* @brief Upgrade the device firmware
*
@@ -530,8 +539,20 @@ public:
*/
void timerSyncWithHost();
/**
* @brief Load depth filter config from file.
* @param filePath Path of the config file.
*/
void loadDepthFilterConfig(const char *filePath);
/**
* @brief Reset depth filter config to device default define.
*/
void resetDefaultDepthFilterConfig();
friend class Pipeline;
friend class Recorder;
friend class CoordinateTransformHelper;
};
/**
@@ -108,6 +108,18 @@ public:
*/
uint64_t systemTimeStamp();
/**
* @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
* conversion process base on the device timestamp and can eliminate the timer drift of the device
*
* @attention Only some devices support getting the global timestamp. If the device does not support it, this function will return 0. Check the device
* support status by @ref Device::isGlobalTimestampSupported() function.
*
* @return uint64_t The global timestamp of the frame in microseconds.
*/
uint64_t globalTimeStampUs();
/**
* @brief Check if the runtime type of the frame object is compatible with a given type.
*
@@ -134,6 +146,7 @@ private:
friend class Filter;
friend class Recorder;
friend class FrameHelper;
friend class CoordinateTransformHelper;
};
class OB_EXTENSION_API VideoFrame : public Frame {
@@ -145,6 +145,15 @@ public:
*/
OBCameraParam getCameraParamWithProfile(uint32_t colorWidth, uint32_t colorHeight, uint32_t depthWidth, uint32_t depthHeight);
/**
* @brief Get the calibration parameters
*
* @param config The configured parameters
*
* @return OBCalibrationParam The calibration parameters
*/
OBCalibrationParam getCalibrationParam(std::shared_ptr<Config> config);
/**
* @brief Return a list of D2C-enabled depth sensor resolutions corresponding to the input color sensor resolution
*
@@ -253,6 +262,15 @@ public:
*/
void setD2CTargetResolution(uint32_t d2cTargetWidth, uint32_t d2cTargetHeight);
/**
* @brief Set the frame aggregation output mode for the pipeline configuration
* @brief The processing strategy when the FrameSet generated by the frame aggregation function does not contain the frames of all opened streams (which
* can be caused by different frame rates of each stream, or by the loss of frames of one stream): drop directly or output to the user.
*
* @param mode The frame aggregation output mode to be set (default mode is @ref OB_FRAME_AGGREGATE_OUTPUT_FULL_FRAME_REQUIRE)
*/
void setFrameAggregateOutputMode(OBFrameAggregateOutputMode mode);
friend class Pipeline;
};
@@ -0,0 +1,86 @@
/**
* @file Utils.hpp
* @brief The SDK utils class
*
*/
#pragma once
#include "Types.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);
/**
* @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 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 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<ob::Frame> Transformed depth frame
*/
static std::shared_ptr<ob::Frame> transformationDepthFrameToColorCamera(std::shared_ptr<ob::Device> device, std::shared_ptr<ob::Frame> depthFrame,
uint32_t targetColorCameraWidth, uint32_t targetColorCameraHeight);
};
} // namespace ob