From d96ee8b6b37edf9ec8e135fcb2d2720973c00a4e Mon Sep 17 00:00:00 2001
From: asantamaria <asantamaria@iri.upc.edu>
Date: Tue, 22 Aug 2017 09:45:22 +0200
Subject: [PATCH] Modify headers depending on OpenCV major version

---
 src/processor_image_feature.h  | 17 ++++++++++-------
 src/processor_image_landmark.h | 14 ++++++++++----
 2 files changed, 20 insertions(+), 11 deletions(-)

diff --git a/src/processor_image_feature.h b/src/processor_image_feature.h
index ac1e5786d..69f1444f3 100644
--- a/src/processor_image_feature.h
+++ b/src/processor_image_feature.h
@@ -11,19 +11,22 @@
 #include "constraint_epipolar.h"
 #include "processor_image_params.h"
 
-
 // OpenCV includes
-#include "opencv2/features2d/features2d.hpp"
-#include <opencv2/highgui/highgui.hpp>
-#include <opencv2/core/core.hpp>
-
+#if defined (HAVE_OPENCV3)
+	#include <opencv2/features2d.hpp>
+	#include <opencv2/highgui.hpp>
+	#include <opencv2/core.hpp>
+	#include <opencv2/imgproc.hpp>
+#else
+	#include <opencv2/features2d/features2d.hpp>
+	#include <opencv2/highgui/highgui.hpp>
+	#include <opencv2/core/core.hpp>
+#endif
 
 // General includes
 #include <cmath>
 #include <complex>      // std::complex, std::norm
 
-
-
 namespace wolf {
     
 WOLF_PTR_TYPEDEFS(ProcessorImageFeature);
diff --git a/src/processor_image_landmark.h b/src/processor_image_landmark.h
index dced57e45..91c1e8851 100644
--- a/src/processor_image_landmark.h
+++ b/src/processor_image_landmark.h
@@ -14,10 +14,16 @@
 #include "constraint_AHP.h"
 
 // OpenCV includes
-#include "opencv2/features2d/features2d.hpp"
-#include <opencv2/highgui/highgui.hpp>
-#include <opencv2/core/core.hpp>
-
+#if defined (HAVE_OPENCV3)
+	#include <opencv2/features2d.hpp>
+	#include <opencv2/highgui.hpp>
+	#include <opencv2/core.hpp>
+	#include <opencv2/imgproc.hpp>
+#else
+	#include <opencv2/features2d/features2d.hpp>
+	#include <opencv2/highgui/highgui.hpp>
+	#include <opencv2/core/core.hpp>
+#endif
 
 // General includes
 #include <cmath>
-- 
GitLab