mirror of
https://github.com/microsoft/vcpkg.git
synced 2025-01-20 15:33:03 +08:00
d1e47dbd68
* [rtabmap] Update to 0.20.16. * Update versions.
48 lines
2.9 KiB
Diff
48 lines
2.9 KiB
Diff
diff --git a/corelib/src/MarkerDetector.cpp b/corelib/src/MarkerDetector.cpp
|
|
--- a/corelib/src/MarkerDetector.cpp
|
|
+++ b/corelib/src/MarkerDetector.cpp
|
|
@@ -39,12 +39,16 @@ MarkerDetector::MarkerDetector(const ParametersMap & parameters)
|
|
maxRange_ = Parameters::defaultMarkerMaxRange();
|
|
minRange_ = Parameters::defaultMarkerMinRange();
|
|
dictionaryId_ = Parameters::defaultMarkerDictionary();
|
|
-#if CV_MAJOR_VERSION > 3 || (CV_MAJOR_VERSION == 3 && CV_MINOR_VERSION >=2)
|
|
+#if CV_MAJOR_VERSION > 4 || (CV_MAJOR_VERSION == 4 && CV_MINOR_VERSION >= 7)
|
|
+ detectorParams_.reset(new cv::aruco::DetectorParameters());
|
|
+#elif CV_MAJOR_VERSION > 3 || (CV_MAJOR_VERSION == 3 && CV_MINOR_VERSION >=2)
|
|
detectorParams_ = cv::aruco::DetectorParameters::create();
|
|
#else
|
|
detectorParams_.reset(new cv::aruco::DetectorParameters());
|
|
#endif
|
|
-#if CV_MAJOR_VERSION > 3 || (CV_MAJOR_VERSION == 3 && CV_MINOR_VERSION >=3)
|
|
+#if CV_MAJOR_VERSION > 4 || (CV_MAJOR_VERSION == 4 && CV_MINOR_VERSION >= 7)
|
|
+ detectorParams_->cornerRefinementMethod = (cv::aruco::CornerRefineMethod) Parameters::defaultMarkerCornerRefinementMethod();
|
|
+#elif CV_MAJOR_VERSION > 3 || (CV_MAJOR_VERSION == 3 && CV_MINOR_VERSION >=3)
|
|
detectorParams_->cornerRefinementMethod = Parameters::defaultMarkerCornerRefinementMethod();
|
|
#else
|
|
detectorParams_->doCornerRefinement = Parameters::defaultMarkerCornerRefinementMethod()!=0;
|
|
@@ -70,7 +74,11 @@ void MarkerDetector::parseParameters(const ParametersMap & parameters)
|
|
detectorParams_->minCornerDistanceRate = 0.05;
|
|
detectorParams_->minDistanceToBorder = 3;
|
|
detectorParams_->minMarkerDistanceRate = 0.05;
|
|
-#if CV_MAJOR_VERSION > 3 || (CV_MAJOR_VERSION == 3 && CV_MINOR_VERSION >=3)
|
|
+#if CV_MAJOR_VERSION > 4 || (CV_MAJOR_VERSION == 4 && CV_MINOR_VERSION >= 7)
|
|
+ int cornerRefinementMethod;
|
|
+ Parameters::parse(parameters, Parameters::kMarkerCornerRefinementMethod(), cornerRefinementMethod);
|
|
+ detectorParams_->cornerRefinementMethod = (cv::aruco::CornerRefineMethod)cornerRefinementMethod;
|
|
+#elif CV_MAJOR_VERSION > 3 || (CV_MAJOR_VERSION == 3 && CV_MINOR_VERSION >=3)
|
|
Parameters::parse(parameters, Parameters::kMarkerCornerRefinementMethod(), detectorParams_->cornerRefinementMethod);
|
|
#else
|
|
int doCornerRefinement = detectorParams_->doCornerRefinement?1:0;
|
|
@@ -103,7 +111,10 @@ void MarkerDetector::parseParameters(const ParametersMap & parameters)
|
|
dictionaryId_ = Parameters::defaultMarkerDictionary();
|
|
}
|
|
#endif
|
|
-#if CV_MAJOR_VERSION > 3 || (CV_MAJOR_VERSION == 3 && CV_MINOR_VERSION >=2)
|
|
+#if CV_MAJOR_VERSION > 4 || (CV_MAJOR_VERSION == 4 && CV_MINOR_VERSION >= 7)
|
|
+ dictionary_.reset(new cv::aruco::Dictionary());
|
|
+ *dictionary_ = cv::aruco::getPredefinedDictionary(cv::aruco::PredefinedDictionaryType(dictionaryId_));
|
|
+#elif CV_MAJOR_VERSION > 3 || (CV_MAJOR_VERSION == 3 && CV_MINOR_VERSION >=2)
|
|
dictionary_ = cv::aruco::getPredefinedDictionary(cv::aruco::PREDEFINED_DICTIONARY_NAME(dictionaryId_));
|
|
#else
|
|
dictionary_.reset(new cv::aruco::Dictionary());
|