mirror of
https://github.com/introlab/rtabmap.git
synced 2026-09-02 09:30:25 +08:00
ZED: Fixed compilation error with ZED SDK3 (#499). Added textureness confidence thr parameter (default 90, working only with ZED SDK3)
This commit is contained in:
@@ -59,7 +59,8 @@ public:
|
||||
float imageRate=0.0f,
|
||||
const Transform & localTransform = Transform::getIdentity(),
|
||||
bool selfCalibration = true,
|
||||
bool odomForce3DoF = false);
|
||||
bool odomForce3DoF = false,
|
||||
int texturenessConfidenceThr = 90); // introduced with ZED SDK 3
|
||||
CameraStereoZed(
|
||||
const std::string & svoFilePath,
|
||||
int quality = 1, // 0=NONE, 1=PERFORMANCE, 2=QUALITY
|
||||
@@ -69,7 +70,8 @@ public:
|
||||
float imageRate=0.0f,
|
||||
const Transform & localTransform = Transform::getIdentity(),
|
||||
bool selfCalibration = true,
|
||||
bool odomForce3DoF = false);
|
||||
bool odomForce3DoF = false,
|
||||
int texturenessConfidenceThr = 90); // introduced with ZED SDK 3
|
||||
virtual ~CameraStereoZed();
|
||||
|
||||
virtual bool init(const std::string & calibrationFolder = ".", const std::string & cameraName = "");
|
||||
@@ -95,6 +97,7 @@ private:
|
||||
bool selfCalibration_;
|
||||
int sensingMode_;
|
||||
int confidenceThr_;
|
||||
int texturenessConfidenceThr_; // introduced with ZED SDK 3
|
||||
bool computeOdometry_;
|
||||
bool lost_;
|
||||
bool force3DoF_;
|
||||
|
||||
@@ -250,7 +250,8 @@ CameraStereoZed::CameraStereoZed(
|
||||
float imageRate,
|
||||
const Transform & localTransform,
|
||||
bool selfCalibration,
|
||||
bool odomForce3DoF) :
|
||||
bool odomForce3DoF,
|
||||
int texturenessConfidenceThr) :
|
||||
Camera(imageRate, localTransform)
|
||||
#ifdef RTABMAP_ZED
|
||||
,
|
||||
@@ -263,6 +264,7 @@ CameraStereoZed::CameraStereoZed(
|
||||
selfCalibration_(selfCalibration),
|
||||
sensingMode_(sensingMode),
|
||||
confidenceThr_(confidenceThr),
|
||||
texturenessConfidenceThr_(texturenessConfidenceThr),
|
||||
computeOdometry_(computeOdometry),
|
||||
lost_(true),
|
||||
force3DoF_(odomForce3DoF),
|
||||
@@ -286,6 +288,7 @@ CameraStereoZed::CameraStereoZed(
|
||||
UASSERT(qual >= sl::DEPTH_MODE::NONE && qual < sl::DEPTH_MODE::LAST);
|
||||
UASSERT(sens >= sl::SENSING_MODE::STANDARD && sens < sl::SENSING_MODE::LAST);
|
||||
UASSERT(confidenceThr_ >= 0 && confidenceThr_ <=100);
|
||||
UASSERT(texturenessConfidenceThr_ >= 0 && texturenessConfidenceThr_ <=100);
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
@@ -299,7 +302,8 @@ CameraStereoZed::CameraStereoZed(
|
||||
float imageRate,
|
||||
const Transform & localTransform,
|
||||
bool selfCalibration,
|
||||
bool odomForce3DoF) :
|
||||
bool odomForce3DoF,
|
||||
int texturenessConfidenceThr) :
|
||||
Camera(imageRate, localTransform)
|
||||
#ifdef RTABMAP_ZED
|
||||
,
|
||||
@@ -312,6 +316,7 @@ CameraStereoZed::CameraStereoZed(
|
||||
selfCalibration_(selfCalibration),
|
||||
sensingMode_(sensingMode),
|
||||
confidenceThr_(confidenceThr),
|
||||
texturenessConfidenceThr_(texturenessConfidenceThr),
|
||||
computeOdometry_(computeOdometry),
|
||||
lost_(true),
|
||||
force3DoF_(odomForce3DoF),
|
||||
@@ -335,6 +340,7 @@ CameraStereoZed::CameraStereoZed(
|
||||
UASSERT(qual >= sl::DEPTH_MODE::NONE && qual < sl::DEPTH_MODE::LAST);
|
||||
UASSERT(sens >= sl::SENSING_MODE::STANDARD && sens < sl::SENSING_MODE::LAST);
|
||||
UASSERT(confidenceThr_ >= 0 && confidenceThr_ <=100);
|
||||
UASSERT(texturenessConfidenceThr_ >= 0 && texturenessConfidenceThr_ <=100);
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
@@ -542,8 +548,7 @@ SensorData CameraStereoZed::captureImage(CameraInfo * info)
|
||||
#if ZED_SDK_MAJOR_VERSION < 3
|
||||
sl::RuntimeParameters rparam((sl::SENSING_MODE)sensingMode_, quality_ > 0, quality_ > 0, sl::REFERENCE_FRAME_CAMERA);
|
||||
#else
|
||||
sl::RuntimeParameters rparam((sl::SENSING_MODE)sensingMode_, quality_ > 0, quality_ > 0, sl::REFERENCE_FRAME::CAMERA);
|
||||
rparam.confidence_threshold = confidenceThr_;
|
||||
sl::RuntimeParameters rparam((sl::SENSING_MODE)sensingMode_, quality_ > 0, confidenceThr_, texturenessConfidenceThr_, sl::REFERENCE_FRAME::CAMERA);
|
||||
#endif
|
||||
|
||||
if(zed_)
|
||||
|
||||
Reference in New Issue
Block a user