Features2D: set GFTT/ORB by default if GFTT/BRIEF is not available. RealSense2: fixed T265 local pose frame (when using realsense vio)

This commit is contained in:
matlabbe
2019-10-13 19:04:11 -04:00
parent 8924f9c5dc
commit dd8e21e05d
2 changed files with 11 additions and 11 deletions

View File

@@ -422,11 +422,11 @@ Feature2D * Feature2D::create(Feature2D::Type type, const ParametersMap & parame
if(type == Feature2D::kFeatureSurf || type == Feature2D::kFeatureSift)
{
#if CV_MAJOR_VERSION < 3
UWARN("SURF and SIFT features cannot be used because OpenCV was not built with nonfree module. ORB is used instead.");
UWARN("SURF and SIFT features cannot be used because OpenCV was not built with nonfree module. GFTT/ORB is used instead.");
#else
UWARN("SURF and SIFT features cannot be used because OpenCV was not built with xfeatures2d module. ORB is used instead.");
UWARN("SURF and SIFT features cannot be used because OpenCV was not built with xfeatures2d module. GFTT/ORB is used instead.");
#endif
type = Feature2D::kFeatureOrb;
type = Feature2D::kFeatureGfttOrb;
}
#if CV_MAJOR_VERSION == 3
if(type == Feature2D::kFeatureFastBrief ||
@@ -434,8 +434,8 @@ Feature2D * Feature2D::create(Feature2D::Type type, const ParametersMap & parame
type == Feature2D::kFeatureGfttBrief ||
type == Feature2D::kFeatureGfttFreak)
{
UWARN("BRIEF and FREAK features cannot be used because OpenCV was not built with xfeatures2d module. ORB is used instead.");
type = Feature2D::kFeatureOrb;
UWARN("BRIEF and FREAK features cannot be used because OpenCV was not built with xfeatures2d module. GFTT/ORB is used instead.");
type = Feature2D::kFeatureGfttOrb;
}
#endif
#endif
@@ -447,8 +447,8 @@ Feature2D * Feature2D::create(Feature2D::Type type, const ParametersMap & parame
UWARN("KAZE detector/descriptor can be used only with OpenCV3. SURF is used instead.");
type = Feature2D::kFeatureSurf;
#else
UWARN("KAZE detector/descriptor can be used only with OpenCV3. ORB is used instead.");
type = Feature2D::kFeatureOrb;
UWARN("KAZE detector/descriptor can be used only with OpenCV3. GFTT/ORB is used instead.");
type = Feature2D::kFeatureGfttOrb;
#endif
}
#endif
@@ -456,8 +456,8 @@ Feature2D * Feature2D::create(Feature2D::Type type, const ParametersMap & parame
#ifndef RTABMAP_ORB_OCTREE
if(type == Feature2D::kFeatureOrbOctree)
{
UWARN("ORB OcTree feature cannot be used as RTAB-Map is not built with the option enabled. ORB is used instead.");
type = Feature2D::kFeatureOrb;
UWARN("ORB OcTree feature cannot be used as RTAB-Map is not built with the option enabled. GFTT/ORB is used instead.");
type = Feature2D::kFeatureGfttOrb;
}
#endif

View File

@@ -931,8 +931,8 @@ bool CameraRealSense2::init(const std::string & calibrationFolder, const std::st
UINFO("poseToIMU = %s", poseToIMUT.prettyPrint().c_str());
UINFO("Set base to pose");
this->setLocalTransform(this->getLocalTransform()*poseToLeftT.inverse());
Transform opticalTransform(0, 0, 1, 0, -1, 0, 0, 0, 0, -1, 0, 0);
this->setLocalTransform(this->getLocalTransform() * opticalTransform.inverse());
stereoModel_.setLocalTransform(this->getLocalTransform()*poseToLeftT);
imuLocalTransform_ = this->getLocalTransform()* poseToIMUT;
}