mirror of
https://github.com/opencv/opencv.git
synced 2026-07-31 08:13:04 +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:
@@ -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> ¢ers)
|
||||
{
|
||||
#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)
|
||||
|
||||
@@ -468,6 +468,8 @@ bool CV_ChessboardDetectorTest::checkByGenerator()
|
||||
TEST(Calib3d_ChessboardDetector, accuracy) { CV_ChessboardDetectorTest test( CHESSBOARD ); test.safe_run(); }
|
||||
TEST(Calib3d_CirclesPatternDetector, accuracy) { CV_ChessboardDetectorTest test( CIRCLES_GRID ); test.safe_run(); }
|
||||
TEST(Calib3d_AsymmetricCirclesPatternDetector, accuracy) { CV_ChessboardDetectorTest test( ASYMMETRIC_CIRCLES_GRID ); test.safe_run(); }
|
||||
#ifdef HAVE_OPENCV_FLANN
|
||||
TEST(Calib3d_AsymmetricCirclesPatternDetectorWithClustering, accuracy) { CV_ChessboardDetectorTest test( ASYMMETRIC_CIRCLES_GRID, CALIB_CB_CLUSTERING ); test.safe_run(); }
|
||||
#endif
|
||||
|
||||
/* End of file. */
|
||||
|
||||
Reference in New Issue
Block a user