summaryrefslogtreecommitdiff
blob: 8f7f9ee269cd4ba33cabc2a55d176031323b8c23 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
Index: ViSP-2.10.0/src/key-point/vpKeyPoint.h
===================================================================
--- ViSP-2.10.0.orig/src/key-point/vpKeyPoint.h
+++ ViSP-2.10.0/src/key-point/vpKeyPoint.h
@@ -494,6 +494,7 @@ public:
     initDetector(detectorName);
   }
 
+#if (VISP_HAVE_OPENCV_VERSION >= 0x020400 && VISP_HAVE_OPENCV_VERSION < 0x030000)
   /*!
     Template function to set to a \p parameterName a value for a specific detector named by his \p detectorName.
 
@@ -507,6 +508,7 @@ public:
       m_detectors[detectorName]->set(parameterName, value);
     }
   }
+#endif
 
   /*!
      Set and initialize a list of detectors denominated by their names \p detectorNames.
@@ -532,6 +534,7 @@ public:
     initExtractor(extractorName);
   }
 
+#if (VISP_HAVE_OPENCV_VERSION >= 0x020400 && VISP_HAVE_OPENCV_VERSION < 0x030000)
   /*!
     Template function to set to a \p parameterName a value for a specific extractor named by his \p extractorName.
 
@@ -545,6 +548,7 @@ public:
       m_extractors[extractorName]->set(parameterName, value);
     }
   }
+#endif
 
   /*!
      Set and initialize a list of extractors denominated by their names \p extractorNames.
@@ -700,7 +704,7 @@ public:
     m_useAffineDetection = useAffine;
   }
 
-#if (VISP_HAVE_OPENCV_VERSION >= 0x020400)
+#if (VISP_HAVE_OPENCV_VERSION >= 0x020400 && VISP_HAVE_OPENCV_VERSION < 0x030000)
   /*!
     Set if cross check method must be used to eliminate some false matches with a brute-force matching method.
 
Index: ViSP-2.10.0/src/key-point/vpKeyPoint.cpp
===================================================================
--- ViSP-2.10.0.orig/src/key-point/vpKeyPoint.cpp
+++ ViSP-2.10.0/src/key-point/vpKeyPoint.cpp
@@ -868,7 +868,7 @@ void vpKeyPoint::detect(const vpImage<un
                       (int) rectangle.getBottom());
     cv::rectangle(mask, leftTop, rightBottom, cv::Scalar(255), CV_FILLED);
   } else {
-    mask = cv::Mat::ones(matImg.rows, matImg.cols, CV_8U);
+    mask = cv::Mat::ones(matImg.rows, matImg.cols, CV_8U) * 255;
   }
 
   detect(matImg, keyPoints, elapsedTime, mask);
@@ -1544,7 +1544,7 @@ void vpKeyPoint::initExtractors(const st
 void vpKeyPoint::initMatcher(const std::string &matcherName) {
   m_matcher = cv::DescriptorMatcher::create(matcherName);
 
-#if (VISP_HAVE_OPENCV_VERSION >= 0x020400)
+#if (VISP_HAVE_OPENCV_VERSION >= 0x020400 && VISP_HAVE_OPENCV_VERSION < 0x030000)
   if(m_matcher != NULL && !m_useKnn && matcherName == "BruteForce") {
     m_matcher->set("crossCheck", m_useBruteForceCrossCheck);
   }