Tango: update to 0.11.14

This commit is contained in:
matlabbe
2017-02-05 17:24:45 -05:00
parent ce8bd9ac40
commit f7616f6e94
27 changed files with 2284 additions and 1575 deletions
+7 -4
View File
@@ -49,6 +49,9 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include <fstream>
#include <string>
#define KDTREE_SIZE 4
#define KNN_CHECKS 32
namespace rtabmap
{
@@ -362,7 +365,7 @@ void VWDictionary::update()
break;
case kNNFlannKdTree:
UASSERT_MSG(descriptor.type() == CV_32F, "To use KdTree dictionary, float descriptors are required!");
_flannIndex->buildKDTreeIndex(descriptor, 4, useDistanceL1_);
_flannIndex->buildKDTreeIndex(descriptor, KDTREE_SIZE, useDistanceL1_);
break;
case kNNFlannLSH:
UASSERT_MSG(descriptor.type() == CV_8U, "To use LSH dictionary, binary descriptors are required!");
@@ -485,7 +488,7 @@ void VWDictionary::update()
break;
case kNNFlannKdTree:
UASSERT_MSG(type == CV_32F, "To use KdTree dictionary, float descriptors are required!");
_flannIndex->buildKDTreeIndex(_dataTree, 4, useDistanceL1_);
_flannIndex->buildKDTreeIndex(_dataTree, KDTREE_SIZE, useDistanceL1_);
break;
case kNNFlannLSH:
UASSERT_MSG(type == CV_8U, "To use LSH dictionary, binary descriptors are required!");
@@ -682,7 +685,7 @@ std::list<int> VWDictionary::addNewWords(const cv::Mat & descriptorsIn,
if(_strategy == kNNFlannNaive || _strategy == kNNFlannKdTree || _strategy == kNNFlannLSH)
{
_flannIndex->knnSearch(descriptors, results, dists, k);
_flannIndex->knnSearch(descriptors, results, dists, k, KNN_CHECKS);
}
else if(_strategy == kNNBruteForce)
{
@@ -992,7 +995,7 @@ std::vector<int> VWDictionary::findNN(const cv::Mat & queryIn) const
if(_strategy == kNNFlannNaive || _strategy == kNNFlannKdTree || _strategy == kNNFlannLSH)
{
_flannIndex->knnSearch(query, results, dists, k);
_flannIndex->knnSearch(query, results, dists, k, KNN_CHECKS);
}
else if(_strategy == kNNBruteForce)
{