Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
O
opencv
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
Commits
11ce8683
Commit
11ce8683
authored
Apr 18, 2012
by
Andrey Kamaev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed stitching module tests built without nonfree
parent
dda338a7
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
24 additions
and
3 deletions
+24
-3
perf_stich.cpp
modules/stitching/perf/perf_stich.cpp
+10
-3
stitcher.cpp
modules/stitching/src/stitcher.cpp
+8
-0
test_matchers.cpp
modules/stitching/test/test_matchers.cpp
+6
-0
No files found.
modules/stitching/perf/perf_stich.cpp
View file @
11ce8683
...
...
@@ -2,6 +2,7 @@
#include "opencv2/highgui/highgui.hpp"
#include "opencv2/flann/flann.hpp"
#include "opencv2/opencv_modules.hpp"
using
namespace
std
;
using
namespace
cv
;
...
...
@@ -16,7 +17,13 @@ using std::tr1::get;
typedef
TestBaseWithParam
<
String
>
stitch
;
typedef
TestBaseWithParam
<
String
>
match
;
PERF_TEST_P
(
stitch
,
a123
,
testing
::
Values
(
"surf"
,
"orb"
))
#if HAVE_OPENCV_NONFREE
#define TEST_DETECTORS testing::Values("surf", "orb")
#else
#define TEST_DETECTORS testing::Values<String>("orb")
#endif
PERF_TEST_P
(
stitch
,
a123
,
TEST_DETECTORS
)
{
Mat
pano
;
...
...
@@ -50,7 +57,7 @@ PERF_TEST_P(stitch, a123, testing::Values("surf", "orb"))
}
}
PERF_TEST_P
(
stitch
,
b12
,
testing
::
Values
(
"surf"
,
"orb"
)
)
PERF_TEST_P
(
stitch
,
b12
,
TEST_DETECTORS
)
{
Mat
pano
;
...
...
@@ -83,7 +90,7 @@ PERF_TEST_P(stitch, b12, testing::Values("surf", "orb"))
}
}
PERF_TEST_P
(
match
,
bestOf2Nearest
,
testing
::
Values
(
"surf"
,
"orb"
)
)
PERF_TEST_P
(
match
,
bestOf2Nearest
,
TEST_DETECTORS
)
{
Mat
img1
,
img1_full
=
imread
(
getDataPath
(
"stitching/b1.jpg"
)
);
Mat
img2
,
img2_full
=
imread
(
getDataPath
(
"stitching/b2.jpg"
)
);
...
...
modules/stitching/src/stitcher.cpp
View file @
11ce8683
...
...
@@ -61,14 +61,22 @@ Stitcher Stitcher::createDefault(bool try_use_gpu)
#ifdef HAVE_OPENCV_GPU
if
(
try_use_gpu
&&
gpu
::
getCudaEnabledDeviceCount
()
>
0
)
{
#if HAVE_OPENCV_NONFREE
stitcher
.
setFeaturesFinder
(
new
detail
::
SurfFeaturesFinderGpu
());
#else
stitcher
.
setFeaturesFinder
(
new
detail
::
OrbFeaturesFinder
());
#endif
stitcher
.
setWarper
(
new
SphericalWarperGpu
());
stitcher
.
setSeamFinder
(
new
detail
::
GraphCutSeamFinderGpu
());
}
else
#endif
{
#if HAVE_OPENCV_NONFREE
stitcher
.
setFeaturesFinder
(
new
detail
::
SurfFeaturesFinder
());
#else
stitcher
.
setFeaturesFinder
(
new
detail
::
OrbFeaturesFinder
());
#endif
stitcher
.
setWarper
(
new
SphericalWarper
());
stitcher
.
setSeamFinder
(
new
detail
::
GraphCutSeamFinder
(
detail
::
GraphCutSeamFinderBase
::
COST_COLOR
));
}
...
...
modules/stitching/test/test_matchers.cpp
View file @
11ce8683
...
...
@@ -40,6 +40,9 @@
//M*/
#include "test_precomp.hpp"
#include "opencv2/opencv_modules.hpp"
#if HAVE_OPENCV_NONFREE
using
namespace
cv
;
using
namespace
std
;
...
...
@@ -71,3 +74,5 @@ TEST(SurfFeaturesFinder, CanFindInROIs)
ASSERT_GT
(
br_rect_count
,
0
);
ASSERT_EQ
(
bad_count
,
0
);
}
#endif
\ No newline at end of file
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