From 330b3e87eb4817f957aeae1afa1ec3c5b99b4be9 Mon Sep 17 00:00:00 2001 From: Maksim Shabunin Date: Tue, 26 May 2015 15:57:07 +0300 Subject: [PATCH] Fixed latch sample build without contrib --- .../tutorial_code/xfeatures2D/LATCH_match.cpp | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/samples/cpp/tutorial_code/xfeatures2D/LATCH_match.cpp b/samples/cpp/tutorial_code/xfeatures2D/LATCH_match.cpp index a9413b871b..2fd0bb9b3a 100644 --- a/samples/cpp/tutorial_code/xfeatures2D/LATCH_match.cpp +++ b/samples/cpp/tutorial_code/xfeatures2D/LATCH_match.cpp @@ -1,9 +1,14 @@ +#include + +#include "opencv2/opencv_modules.hpp" + +#ifdef HAVE_OPENCV_XFEATURES2D + #include #include #include #include #include -#include // If you find this code useful, please add a reference to the following paper in your work: // Gil Levi and Tal Hassner, "LATCH: Learned Arrangements of Three Patch Codes", arXiv preprint arXiv:1501.03719, 15 Jan. 2015 @@ -90,3 +95,13 @@ int main(void) cout << endl; return 0; } + +#else + +int main() +{ + std::cerr << "OpenCV was built without xfeatures2d module" << std::endl; + return 0; +} + +#endif -- GitLab