1
0
mirror of https://github.com/opencv/opencv.git synced 2026-07-29 23:33:05 +04:00

made flann dependency for features2d optional

it will allow to build features2d even if flann module is not available
This commit is contained in:
Vladislav Vinogradov
2017-10-13 11:01:48 +03:00
parent 1ba29cc95d
commit 26fe8bd4f2
8 changed files with 36 additions and 3 deletions
+7
View File
@@ -392,6 +392,12 @@ void CirclesGridClusterFinder::rectifyPatternPoints(const std::vector<cv::Point2
void CirclesGridClusterFinder::parsePatternPoints(const std::vector<cv::Point2f> &patternPoints, const std::vector<cv::Point2f> &rectifiedPatternPoints, std::vector<cv::Point2f> &centers)
{
#ifndef HAVE_OPENCV_FLANN
(void)patternPoints;
(void)rectifiedPatternPoints;
(void)centers;
CV_Error(Error::StsNotImplemented, "The desired functionality requires flann module, which was disabled.");
#else
flann::LinearIndexParams flannIndexParams;
flann::Index flannIndex(Mat(rectifiedPatternPoints).reshape(1), flannIndexParams);
@@ -425,6 +431,7 @@ void CirclesGridClusterFinder::parsePatternPoints(const std::vector<cv::Point2f>
}
}
}
#endif
}
Graph::Graph(size_t n)