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:
@@ -536,12 +536,14 @@ TEST( Features2d_DescriptorMatcher_BruteForce, regression )
|
||||
test.safe_run();
|
||||
}
|
||||
|
||||
#ifdef HAVE_OPENCV_FLANN
|
||||
TEST( Features2d_DescriptorMatcher_FlannBased, regression )
|
||||
{
|
||||
CV_DescriptorMatcherTest test( "descriptor-matcher-flann-based",
|
||||
DescriptorMatcher::create("FlannBased"), 0.04f );
|
||||
test.safe_run();
|
||||
}
|
||||
#endif
|
||||
|
||||
TEST( Features2d_DMatch, read_write )
|
||||
{
|
||||
|
||||
@@ -49,7 +49,9 @@
|
||||
|
||||
using namespace std;
|
||||
using namespace cv;
|
||||
#ifdef HAVE_OPENCV_FLANN
|
||||
using namespace cv::flann;
|
||||
#endif
|
||||
|
||||
//--------------------------------------------------------------------------------
|
||||
class NearestNeighborTest : public cvtest::BaseTest
|
||||
@@ -158,6 +160,8 @@ void NearestNeighborTest::run( int /*start_from*/ ) {
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------
|
||||
#ifdef HAVE_OPENCV_FLANN
|
||||
|
||||
class CV_FlannTest : public NearestNeighborTest
|
||||
{
|
||||
public:
|
||||
@@ -331,3 +335,5 @@ TEST(Features2d_FLANN_KDTree, regression) { CV_FlannKDTreeIndexTest test; test.s
|
||||
TEST(Features2d_FLANN_Composite, regression) { CV_FlannCompositeIndexTest test; test.safe_run(); }
|
||||
TEST(Features2d_FLANN_Auto, regression) { CV_FlannAutotunedIndexTest test; test.safe_run(); }
|
||||
TEST(Features2d_FLANN_Saved, regression) { CV_FlannSavedIndexTest test; test.safe_run(); }
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user