aballier 15/07/15 18:12:04 Added: opencv3.patch Log: backport upstream patch to build with opencv3 (Portage version: 2.2.20/cvs/Linux x86_64, signed Manifest commit with key 160F534A)
Revision Changes Path 1.1 sci-libs/ViSP/files/opencv3.patch file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sci-libs/ViSP/files/opencv3.patch?rev=1.1&view=markup plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sci-libs/ViSP/files/opencv3.patch?rev=1.1&content-type=text/plain Index: opencv3.patch =================================================================== 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); }
