mirror of
https://github.com/introlab/rtabmap.git
synced 2026-09-02 01:20:25 +08:00
Added KAZE feature detector (OpenCV3)
This commit is contained in:
@@ -105,7 +105,7 @@ public:
|
|||||||
kFeatureGfttBrief=6,
|
kFeatureGfttBrief=6,
|
||||||
kFeatureBrisk=7,
|
kFeatureBrisk=7,
|
||||||
kFeatureGfttOrb=8, //new 0.10.11
|
kFeatureGfttOrb=8, //new 0.10.11
|
||||||
kFeatureFreak=9}; //new 0.11.14
|
kFeatureKaze=9}; //new 0.13.2
|
||||||
|
|
||||||
static Feature2D * create(const ParametersMap & parameters = ParametersMap());
|
static Feature2D * create(const ParametersMap & parameters = ParametersMap());
|
||||||
static Feature2D * create(Feature2D::Type type, const ParametersMap & parameters = ParametersMap()); // for convenience
|
static Feature2D * create(Feature2D::Type type, const ParametersMap & parameters = ParametersMap()); // for convenience
|
||||||
@@ -433,27 +433,31 @@ private:
|
|||||||
cv::Ptr<CV_BRISK> brisk_;
|
cv::Ptr<CV_BRISK> brisk_;
|
||||||
};
|
};
|
||||||
|
|
||||||
//FREAK
|
//KAZE
|
||||||
class RTABMAP_EXP FREAK : public Feature2D
|
class RTABMAP_EXP KAZE : public Feature2D
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
FREAK(const ParametersMap & parameters = ParametersMap());
|
KAZE(const ParametersMap & parameters = ParametersMap());
|
||||||
virtual ~FREAK();
|
virtual ~KAZE();
|
||||||
|
|
||||||
virtual void parseParameters(const ParametersMap & parameters);
|
virtual void parseParameters(const ParametersMap & parameters);
|
||||||
virtual Feature2D::Type getType() const { return kFeatureFreak; }
|
virtual Feature2D::Type getType() const { return kFeatureKaze; }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
virtual std::vector<cv::KeyPoint> generateKeypointsImpl(const cv::Mat & image, const cv::Rect & roi, const cv::Mat & mask = cv::Mat()) const;
|
virtual std::vector<cv::KeyPoint> generateKeypointsImpl(const cv::Mat & image, const cv::Rect & roi, const cv::Mat & mask = cv::Mat()) const;
|
||||||
virtual cv::Mat generateDescriptorsImpl(const cv::Mat & image, std::vector<cv::KeyPoint> & keypoints) const;
|
virtual cv::Mat generateDescriptorsImpl(const cv::Mat & image, std::vector<cv::KeyPoint> & keypoints) const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
bool orientationNormalized_;
|
bool extended_;
|
||||||
bool scaleNormalized_;
|
bool upright_;
|
||||||
float patternScale_;
|
float threshold_;
|
||||||
int nOctaves_;
|
int nOctaves_;
|
||||||
|
int nOctaveLayers_;
|
||||||
|
int diffusivity_;
|
||||||
|
|
||||||
cv::Ptr<CV_FREAK> _freak;
|
#if CV_MAJOR_VERSION > 2
|
||||||
|
cv::Ptr<cv::KAZE> kaze_;
|
||||||
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -224,9 +224,9 @@ class RTABMAP_EXP Parameters
|
|||||||
RTABMAP_PARAM(Kp, BadSignRatio, float, 0.5, "Bad signature ratio (less than Ratio x AverageWordsPerImage = bad).");
|
RTABMAP_PARAM(Kp, BadSignRatio, float, 0.5, "Bad signature ratio (less than Ratio x AverageWordsPerImage = bad).");
|
||||||
RTABMAP_PARAM(Kp, NndrRatio, float, 0.8, "NNDR ratio (A matching pair is detected, if its distance is closer than X times the distance of the second nearest neighbor.)");
|
RTABMAP_PARAM(Kp, NndrRatio, float, 0.8, "NNDR ratio (A matching pair is detected, if its distance is closer than X times the distance of the second nearest neighbor.)");
|
||||||
#ifdef RTABMAP_NONFREE
|
#ifdef RTABMAP_NONFREE
|
||||||
RTABMAP_PARAM(Kp, DetectorStrategy, int, 0, "0=SURF 1=SIFT 2=ORB 3=FAST/FREAK 4=FAST/BRIEF 5=GFTT/FREAK 6=GFTT/BRIEF 7=BRISK 8=GFTT/ORB 9=FREAK.");
|
RTABMAP_PARAM(Kp, DetectorStrategy, int, 0, "0=SURF 1=SIFT 2=ORB 3=FAST/FREAK 4=FAST/BRIEF 5=GFTT/FREAK 6=GFTT/BRIEF 7=BRISK 8=GFTT/ORB 9=KAZE.");
|
||||||
#else
|
#else
|
||||||
RTABMAP_PARAM(Kp, DetectorStrategy, int, 2, "0=SURF 1=SIFT 2=ORB 3=FAST/FREAK 4=FAST/BRIEF 5=GFTT/FREAK 6=GFTT/BRIEF 7=BRISK 8=GFTT/ORB 9=FREAK.");
|
RTABMAP_PARAM(Kp, DetectorStrategy, int, 2, "0=SURF 1=SIFT 2=ORB 3=FAST/FREAK 4=FAST/BRIEF 5=GFTT/FREAK 6=GFTT/BRIEF 7=BRISK 8=GFTT/ORB 9=KAZE.");
|
||||||
#endif
|
#endif
|
||||||
RTABMAP_PARAM(Kp, TfIdfLikelihoodUsed, bool, true, "Use of the td-idf strategy to compute the likelihood.");
|
RTABMAP_PARAM(Kp, TfIdfLikelihoodUsed, bool, true, "Use of the td-idf strategy to compute the likelihood.");
|
||||||
RTABMAP_PARAM(Kp, Parallelized, bool, true, "If the dictionary update and signature creation were parallelized.");
|
RTABMAP_PARAM(Kp, Parallelized, bool, true, "If the dictionary update and signature creation were parallelized.");
|
||||||
@@ -294,6 +294,13 @@ class RTABMAP_EXP Parameters
|
|||||||
RTABMAP_PARAM(BRISK, Octaves, int, 3, "Detection octaves. Use 0 to do single scale.");
|
RTABMAP_PARAM(BRISK, Octaves, int, 3, "Detection octaves. Use 0 to do single scale.");
|
||||||
RTABMAP_PARAM(BRISK, PatternScale, float, 1,"Apply this scale to the pattern used for sampling the neighbourhood of a keypoint.");
|
RTABMAP_PARAM(BRISK, PatternScale, float, 1,"Apply this scale to the pattern used for sampling the neighbourhood of a keypoint.");
|
||||||
|
|
||||||
|
RTABMAP_PARAM(KAZE, Extended, bool, false, "Set to enable extraction of extended (128-byte) descriptor.");
|
||||||
|
RTABMAP_PARAM(KAZE, Upright, bool, false, "Set to enable use of upright descriptors (non rotation-invariant).");
|
||||||
|
RTABMAP_PARAM(KAZE, Threshold, float, 0.001, "Detector response threshold to accept point.");
|
||||||
|
RTABMAP_PARAM(KAZE, NOctaves, int, 4, "Maximum octave evolution of the image.");
|
||||||
|
RTABMAP_PARAM(KAZE, NOctaveLayers, int, 4, "Default number of sublevels per scale level.");
|
||||||
|
RTABMAP_PARAM(KAZE, Diffusivity, int, 1, "Diffusivity type: 0=DIFF_PM_G1, 1=DIFF_PM_G2, 2=DIFF_WEICKERT or 3=DIFF_CHARBONNIER.");
|
||||||
|
|
||||||
// BayesFilter
|
// BayesFilter
|
||||||
RTABMAP_PARAM(Bayes, VirtualPlacePriorThr, float, 0.9, "Virtual place prior");
|
RTABMAP_PARAM(Bayes, VirtualPlacePriorThr, float, 0.9, "Virtual place prior");
|
||||||
RTABMAP_PARAM_STR(Bayes, PredictionLC, "0.1 0.36 0.30 0.16 0.062 0.0151 0.00255 0.000324 2.5e-05 1.3e-06 4.8e-08 1.2e-09 1.9e-11 2.2e-13 1.7e-15 8.5e-18 2.9e-20 6.9e-23", "Prediction of loop closures (Gaussian-like, here with sigma=1.6) - Format: {VirtualPlaceProb, LoopClosureProb, NeighborLvl1, NeighborLvl2, ...}.");
|
RTABMAP_PARAM_STR(Bayes, PredictionLC, "0.1 0.36 0.30 0.16 0.062 0.0151 0.00255 0.000324 2.5e-05 1.3e-06 4.8e-08 1.2e-09 1.9e-11 2.2e-13 1.7e-15 8.5e-18 2.9e-20 6.9e-23", "Prediction of loop closures (Gaussian-like, here with sigma=1.6) - Format: {VirtualPlaceProb, LoopClosureProb, NeighborLvl1, NeighborLvl2, ...}.");
|
||||||
@@ -469,12 +476,12 @@ class RTABMAP_EXP Parameters
|
|||||||
#ifndef RTABMAP_NONFREE
|
#ifndef RTABMAP_NONFREE
|
||||||
#ifdef RTABMAP_OPENCV3
|
#ifdef RTABMAP_OPENCV3
|
||||||
// OpenCV 3 without xFeatures2D module doesn't have BRIEF
|
// OpenCV 3 without xFeatures2D module doesn't have BRIEF
|
||||||
RTABMAP_PARAM(Vis, FeatureType, int, 8, "0=SURF 1=SIFT 2=ORB 3=FAST/FREAK 4=FAST/BRIEF 5=GFTT/FREAK 6=GFTT/BRIEF 7=BRISK 8=GFTT/ORB 9=FREAK.");
|
RTABMAP_PARAM(Vis, FeatureType, int, 8, "0=SURF 1=SIFT 2=ORB 3=FAST/FREAK 4=FAST/BRIEF 5=GFTT/FREAK 6=GFTT/BRIEF 7=BRISK 8=GFTT/ORB 9=KAZE.");
|
||||||
#else
|
#else
|
||||||
RTABMAP_PARAM(Vis, FeatureType, int, 6, "0=SURF 1=SIFT 2=ORB 3=FAST/FREAK 4=FAST/BRIEF 5=GFTT/FREAK 6=GFTT/BRIEF 7=BRISK 8=GFTT/ORB 9=FREAK.");
|
RTABMAP_PARAM(Vis, FeatureType, int, 6, "0=SURF 1=SIFT 2=ORB 3=FAST/FREAK 4=FAST/BRIEF 5=GFTT/FREAK 6=GFTT/BRIEF 7=BRISK 8=GFTT/ORB 9=KAZE.");
|
||||||
#endif
|
#endif
|
||||||
#else
|
#else
|
||||||
RTABMAP_PARAM(Vis, FeatureType, int, 6, "0=SURF 1=SIFT 2=ORB 3=FAST/FREAK 4=FAST/BRIEF 5=GFTT/FREAK 6=GFTT/BRIEF 7=BRISK 8=GFTT/ORB 9=FREAK.");
|
RTABMAP_PARAM(Vis, FeatureType, int, 6, "0=SURF 1=SIFT 2=ORB 3=FAST/FREAK 4=FAST/BRIEF 5=GFTT/FREAK 6=GFTT/BRIEF 7=BRISK 8=GFTT/ORB 9=KAZE.");
|
||||||
#endif
|
#endif
|
||||||
RTABMAP_PARAM(Vis, MaxFeatures, int, 1000, "0 no limits.");
|
RTABMAP_PARAM(Vis, MaxFeatures, int, 1000, "0 no limits.");
|
||||||
RTABMAP_PARAM(Vis, MaxDepth, float, 0, "Max depth of the features (0 means no limit).");
|
RTABMAP_PARAM(Vis, MaxDepth, float, 0, "Max depth of the features (0 means no limit).");
|
||||||
|
|||||||
@@ -414,8 +414,7 @@ Feature2D * Feature2D::create(Feature2D::Type type, const ParametersMap & parame
|
|||||||
if(type == Feature2D::kFeatureFastBrief ||
|
if(type == Feature2D::kFeatureFastBrief ||
|
||||||
type == Feature2D::kFeatureFastFreak ||
|
type == Feature2D::kFeatureFastFreak ||
|
||||||
type == Feature2D::kFeatureGfttBrief ||
|
type == Feature2D::kFeatureGfttBrief ||
|
||||||
type == Feature2D::kFeatureGfttFreak ||
|
type == Feature2D::kFeatureGfttFreak)
|
||||||
type == Feature2D::kFeatureFreak)
|
|
||||||
{
|
{
|
||||||
UWARN("BRIEF and FREAK features cannot be used because OpenCV was not built with xfeatures2d module. ORB is used instead.");
|
UWARN("BRIEF and FREAK features cannot be used because OpenCV was not built with xfeatures2d module. ORB is used instead.");
|
||||||
type = Feature2D::kFeatureOrb;
|
type = Feature2D::kFeatureOrb;
|
||||||
@@ -424,10 +423,15 @@ Feature2D * Feature2D::create(Feature2D::Type type, const ParametersMap & parame
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if CV_MAJOR_VERSION < 3
|
#if CV_MAJOR_VERSION < 3
|
||||||
if(type == Feature2D::kFeatureFreak)
|
if(type == Feature2D::kFeatureKaze)
|
||||||
{
|
{
|
||||||
UWARN("FREAK detector/descriptor can be used only with OpenCV3. GFTT/FREAK is used instead.");
|
#ifdef RTABMAP_NONFREE
|
||||||
type = Feature2D::kFeatureGfttFreak;
|
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;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -461,6 +465,9 @@ Feature2D * Feature2D::create(Feature2D::Type type, const ParametersMap & parame
|
|||||||
case Feature2D::kFeatureBrisk:
|
case Feature2D::kFeatureBrisk:
|
||||||
feature2D = new BRISK(parameters);
|
feature2D = new BRISK(parameters);
|
||||||
break;
|
break;
|
||||||
|
case Feature2D::kFeatureKaze:
|
||||||
|
feature2D = new KAZE(parameters);
|
||||||
|
break;
|
||||||
#ifdef RTABMAP_NONFREE
|
#ifdef RTABMAP_NONFREE
|
||||||
default:
|
default:
|
||||||
feature2D = new SURF(parameters);
|
feature2D = new SURF(parameters);
|
||||||
@@ -1469,71 +1476,66 @@ cv::Mat BRISK::generateDescriptorsImpl(const cv::Mat & image, std::vector<cv::Ke
|
|||||||
return descriptors;
|
return descriptors;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//////////////////////////
|
//////////////////////////
|
||||||
//FREAK
|
//KAZE
|
||||||
//////////////////////////
|
//////////////////////////
|
||||||
FREAK::FREAK(const ParametersMap & parameters) :
|
KAZE::KAZE(const ParametersMap & parameters) :
|
||||||
orientationNormalized_(Parameters::defaultFREAKOrientationNormalized()),
|
extended_(Parameters::defaultKAZEExtended()),
|
||||||
scaleNormalized_(Parameters::defaultFREAKScaleNormalized()),
|
upright_(Parameters::defaultKAZEUpright()),
|
||||||
patternScale_(Parameters::defaultFREAKPatternScale()),
|
threshold_(Parameters::defaultKAZEThreshold()),
|
||||||
nOctaves_(Parameters::defaultFREAKNOctaves())
|
nOctaves_(Parameters::defaultKAZENOctaves()),
|
||||||
|
nOctaveLayers_(Parameters::defaultKAZENOctaveLayers()),
|
||||||
|
diffusivity_(Parameters::defaultKAZEDiffusivity())
|
||||||
{
|
{
|
||||||
parseParameters(parameters);
|
parseParameters(parameters);
|
||||||
}
|
}
|
||||||
|
|
||||||
FREAK::~FREAK()
|
KAZE::~KAZE()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
void FREAK::parseParameters(const ParametersMap & parameters)
|
void KAZE::parseParameters(const ParametersMap & parameters)
|
||||||
{
|
{
|
||||||
Parameters::parse(parameters, Parameters::kFREAKOrientationNormalized(), orientationNormalized_);
|
Parameters::parse(parameters, Parameters::kKAZEExtended(), extended_);
|
||||||
Parameters::parse(parameters, Parameters::kFREAKScaleNormalized(), scaleNormalized_);
|
Parameters::parse(parameters, Parameters::kKAZEUpright(), upright_);
|
||||||
Parameters::parse(parameters, Parameters::kFREAKPatternScale(), patternScale_);
|
Parameters::parse(parameters, Parameters::kKAZEThreshold(), threshold_);
|
||||||
Parameters::parse(parameters, Parameters::kFREAKNOctaves(), nOctaves_);
|
Parameters::parse(parameters, Parameters::kKAZENOctaves(), nOctaves_);
|
||||||
|
Parameters::parse(parameters, Parameters::kKAZENOctaveLayers(), nOctaveLayers_);
|
||||||
|
Parameters::parse(parameters, Parameters::kKAZEDiffusivity(), diffusivity_);
|
||||||
|
|
||||||
#if CV_MAJOR_VERSION < 3
|
#if CV_MAJOR_VERSION > 2
|
||||||
_freak = cv::Ptr<CV_FREAK>(new CV_FREAK(orientationNormalized_, scaleNormalized_, patternScale_, nOctaves_));
|
kaze_ = cv::KAZE::create(extended_, upright_, threshold_, nOctaves_, nOctaveLayers_, diffusivity_);
|
||||||
#else
|
#else
|
||||||
#ifdef HAVE_OPENCV_XFEATURES2D
|
UWARN("RTAB-Map is not built with OpenCV3 so Kaze feature cannot be used!");
|
||||||
_freak = CV_FREAK::create(orientationNormalized_, scaleNormalized_, patternScale_, nOctaves_);
|
|
||||||
#else
|
|
||||||
UWARN("RTAB-Map is not built with OpenCV xfeatures2d module so Freak cannot be used!");
|
|
||||||
#endif
|
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
std::vector<cv::KeyPoint> FREAK::generateKeypointsImpl(const cv::Mat & image, const cv::Rect & roi, const cv::Mat & mask) const
|
std::vector<cv::KeyPoint> KAZE::generateKeypointsImpl(const cv::Mat & image, const cv::Rect & roi, const cv::Mat & mask) const
|
||||||
{
|
{
|
||||||
UASSERT(!image.empty() && image.channels() == 1 && image.depth() == CV_8U);
|
UASSERT(!image.empty() && image.channels() == 1 && image.depth() == CV_8U);
|
||||||
std::vector<cv::KeyPoint> keypoints;
|
std::vector<cv::KeyPoint> keypoints;
|
||||||
#ifdef HAVE_OPENCV_XFEATURES2D
|
#if CV_MAJOR_VERSION > 2
|
||||||
cv::Mat imgRoi(image, roi);
|
cv::Mat imgRoi(image, roi);
|
||||||
cv::Mat maskRoi;
|
cv::Mat maskRoi;
|
||||||
if (!mask.empty())
|
if (!mask.empty())
|
||||||
{
|
{
|
||||||
maskRoi = cv::Mat(mask, roi);
|
maskRoi = cv::Mat(mask, roi);
|
||||||
}
|
}
|
||||||
_freak->detect(imgRoi, keypoints, maskRoi); // Opencv keypoints
|
kaze_->detect(imgRoi, keypoints, maskRoi); // Opencv keypoints
|
||||||
#else
|
#else
|
||||||
UWARN("RTAB-Map is not built with OpenCV3 xfeatures2d module so Freak (for keypoint detection) cannot be used!");
|
UWARN("RTAB-Map is not built with OpenCV3 so Kaze feature cannot be used!");
|
||||||
#endif
|
#endif
|
||||||
return keypoints;
|
return keypoints;
|
||||||
}
|
}
|
||||||
|
|
||||||
cv::Mat FREAK::generateDescriptorsImpl(const cv::Mat & image, std::vector<cv::KeyPoint> & keypoints) const
|
cv::Mat KAZE::generateDescriptorsImpl(const cv::Mat & image, std::vector<cv::KeyPoint> & keypoints) const
|
||||||
{
|
{
|
||||||
UASSERT(!image.empty() && image.channels() == 1 && image.depth() == CV_8U);
|
UASSERT(!image.empty() && image.channels() == 1 && image.depth() == CV_8U);
|
||||||
cv::Mat descriptors;
|
cv::Mat descriptors;
|
||||||
#if CV_MAJOR_VERSION < 3
|
#if CV_MAJOR_VERSION > 2
|
||||||
_freak->compute(image, keypoints, descriptors);
|
kaze_->compute(image, keypoints, descriptors);
|
||||||
#else
|
#else
|
||||||
#ifdef HAVE_OPENCV_XFEATURES2D
|
UWARN("RTAB-Map is not built with OpenCV3 so Kaze feature cannot be used!");
|
||||||
_freak->compute(image, keypoints, descriptors);
|
|
||||||
#else
|
|
||||||
UWARN("RTAB-Map is not built with OpenCV xfeatures2d module so Freak cannot be used!");
|
|
||||||
#endif
|
|
||||||
#endif
|
#endif
|
||||||
return descriptors;
|
return descriptors;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -156,7 +156,8 @@ bool Parameters::isFeatureParameter(const std::string & parameter)
|
|||||||
group.compare("FREAK") == 0 ||
|
group.compare("FREAK") == 0 ||
|
||||||
group.compare("BRIEF") == 0 ||
|
group.compare("BRIEF") == 0 ||
|
||||||
group.compare("GFTT") == 0 ||
|
group.compare("GFTT") == 0 ||
|
||||||
group.compare("BRISK") == 0;
|
group.compare("BRISK") == 0 ||
|
||||||
|
group.compare("KAZE") == 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
rtabmap::ParametersMap Parameters::getDefaultOdometryParameters(bool stereo, bool vis, bool icp)
|
rtabmap::ParametersMap Parameters::getDefaultOdometryParameters(bool stereo, bool vis, bool icp)
|
||||||
|
|||||||
@@ -197,8 +197,8 @@ PreferencesDialog::PreferencesDialog(QWidget * parent) :
|
|||||||
#if CV_MAJOR_VERSION >= 3
|
#if CV_MAJOR_VERSION >= 3
|
||||||
_ui->groupBox_fast_opencv2->setEnabled(false);
|
_ui->groupBox_fast_opencv2->setEnabled(false);
|
||||||
#else
|
#else
|
||||||
_ui->comboBox_detector_strategy->setItemData(9, 0, Qt::UserRole - 1); // No FREAK (detector+descriptor version)
|
_ui->comboBox_detector_strategy->setItemData(9, 0, Qt::UserRole - 1); // No KAZE
|
||||||
_ui->reextract_type->setItemData(9, 0, Qt::UserRole - 1); // No FREAK (detector+descriptor version)
|
_ui->reextract_type->setItemData(9, 0, Qt::UserRole - 1); // No KAZE
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
_ui->comboBox_cameraImages_odomFormat->setItemData(4, 0, Qt::UserRole - 1);
|
_ui->comboBox_cameraImages_odomFormat->setItemData(4, 0, Qt::UserRole - 1);
|
||||||
@@ -746,6 +746,14 @@ PreferencesDialog::PreferencesDialog(QWidget * parent) :
|
|||||||
_ui->spinBox_BRISK_octaves->setObjectName(Parameters::kBRISKOctaves().c_str());
|
_ui->spinBox_BRISK_octaves->setObjectName(Parameters::kBRISKOctaves().c_str());
|
||||||
_ui->doubleSpinBox_BRISK_patterScale->setObjectName(Parameters::kBRISKPatternScale().c_str());
|
_ui->doubleSpinBox_BRISK_patterScale->setObjectName(Parameters::kBRISKPatternScale().c_str());
|
||||||
|
|
||||||
|
//KAZE
|
||||||
|
_ui->checkBox_kaze_extended->setObjectName(Parameters::kKAZEExtended().c_str());
|
||||||
|
_ui->checkBox_kaze_upright->setObjectName(Parameters::kKAZEUpright().c_str());
|
||||||
|
_ui->doubleSpinBox_kaze_threshold->setObjectName(Parameters::kKAZEThreshold().c_str());
|
||||||
|
_ui->spinBox_kaze_octaves->setObjectName(Parameters::kKAZENOctaves().c_str());
|
||||||
|
_ui->spinBox_kaze_octavelayers->setObjectName(Parameters::kKAZENOctaveLayers().c_str());
|
||||||
|
_ui->spinBox_kaze_diffusivity->setObjectName(Parameters::kKAZEDiffusivity().c_str());
|
||||||
|
|
||||||
// verifyHypotheses
|
// verifyHypotheses
|
||||||
_ui->groupBox_vh_epipolar2->setObjectName(Parameters::kVhEpEnabled().c_str());
|
_ui->groupBox_vh_epipolar2->setObjectName(Parameters::kVhEpEnabled().c_str());
|
||||||
_ui->surf_spinBox_matchCountMinAccepted->setObjectName(Parameters::kVhEpMatchCountMin().c_str());
|
_ui->surf_spinBox_matchCountMinAccepted->setObjectName(Parameters::kVhEpMatchCountMin().c_str());
|
||||||
@@ -2364,19 +2372,33 @@ bool PreferencesDialog::validateForm()
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if CV_MAJOR_VERSION < 3
|
#if CV_MAJOR_VERSION < 3
|
||||||
if (_ui->comboBox_detector_strategy->currentIndex() == Feature2D::kFeatureFreak)
|
if (_ui->comboBox_detector_strategy->currentIndex() == Feature2D::kFeatureKaze)
|
||||||
{
|
{
|
||||||
|
#ifdef RTABMAP_NONFREE
|
||||||
QMessageBox::warning(this, tr("Parameter warning"),
|
QMessageBox::warning(this, tr("Parameter warning"),
|
||||||
tr("Selected feature type (FREAK detector) is not available on OpenCV2. ORB is set instead "
|
tr("Selected feature type (KAZE) is not available on OpenCV2. SURF is set instead "
|
||||||
|
"for the bag-of-words dictionary."));
|
||||||
|
_ui->comboBox_detector_strategy->setCurrentIndex(Feature2D::kFeatureSurf);
|
||||||
|
#else
|
||||||
|
QMessageBox::warning(this, tr("Parameter warning"),
|
||||||
|
tr("Selected feature type (KAZE) is not available on OpenCV2. ORB is set instead "
|
||||||
"for the bag-of-words dictionary."));
|
"for the bag-of-words dictionary."));
|
||||||
_ui->comboBox_detector_strategy->setCurrentIndex(Feature2D::kFeatureOrb);
|
_ui->comboBox_detector_strategy->setCurrentIndex(Feature2D::kFeatureOrb);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
if (_ui->reextract_type->currentIndex() == Feature2D::kFeatureFreak)
|
if (_ui->reextract_type->currentIndex() == Feature2D::kFeatureKaze)
|
||||||
{
|
{
|
||||||
|
#ifdef RTABMAP_NONFREE
|
||||||
QMessageBox::warning(this, tr("Parameter warning"),
|
QMessageBox::warning(this, tr("Parameter warning"),
|
||||||
tr("Selected feature type (FREAK detector) is not available on OpenCV2. ORB is set instead "
|
tr("Selected feature type (KAZE) is not available on OpenCV2. SURF is set instead "
|
||||||
|
"for the re-extraction of features on loop closure."));
|
||||||
|
_ui->reextract_type->setCurrentIndex(Feature2D::kFeatureSurf);
|
||||||
|
#else
|
||||||
|
QMessageBox::warning(this, tr("Parameter warning"),
|
||||||
|
tr("Selected feature type (KAZE) is not available on OpenCV2. ORB is set instead "
|
||||||
"for the re-extraction of features on loop closure."));
|
"for the re-extraction of features on loop closure."));
|
||||||
_ui->reextract_type->setCurrentIndex(Feature2D::kFeatureOrb);
|
_ui->reextract_type->setCurrentIndex(Feature2D::kFeatureOrb);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
@@ -95,7 +95,7 @@
|
|||||||
<enum>QFrame::Raised</enum>
|
<enum>QFrame::Raised</enum>
|
||||||
</property>
|
</property>
|
||||||
<property name="currentIndex">
|
<property name="currentIndex">
|
||||||
<number>11</number>
|
<number>34</number>
|
||||||
</property>
|
</property>
|
||||||
<widget class="QWidget" name="page_22">
|
<widget class="QWidget" name="page_22">
|
||||||
<layout class="QVBoxLayout" name="verticalLayout_29" stretch="0,1">
|
<layout class="QVBoxLayout" name="verticalLayout_29" stretch="0,1">
|
||||||
@@ -6732,7 +6732,7 @@ generate the number of words requested.</string>
|
|||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>FREAK</string>
|
<string>KAZE</string>
|
||||||
</property>
|
</property>
|
||||||
</item>
|
</item>
|
||||||
</widget>
|
</widget>
|
||||||
@@ -13245,7 +13245,7 @@ Lower the ratio -> higher the precision. 0 means disabled, matching the neare
|
|||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>FREAK</string>
|
<string>KAZE</string>
|
||||||
</property>
|
</property>
|
||||||
</item>
|
</item>
|
||||||
</widget>
|
</widget>
|
||||||
@@ -15863,6 +15863,179 @@ Lower the ratio -> higher the precision. 0 means disabled, matching the neare
|
|||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
|
<widget class="QWidget" name="page_71">
|
||||||
|
<layout class="QVBoxLayout" name="verticalLayout_3">
|
||||||
|
<item>
|
||||||
|
<widget class="QGroupBox" name="groupBox_detector_kaze2">
|
||||||
|
<property name="title">
|
||||||
|
<string>KAZE</string>
|
||||||
|
</property>
|
||||||
|
<layout class="QGridLayout" name="gridLayout_95" columnstretch="0,1">
|
||||||
|
<item row="0" column="0">
|
||||||
|
<widget class="QCheckBox" name="checkBox_kaze_extended">
|
||||||
|
<property name="text">
|
||||||
|
<string/>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="1">
|
||||||
|
<widget class="QLabel" name="label_420">
|
||||||
|
<property name="text">
|
||||||
|
<string>Set to enable use of upright descriptors (non rotation-invariant).</string>
|
||||||
|
</property>
|
||||||
|
<property name="wordWrap">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
<property name="textInteractionFlags">
|
||||||
|
<set>Qt::LinksAccessibleByMouse|Qt::TextSelectableByMouse</set>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="3" column="1">
|
||||||
|
<widget class="QLabel" name="label_416">
|
||||||
|
<property name="text">
|
||||||
|
<string>Maximum octave evolution of the image.</string>
|
||||||
|
</property>
|
||||||
|
<property name="wordWrap">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
<property name="textInteractionFlags">
|
||||||
|
<set>Qt::LinksAccessibleByMouse|Qt::TextSelectableByMouse</set>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="0">
|
||||||
|
<widget class="QCheckBox" name="checkBox_kaze_upright">
|
||||||
|
<property name="text">
|
||||||
|
<string/>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="4" column="1">
|
||||||
|
<widget class="QLabel" name="label_417">
|
||||||
|
<property name="text">
|
||||||
|
<string>Default number of sublevels per scale level.</string>
|
||||||
|
</property>
|
||||||
|
<property name="wordWrap">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
<property name="textInteractionFlags">
|
||||||
|
<set>Qt::LinksAccessibleByMouse|Qt::TextSelectableByMouse</set>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="4" column="0">
|
||||||
|
<widget class="QSpinBox" name="spinBox_kaze_octavelayers">
|
||||||
|
<property name="minimum">
|
||||||
|
<number>1</number>
|
||||||
|
</property>
|
||||||
|
<property name="maximum">
|
||||||
|
<number>16</number>
|
||||||
|
</property>
|
||||||
|
<property name="value">
|
||||||
|
<number>3</number>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="3" column="0">
|
||||||
|
<widget class="QSpinBox" name="spinBox_kaze_octaves">
|
||||||
|
<property name="minimum">
|
||||||
|
<number>1</number>
|
||||||
|
</property>
|
||||||
|
<property name="maximum">
|
||||||
|
<number>16</number>
|
||||||
|
</property>
|
||||||
|
<property name="value">
|
||||||
|
<number>16</number>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="0" column="1">
|
||||||
|
<widget class="QLabel" name="label_419">
|
||||||
|
<property name="text">
|
||||||
|
<string>Set to enable extraction of extended (128-byte) descriptor.</string>
|
||||||
|
</property>
|
||||||
|
<property name="wordWrap">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
<property name="textInteractionFlags">
|
||||||
|
<set>Qt::LinksAccessibleByMouse|Qt::TextSelectableByMouse</set>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="2" column="0">
|
||||||
|
<widget class="QDoubleSpinBox" name="doubleSpinBox_kaze_threshold">
|
||||||
|
<property name="decimals">
|
||||||
|
<number>4</number>
|
||||||
|
</property>
|
||||||
|
<property name="minimum">
|
||||||
|
<double>0.000100000000000</double>
|
||||||
|
</property>
|
||||||
|
<property name="maximum">
|
||||||
|
<double>9999.000000000000000</double>
|
||||||
|
</property>
|
||||||
|
<property name="singleStep">
|
||||||
|
<double>0.001000000000000</double>
|
||||||
|
</property>
|
||||||
|
<property name="value">
|
||||||
|
<double>0.001000000000000</double>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="2" column="1">
|
||||||
|
<widget class="QLabel" name="label_418">
|
||||||
|
<property name="text">
|
||||||
|
<string>Detector response threshold to accept point.</string>
|
||||||
|
</property>
|
||||||
|
<property name="wordWrap">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
<property name="textInteractionFlags">
|
||||||
|
<set>Qt::LinksAccessibleByMouse|Qt::TextSelectableByMouse</set>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="5" column="1">
|
||||||
|
<widget class="QLabel" name="label_421">
|
||||||
|
<property name="text">
|
||||||
|
<string>Diffusivity type: 0=DIFF_PM_G1, 1=DIFF_PM_G2, 2=DIFF_WEICKERT or 3=DIFF_CHARBONNIER.</string>
|
||||||
|
</property>
|
||||||
|
<property name="wordWrap">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
<property name="textInteractionFlags">
|
||||||
|
<set>Qt::LinksAccessibleByMouse|Qt::TextSelectableByMouse</set>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="5" column="0">
|
||||||
|
<widget class="QSpinBox" name="spinBox_kaze_diffusivity">
|
||||||
|
<property name="maximum">
|
||||||
|
<number>3</number>
|
||||||
|
</property>
|
||||||
|
<property name="value">
|
||||||
|
<number>3</number>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<spacer name="verticalSpacer_65">
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Vertical</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeHint" stdset="0">
|
||||||
|
<size>
|
||||||
|
<width>20</width>
|
||||||
|
<height>2487</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</spacer>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
|
|||||||
Reference in New Issue
Block a user