mirror of
https://github.com/introlab/rtabmap.git
synced 2026-09-03 01:50:24 +08:00
VWDictionary: Ignore kdtree strategy when RTAB-Map is not build with OpenCV nonfree module
Updated parameter LccReextract/MaxWords=600 git-svn-id: http://rtabmap.googlecode.com/svn/trunk/rtabmap@2072 f169173b-cf89-36c8-b27e-44dbe73f0c83
This commit is contained in:
@@ -336,7 +336,7 @@ class RTABMAP_EXP Parameters
|
|||||||
RTABMAP_PARAM(LccReextract, NNType, int, 3, "kNNFlannNaive=0, kNNFlannKdTree=1, kNNFlannLSH=2, kNNBruteForce=3, kNNBruteForceGPU=4.");
|
RTABMAP_PARAM(LccReextract, NNType, int, 3, "kNNFlannNaive=0, kNNFlannKdTree=1, kNNFlannLSH=2, kNNBruteForce=3, kNNBruteForceGPU=4.");
|
||||||
RTABMAP_PARAM(LccReextract, NNDR, float, 0.7, "NNDR: nearest neighbor distance ratio.");
|
RTABMAP_PARAM(LccReextract, NNDR, float, 0.7, "NNDR: nearest neighbor distance ratio.");
|
||||||
RTABMAP_PARAM(LccReextract, FeatureType, int, 4, "0=SURF 1=SIFT 2=ORB 3=FAST/FREAK 4=FAST/BRIEF 5=GFTT/FREAK 6=GFTT/BRIEF 7=BRISK.");
|
RTABMAP_PARAM(LccReextract, FeatureType, int, 4, "0=SURF 1=SIFT 2=ORB 3=FAST/FREAK 4=FAST/BRIEF 5=GFTT/FREAK 6=GFTT/BRIEF 7=BRISK.");
|
||||||
RTABMAP_PARAM(LccReextract, MaxWords, int, 0, "0 no limits.");
|
RTABMAP_PARAM(LccReextract, MaxWords, int, 600, "0 no limits.");
|
||||||
|
|
||||||
RTABMAP_PARAM(LccIcp3, Decimation, int, 8, "Depth image decimation.");
|
RTABMAP_PARAM(LccIcp3, Decimation, int, 8, "Depth image decimation.");
|
||||||
RTABMAP_PARAM(LccIcp3, MaxDepth, float, 4.0, "Max cloud depth.");
|
RTABMAP_PARAM(LccIcp3, MaxDepth, float, 4.0, "Max cloud depth.");
|
||||||
|
|||||||
@@ -53,7 +53,7 @@ VWDictionary::VWDictionary(const ParametersMap & parameters) :
|
|||||||
_newWordsComparedTogether(Parameters::defaultKpNewWordsComparedTogether()),
|
_newWordsComparedTogether(Parameters::defaultKpNewWordsComparedTogether()),
|
||||||
_lastWordId(0),
|
_lastWordId(0),
|
||||||
_flannIndex(new cv::flann::Index()),
|
_flannIndex(new cv::flann::Index()),
|
||||||
_strategy(kNNUndef)
|
_strategy(kNNBruteForce)
|
||||||
{
|
{
|
||||||
this->setNNStrategy((NNStrategy)Parameters::defaultKpNNStrategy());
|
this->setNNStrategy((NNStrategy)Parameters::defaultKpNNStrategy());
|
||||||
this->parseParameters(parameters);
|
this->parseParameters(parameters);
|
||||||
@@ -222,7 +222,16 @@ void VWDictionary::setNNStrategy(NNStrategy strategy)
|
|||||||
strategy = kNNBruteForce;
|
strategy = kNNBruteForce;
|
||||||
}
|
}
|
||||||
|
|
||||||
_strategy = strategy;
|
if(RTABMAP_NONFREE == 0 && strategy == kNNFlannKdTree)
|
||||||
|
{
|
||||||
|
UWARN("KdTree (%d) nearest neighbor is not available because RTAB-Map isn't built "
|
||||||
|
"with OpenCV nonfree module (KdTree only used for SURF/SIFT features). "
|
||||||
|
"NN strategy is not modified (current=%d).", (int)kNNFlannKdTree, (int)_strategy);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
_strategy = strategy;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user