From 3ab5a4f1d9aa04483cf36470a2aba4e58fa98fe1 Mon Sep 17 00:00:00 2001
From: asantamaria <asantamaria@iri.upc.edu>
Date: Wed, 9 Aug 2017 16:15:53 +0200
Subject: [PATCH] added latch descriptor

---
 src/CMakeLists.txt               | 7 +++++--
 src/examples/test_descriptor.cpp | 6 +++---
 src/vision_utils.h               | 2 ++
 3 files changed, 10 insertions(+), 5 deletions(-)

diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 780d6fe..30fd52c 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -41,7 +41,9 @@ SET(sources
 	descriptors/kaze/descriptor_kaze.cpp
 	descriptors/kaze/descriptor_kaze_load_yaml.cpp
 	descriptors/akaze/descriptor_akaze.cpp
-	descriptors/akaze/descriptor_akaze_load_yaml.cpp	
+	descriptors/akaze/descriptor_akaze_load_yaml.cpp
+	descriptors/latch/descriptor_latch.cpp
+	descriptors/latch/descriptor_latch_load_yaml.cpp	
 	matchers/matcher_base.cpp )
 
 # application header files
@@ -72,7 +74,8 @@ SET(headers
 	descriptors/surf/descriptor_surf.h
 	descriptors/brisk/descriptor_brisk.h
 	descriptors/kaze/descriptor_kaze.h	
-	descriptors/akaze/descriptor_akaze.h		
+	descriptors/akaze/descriptor_akaze.h
+	descriptors/latch/descriptor_latch.h
 	matchers/matcher_factory.h
 	matchers/matcher_base.h)
 
diff --git a/src/examples/test_descriptor.cpp b/src/examples/test_descriptor.cpp
index 6a27f49..22bf08d 100644
--- a/src/examples/test_descriptor.cpp
+++ b/src/examples/test_descriptor.cpp
@@ -28,7 +28,7 @@
 #include "../descriptors/brisk/descriptor_brisk.h"
 #include "../descriptors/kaze/descriptor_kaze.h"
 #include "../descriptors/akaze/descriptor_akaze.h"
-//#include "../descriptors/latch/descriptor_latch.h"
+#include "../descriptors/latch/descriptor_latch.h"
 //#include "../descriptors/freak/descriptor_freak.h"
 //#include "../descriptors/brief/descriptor_brief.h"
 //#include "../descriptors/daisy/descriptor_daisy.h"
@@ -102,8 +102,8 @@ int main(void)
     	des_ptr = std::static_pointer_cast<DescriptorKAZE>(des_ptr);
     else if (des_name.compare("AKAZE") == 0)
     	des_ptr = std::static_pointer_cast<DescriptorAKAZE>(des_ptr);
-//    else if (des_name.compare("LATCH") == 0)
-//    	des_ptr = std::static_pointer_cast<DescriptorLATCH>(des_ptr);
+    else if (des_name.compare("LATCH") == 0)
+    	des_ptr = std::static_pointer_cast<DescriptorLATCH>(des_ptr);
 //    else if (des_name.compare("FREAK") == 0)
 //    	des_ptr = std::static_pointer_cast<DescriptorFREAK>(des_ptr);
 //    else if (des_name.compare("BRIEF") == 0)
diff --git a/src/vision_utils.h b/src/vision_utils.h
index 1d23220..435415e 100644
--- a/src/vision_utils.h
+++ b/src/vision_utils.h
@@ -24,7 +24,9 @@ using namespace boost::assign; // bring 'operator+=()' into scope
 #include <opencv2/imgproc/imgproc.hpp>
 #include <opencv2/highgui/highgui.hpp>
 #include <opencv2/features2d/features2d.hpp>
+#include <opencv2/features2d.hpp>
 #include <opencv2/xfeatures2d/nonfree.hpp>
+#include <opencv2/xfeatures2d.hpp>
 #include <opencv2/line_descriptor/descriptor.hpp>
 
 typedef std::vector<cv::KeyPoint> KeyPointVector;
-- 
GitLab