Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
O
opencv_contrib
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
opencv_contrib
Commits
0a8d9303
Commit
0a8d9303
authored
Jul 11, 2018
by
Alexander Alekhin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
xfeatures2d(test): disable tests with required non-free code
parent
1e096c6c
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
35 additions
and
11 deletions
+35
-11
perf_latch.cpp
modules/xfeatures2d/perf/perf_latch.cpp
+2
-0
perf_surf.cpp
modules/xfeatures2d/perf/perf_surf.cpp
+2
-0
perf_surf.cuda.cpp
modules/xfeatures2d/perf/perf_surf.cuda.cpp
+2
-2
perf_surf.ocl.cpp
modules/xfeatures2d/perf/perf_surf.ocl.cpp
+2
-2
test_detectors.cpp
modules/xfeatures2d/test/test_detectors.cpp
+3
-0
test_features2d.cpp
modules/xfeatures2d/test/test_features2d.cpp
+10
-2
test_keypoints.cpp
modules/xfeatures2d/test/test_keypoints.cpp
+3
-1
test_rotation_and_scale_invariance.cpp
...s/xfeatures2d/test/test_rotation_and_scale_invariance.cpp
+7
-0
test_surf.cuda.cpp
modules/xfeatures2d/test/test_surf.cuda.cpp
+2
-2
test_surf.ocl.cpp
modules/xfeatures2d/test/test_surf.ocl.cpp
+2
-2
No files found.
modules/xfeatures2d/perf/perf_latch.cpp
View file @
0a8d9303
...
...
@@ -11,6 +11,7 @@ typedef perf::TestBaseWithParam<std::string> latch;
"cv/detectors_descriptors_evaluation/images_datasets/leuven/img1.png",\
"stitching/a3.png"
#ifdef OPENCV_ENABLE_NONFREE
PERF_TEST_P
(
latch
,
extract
,
testing
::
Values
(
LATCH_IMAGES
))
{
string
filename
=
getDataPath
(
GetParam
());
...
...
@@ -30,5 +31,6 @@ PERF_TEST_P(latch, extract, testing::Values(LATCH_IMAGES))
SANITY_CHECK_NOTHING
();
}
#endif // NONFREE
}}
// namespace
modules/xfeatures2d/perf/perf_surf.cpp
View file @
0a8d9303
...
...
@@ -3,6 +3,7 @@
// of this distribution and at http://opencv.org/license.html.
#include "perf_precomp.hpp"
#ifdef OPENCV_ENABLE_NONFREE
namespace
opencv_test
{
namespace
{
typedef
perf
::
TestBaseWithParam
<
std
::
string
>
surf
;
...
...
@@ -64,3 +65,4 @@ PERF_TEST_P(surf, full, testing::Values(SURF_IMAGES))
}
}}
// namespace
#endif // NONFREE
modules/xfeatures2d/perf/perf_surf.cuda.cpp
View file @
0a8d9303
...
...
@@ -42,7 +42,7 @@
#include "perf_precomp.hpp"
#if
def HAVE_CUDA
#if
defined(HAVE_CUDA) && defined(OPENCV_ENABLE_NONFREE)
#include "opencv2/ts/cuda_perf.hpp"
...
...
@@ -99,4 +99,4 @@ PERF_TEST_P(Image, CUDA_SURF,
#endif // HAVE_OPENCV_CUDAARITHM
}}
// namespace
#endif // HAVE_CUDA
#endif // HAVE_CUDA
&& OPENCV_ENABLE_NONFREE
modules/xfeatures2d/perf/perf_surf.ocl.cpp
View file @
0a8d9303
...
...
@@ -45,7 +45,7 @@
#include "perf_precomp.hpp"
#if
def HAVE_OPENCV_OCL
#if
defined(HAVE_OPENCV_OCL) && defined(OPENCV_ENABLE_NONFREE)
namespace
opencv_test
{
namespace
{
...
...
@@ -105,4 +105,4 @@ PERF_TEST_P(OCL_SURF, DISABLED_without_data_transfer, testing::Values(SURF_IMAGE
}
}}
// namespace
#endif // HAVE_OPENCV_OCL
#endif // HAVE_OPENCV_OCL
&& OPENCV_ENABLE_NONFREE
modules/xfeatures2d/test/test_detectors.cpp
View file @
0a8d9303
...
...
@@ -278,12 +278,15 @@ void CV_DetectorsTest::run( int /*start_from*/ )
GaussianBlur
(
to_test
,
to_test
,
Size
(
3
,
3
),
1.5
);
vector
<
KeyPoint
>
exp
;
#ifdef OPENCV_ENABLE_NONFREE
LoadExpected
(
string
(
ts
->
get_data_path
())
+
"detectors/surf.xml"
,
exp
);
if
(
exp
.
empty
())
return
;
if
(
!
testDetector
(
to_test
,
SURF
::
create
(
1536
+
512
+
512
,
2
,
2
,
true
,
false
),
exp
))
return
;
#endif
LoadExpected
(
string
(
ts
->
get_data_path
())
+
"detectors/star.xml"
,
exp
);
if
(
exp
.
empty
())
...
...
modules/xfeatures2d/test/test_features2d.cpp
View file @
0a8d9303
...
...
@@ -987,7 +987,7 @@ void CV_DescriptorMatcherTest::run( int )
* Detectors
*/
#ifdef OPENCV_ENABLE_NONFREE
TEST
(
Features2d_Detector_SIFT
,
regression
)
{
CV_FeatureDetectorTest
test
(
"detector-sift"
,
SIFT
::
create
()
);
...
...
@@ -999,6 +999,7 @@ TEST( Features2d_Detector_SURF, regression )
CV_FeatureDetectorTest
test
(
"detector-surf"
,
SURF
::
create
()
);
test
.
safe_run
();
}
#endif
TEST
(
Features2d_Detector_STAR
,
regression
)
{
...
...
@@ -1027,6 +1028,7 @@ TEST( Features2d_Detector_Harris_Laplace_Affine, regression )
/*
* Descriptors
*/
#ifdef OPENCV_ENABLE_NONFREE
TEST
(
Features2d_DescriptorExtractor_SIFT
,
regression
)
{
CV_DescriptorExtractorTest
<
L1
<
float
>
>
test
(
"descriptor-sift"
,
1.0
f
,
...
...
@@ -1064,6 +1066,7 @@ TEST( Features2d_DescriptorExtractor_SURF_OCL, regression )
cv
::
ocl
::
setUseOpenCL
(
useOCL
);
}
#endif
#endif // NONFREE
TEST
(
Features2d_DescriptorExtractor_DAISY
,
regression
)
{
...
...
@@ -1204,7 +1207,7 @@ TEST( Features2d_DescriptorExtractor_Calonder_float, regression )
test.safe_run();
}
#endif*/
// CV_SSE2
#ifdef OPENCV_ENABLE_NONFREE
TEST
(
Features2d_BruteForceDescriptorMatcher_knnMatch
,
regression
)
{
const
int
sz
=
100
;
...
...
@@ -1254,6 +1257,7 @@ TEST(Features2d_BruteForceDescriptorMatcher_knnMatch, regression)
}
}
}
#endif
/*TEST(Features2d_DescriptorExtractorParamTest, regression)
{
...
...
@@ -1330,8 +1334,10 @@ protected:
Ptr
<
Feature2D
>
f2d
;
};
#ifdef OPENCV_ENABLE_NONFREE
TEST
(
Features2d_SIFTHomographyTest
,
regression
)
{
CV_DetectPlanarTest
test
(
"SIFT"
,
80
,
SIFT
::
create
());
test
.
safe_run
();
}
TEST
(
Features2d_SURFHomographyTest
,
regression
)
{
CV_DetectPlanarTest
test
(
"SURF"
,
80
,
SURF
::
create
());
test
.
safe_run
();
}
#endif
class
FeatureDetectorUsingMaskTest
:
public
cvtest
::
BaseTest
{
...
...
@@ -1394,6 +1400,7 @@ protected:
Ptr
<
FeatureDetector
>
featureDetector_
;
};
#ifdef OPENCV_ENABLE_NONFREE
TEST
(
Features2d_SIFT_using_mask
,
regression
)
{
FeatureDetectorUsingMaskTest
test
(
SIFT
::
create
());
...
...
@@ -1433,5 +1440,6 @@ TEST( XFeatures2d_DescriptorExtractor, batch )
EXPECT_GT
(
descriptors
[
i
].
rows
,
100
);
}
}
#endif // NONFREE
}}
// namespace
modules/xfeatures2d/test/test_keypoints.cpp
View file @
0a8d9303
...
...
@@ -115,7 +115,7 @@ protected:
// Registration of tests
#ifdef OPENCV_ENABLE_NONFREE
TEST
(
Features2d_Detector_Keypoints_SURF
,
validation
)
{
CV_FeatureDetectorKeypointsTest
test
(
xfeatures2d
::
SURF
::
create
());
...
...
@@ -127,6 +127,8 @@ TEST(Features2d_Detector_Keypoints_SIFT, validation)
CV_FeatureDetectorKeypointsTest
test
(
xfeatures2d
::
SIFT
::
create
());
test
.
safe_run
();
}
#endif // NONFREE
TEST
(
Features2d_Detector_Keypoints_Star
,
validation
)
{
...
...
modules/xfeatures2d/test/test_rotation_and_scale_invariance.cpp
View file @
0a8d9303
...
...
@@ -610,6 +610,7 @@ protected:
/*
* Detector's rotation invariance check
*/
#ifdef OPENCV_ENABLE_NONFREE
TEST
(
Features2d_RotationInvariance_Detector_SURF
,
regression
)
{
DetectorRotationInvarianceTest
test
(
SURF
::
create
(),
...
...
@@ -655,6 +656,7 @@ TEST(Features2d_RotationInvariance_Descriptor_LATCH, regression)
0.9999
f
);
test
.
safe_run
();
}
#endif // NONFREE
TEST
(
DISABLED_Features2d_RotationInvariance_Descriptor_DAISY
,
regression
)
{
...
...
@@ -701,6 +703,7 @@ TEST(Features2d_RotationInvariance_Descriptor_VGG48, regression)
test
.
safe_run
();
}
#ifdef OPENCV_ENABLE_NONFREE
TEST
(
Features2d_RotationInvariance_Descriptor_BRIEF_64
,
regression
)
{
DescriptorRotationInvarianceTest
test
(
SURF
::
create
(),
...
...
@@ -870,6 +873,8 @@ TEST(Features2d_RotationInvariance2_Detector_SURF, regression)
}
}
#endif // NONFREE
TEST
(
DISABLED_Features2d_ScaleInvariance_Descriptor_DAISY
,
regression
)
{
DescriptorScaleInvarianceTest
test
(
BRISK
::
create
(),
...
...
@@ -915,6 +920,7 @@ TEST(Features2d_ScaleInvariance_Descriptor_VGG48, regression)
test
.
safe_run
();
}
#ifdef OPENCV_ENABLE_NONFREE
TEST
(
Features2d_ScaleInvariance_Descriptor_BoostDesc_BGM
,
regression
)
{
DescriptorScaleInvarianceTest
test
(
SURF
::
create
(),
...
...
@@ -977,5 +983,6 @@ TEST(Features2d_ScaleInvariance_Descriptor_BoostDesc_BINBOOST_256, regression)
0.98
f
);
test
.
safe_run
();
}
#endif // NONFREE
}}
// namespace
modules/xfeatures2d/test/test_surf.cuda.cpp
View file @
0a8d9303
...
...
@@ -42,7 +42,7 @@
#include "test_precomp.hpp"
#if
def HAVE_CUDA
#if
defined(HAVE_CUDA) && defined(OPENCV_ENABLE_NONFREE)
namespace
opencv_test
{
namespace
{
...
...
@@ -181,4 +181,4 @@ INSTANTIATE_TEST_CASE_P(CUDA_Features2D, SURF, testing::Combine(
#endif // HAVE_OPENCV_CUDAARITHM
}}
// namespace
#endif // HAVE_CUDA
#endif // HAVE_CUDA
&& OPENCV_ENABLE_NONFREE
modules/xfeatures2d/test/test_surf.ocl.cpp
View file @
0a8d9303
...
...
@@ -45,7 +45,7 @@
#include "test_precomp.hpp"
#if
def HAVE_OPENCL
#if
defined(HAVE_OPENCL) && defined(OPENCV_ENABLE_NONFREE)
namespace
opencv_test
{
namespace
{
...
...
@@ -200,4 +200,4 @@ INSTANTIATE_TEST_CASE_P(OCL_Features2D, SURF, testing::Combine(
}}
// namespace
#endif // HAVE_OPENCL
#endif // HAVE_OPENCL
&& OPENCV_ENABLE_NONFREE
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment