From 74b51996332231b76ad898aa78c235b56319d8dc Mon Sep 17 00:00:00 2001
From: asantamaria <asantamaria@iri.upc.edu>
Date: Thu, 26 Apr 2018 22:23:36 +0200
Subject: [PATCH] API upgrade to use ANMS

---
 src/CMakeLists.txt                                            | 4 ++--
 src/algorithms/anms/anms.h                                    | 2 +-
 .../anms/{range-tree/lrtypes.h => range_tree_lrtypes.h}       | 0
 .../anms/{range-tree/ranget.h => range_tree_ranget.h}         | 2 +-
 src/vision_utils.cpp                                          | 2 --
 5 files changed, 4 insertions(+), 6 deletions(-)
 rename src/algorithms/anms/{range-tree/lrtypes.h => range_tree_lrtypes.h} (100%)
 rename src/algorithms/anms/{range-tree/ranget.h => range_tree_ranget.h} (99%)

diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index d00212e..962e4da 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -192,8 +192,8 @@ SET(headers_alg_activesearch
 SET(headers_alg_residualtrilinearity	
 	algorithms/residualtrilinearity/alg_residualtrilinearity.h)	
 SET(headers_alg_anms
-	algorithms/anms/range-tree/lrtypes.h
-	algorithms/anms/range-tree/ranget.h
+	algorithms/anms/range_tree_lrtypes.h
+	algorithms/anms/range_tree_ranget.h
     algorithms/anms/nanoflann.hpp	
 	algorithms/anms/anms.h)	
 
diff --git a/src/algorithms/anms/anms.h b/src/algorithms/anms/anms.h
index b1cba93..3cb2d17 100644
--- a/src/algorithms/anms/anms.h
+++ b/src/algorithms/anms/anms.h
@@ -5,7 +5,7 @@
 #include <stdlib.h>
 #include <opencv2/opencv.hpp>
 #include "nanoflann.hpp"
-#include "range-tree/ranget.h"
+#include "range_tree_ranget.h"
 
 namespace vision_utils {
 
diff --git a/src/algorithms/anms/range-tree/lrtypes.h b/src/algorithms/anms/range_tree_lrtypes.h
similarity index 100%
rename from src/algorithms/anms/range-tree/lrtypes.h
rename to src/algorithms/anms/range_tree_lrtypes.h
diff --git a/src/algorithms/anms/range-tree/ranget.h b/src/algorithms/anms/range_tree_ranget.h
similarity index 99%
rename from src/algorithms/anms/range-tree/ranget.h
rename to src/algorithms/anms/range_tree_ranget.h
index 0d6e157..fc9fe0d 100644
--- a/src/algorithms/anms/range-tree/ranget.h
+++ b/src/algorithms/anms/range_tree_ranget.h
@@ -18,7 +18,7 @@
 #ifndef LIBRANGET
 #define LIBRANGET
 
-#include "lrtypes.h"
+#include "range_tree_lrtypes.h"
 
 /* The following block ships the data away and uses an offset to access it.
    It's only used on 64-bit platforms where 64-bit pointers are the majority
diff --git a/src/vision_utils.cpp b/src/vision_utils.cpp
index 177f94a..9fcc439 100644
--- a/src/vision_utils.cpp
+++ b/src/vision_utils.cpp
@@ -27,7 +27,6 @@ void sortByResponse(const KeyPointVector& _kps_in, KeyPointVector& _kps_out, con
 {
     assert(!_kps_in.empty() && "[vision_utils]: sortByResponse failed. Input KeyPoints vector is empty.");
     assert(_kps_out.empty() && "[vision_utils]: sortByResponse failed. Output KeyPoints vector is not empty.");
-    assert((_type==CV_SORT_ASCENDING || _type == CV_SORT_DESCENDING) && "[vision_utils]: sortByResponse failed. Sort type currently not implemented.");
 
     std::vector<int> Indx = sortByResponse(_kps_in, _type);
     for (unsigned int ii = 0; ii < _kps_in.size(); ii++)
@@ -44,7 +43,6 @@ void sortByResponse(const KeyPointVector& _kps_in, KeyPointVector& _kps_out, con
 {
     assert(!_kps_in.empty() && "[vision_utils]: sortByResponse failed. Input KeyPoints vector is empty.");
     assert(_kps_out.empty() && "[vision_utils]: sortByResponse failed. Output KeyPoints vector is not empty.");
-    assert((_type==CV_SORT_ASCENDING || _type == CV_SORT_DESCENDING) && "[vision_utils]: sortByResponse failed. Sort type currently not implemented.");
 
     std::vector<int> Indx = sortByResponse(_kps_in, _type);
 
-- 
GitLab