mirror of
https://github.com/introlab/rtabmap.git
synced 2026-10-06 18:17:47 +08:00
Fix possible staled flann index (#1742)
* Fix possible staled flann index * fixed compatible crc flann index after repair and reload * Added tests * test coverage * testing another possible branch * removed doxygen tag version not opulated yet * updated codedev to ignore test code * Disabled all mac intel ci flaky builds
This commit is contained in:
@@ -118,10 +118,7 @@ void VWDictionary::parseParameters(const ParametersMap & parameters)
|
||||
if(!treeUpdated && byteToFloat!=_byteToFloat && _strategy == kNNFlannKdTree)
|
||||
{
|
||||
UINFO("KDTree: Binary to Float conversion approach has changed, re-initialize kd-tree.");
|
||||
_dataTree = cv::Mat();
|
||||
_notIndexedWords = uKeysSet(_visualWords);
|
||||
_removedIndexedWords.clear();
|
||||
this->update();
|
||||
this->rebuildIndex();
|
||||
}
|
||||
|
||||
if(incrementalDictionary)
|
||||
@@ -296,6 +293,15 @@ bool VWDictionary::isModified() const
|
||||
return _modified;
|
||||
}
|
||||
|
||||
void VWDictionary::rebuildIndex()
|
||||
{
|
||||
UDEBUG("Re-indexing all %ld words...", _visualWords.size());
|
||||
_dataTree = cv::Mat();
|
||||
_notIndexedWords = uKeysSet(_visualWords);
|
||||
_removedIndexedWords.clear();
|
||||
this->update();
|
||||
}
|
||||
|
||||
bool VWDictionary::setNNStrategy(NNStrategy strategy)
|
||||
{
|
||||
#if CV_MAJOR_VERSION < 3
|
||||
|
||||
Reference in New Issue
Block a user