Skip to content

Commit d88353d

Browse files
authored
Further improvements to DepthAI integration (#1458)
* Reorganize DepthAI params * Advanced Tuning of DepthAI’s SGBM Pipeline * Update IMU Local Transform for OAK-D LR, OAK-D SR, and PoE Devices * Reorganiz the usage of DepthAI. Get params before creating the pipeline, and automatically determine the resolution of different models. * Identify the IMU type to specifically handle BMI270 and BNO085/086
1 parent 4eea83d commit d88353d

File tree

4 files changed

+569
-572
lines changed

4 files changed

+569
-572
lines changed

corelib/include/rtabmap/core/camera/CameraDepthAI.h

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -50,21 +50,20 @@ class RTABMAP_CORE_EXPORT CameraDepthAI :
5050
public:
5151
CameraDepthAI(
5252
const std::string & mxidOrName = "",
53-
int resolution = 1, // 0=720p, 1=800p, 2=400p
54-
float imageRate=0.0f,
53+
int imageWidth = 1280, // 640 or 1280
54+
float imageRate = 0.0f,
5555
const Transform & localTransform = Transform::getIdentity());
5656
virtual ~CameraDepthAI();
5757

5858
void setOutputMode(int outputMode = 0);
5959
void setDepthProfile(int confThreshold = 200, int lrcThreshold = 5);
60-
void setExtendedDisparity(bool extendedDisparity);
61-
void setSubpixelMode(bool enabled, int fractionalBits = 3);
62-
void setCompanding(bool enabled, int width=96);
63-
void setRectification(bool useSpecTranslation, float alphaScaling = 0.0f, bool enabled=true);
60+
void setExtendedDisparity(bool extendedDisparity = false, bool enableCompanding = false);
61+
void setSubpixelMode(bool enabled = false, int fractionalBits = 3);
62+
void setDisparityWidthAndFilter(int disparityWidth = 96, int medianFilter = 5);
63+
void setRectification(bool useSpecTranslation = false, float alphaScaling = 0.0f, bool enabled = true);
6464
void setIMU(bool imuPublished, bool publishInterIMU);
6565
void setIrIntensity(float dotIntensity = 0.0f, float floodIntensity = 0.0f);
66-
void setDetectFeatures(int detectFeatures = 0);
67-
void setBlobPath(const std::string & blobPath);
66+
void setDetectFeatures(int detectFeatures = 0, const std::string & blobPath = "");
6867
void setGFTTDetector(bool useHarrisDetector = false, float minDistance = 7.0f, int numTargetFeatures = 1000);
6968
void setSuperPointDetector(float threshold = 0.01f, bool nms = true, int nmsRadius = 4);
7069

@@ -84,10 +83,12 @@ class RTABMAP_CORE_EXPORT CameraDepthAI :
8483
int outputMode_;
8584
int confThreshold_;
8685
int lrcThreshold_;
87-
int resolution_;
86+
int imageWidth_;
8887
bool extendedDisparity_;
88+
bool enableCompanding_;
8989
int subpixelFractionalBits_;
90-
int compandingWidth_;
90+
int disparityWidth_;
91+
int medianFilter_;
9192
bool useSpecTranslation_;
9293
float alphaScaling_;
9394
bool imagesRectified_;
@@ -103,7 +104,7 @@ class RTABMAP_CORE_EXPORT CameraDepthAI :
103104
bool nms_;
104105
int nmsRadius_;
105106
std::string blobPath_;
106-
std::shared_ptr<dai::Device> device_;
107+
std::unique_ptr<dai::Device> device_;
107108
std::shared_ptr<dai::DataOutputQueue> cameraQueue_;
108109
std::map<double, cv::Vec3f> accBuffer_;
109110
std::map<double, cv::Vec3f> gyroBuffer_;

0 commit comments

Comments
 (0)