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
a1ad1f08
Commit
a1ad1f08
authored
Feb 03, 2014
by
Andrey Pavlenko
Committed by
OpenCV Buildbot
Feb 03, 2014
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #2259 from ilya-lavrenov:ocl_surf
parents
2bef73c9
ede5b237
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
43 additions
and
27 deletions
+43
-27
perf_main.cpp
modules/nonfree/perf/perf_main.cpp
+3
-0
perf_surf_ocl.cpp
modules/nonfree/perf/perf_surf_ocl.cpp
+40
-27
surf_ocl.cpp
modules/nonfree/src/surf_ocl.cpp
+0
-0
test_surf_ocl.cpp
modules/nonfree/test/test_surf_ocl.cpp
+0
-0
No files found.
modules/nonfree/perf/perf_main.cpp
View file @
a1ad1f08
...
...
@@ -4,6 +4,9 @@
static
const
char
*
impls
[]
=
{
#ifdef HAVE_CUDA
"cuda"
,
#endif
#ifdef HAVE_OPENCL
"ocl"
,
#endif
"plain"
};
...
...
modules/nonfree/perf/perf_surf
.
ocl.cpp
→
modules/nonfree/perf/perf_surf
_
ocl.cpp
View file @
a1ad1f08
...
...
@@ -57,55 +57,68 @@ typedef perf::TestBaseWithParam<std::string> OCL_SURF;
"cv/detectors_descriptors_evaluation/images_datasets/leuven/img1.png",\
"stitching/a3.png"
PERF_TEST_P
(
OCL_SURF
,
DISABLED_with_data_transfer
,
testing
::
Values
(
SURF_IMAGES
))
#define OCL_TEST_CYCLE() for( ; startTimer(), next(); cv::ocl::finish(), stopTimer())
PERF_TEST_P
(
OCL_SURF
,
with_data_transfer
,
testing
::
Values
(
SURF_IMAGES
))
{
string
filename
=
getDataPath
(
GetParam
());
Mat
img
=
imread
(
filename
,
IMREAD_GRAYSCALE
);
ASSERT_FALSE
(
img
.
empty
());
SURF_OCL
d_surf
;
oclMat
d_keypoints
;
oclMat
d_descriptors
;
Mat
cpu_kp
;
Mat
cpu_dp
;
Mat
src
=
imread
(
filename
,
IMREAD_GRAYSCALE
);
ASSERT_FALSE
(
src
.
empty
());
Mat
cpu_kp
,
cpu_dp
;
declare
.
time
(
60
);
TEST_CYCLE
()
if
(
getSelectedImpl
()
==
"ocl"
)
{
SURF_OCL
d_surf
;
oclMat
d_keypoints
,
d_descriptors
;
OCL_TEST_CYCLE
()
{
oclMat
d_src
(
img
);
oclMat
d_src
(
src
);
d_surf
(
d_src
,
oclMat
(),
d_keypoints
,
d_descriptors
);
d_keypoints
.
download
(
cpu_kp
);
d_descriptors
.
download
(
cpu_dp
);
}
}
else
if
(
getSelectedImpl
()
==
"plain"
)
{
cv
::
SURF
surf
;
std
::
vector
<
cv
::
KeyPoint
>
kp
;
TEST_CYCLE
()
surf
(
src
,
Mat
(),
kp
,
cpu_dp
);
}
SANITY_CHECK
(
cpu_kp
,
1
);
SANITY_CHECK
(
cpu_dp
,
1
);
SANITY_CHECK_NOTHING
();
}
PERF_TEST_P
(
OCL_SURF
,
DISABLED_
without_data_transfer
,
testing
::
Values
(
SURF_IMAGES
))
PERF_TEST_P
(
OCL_SURF
,
without_data_transfer
,
testing
::
Values
(
SURF_IMAGES
))
{
string
filename
=
getDataPath
(
GetParam
());
Mat
img
=
imread
(
filename
,
IMREAD_GRAYSCALE
);
ASSERT_FALSE
(
img
.
empty
());
Mat
src
=
imread
(
filename
,
IMREAD_GRAYSCALE
);
ASSERT_FALSE
(
src
.
empty
());
Mat
cpu_kp
,
cpu_dp
;
declare
.
time
(
60
);
if
(
getSelectedImpl
()
==
"ocl"
)
{
SURF_OCL
d_surf
;
oclMat
d_keypoints
;
oclMat
d_descriptors
;
oclMat
d_src
(
img
);
oclMat
d_keypoints
,
d_descriptors
,
d_src
(
src
);
declare
.
time
(
60
);
OCL_TEST_CYCLE
()
d_surf
(
d_src
,
oclMat
(),
d_keypoints
,
d_descriptors
);
}
else
if
(
getSelectedImpl
()
==
"plain"
)
{
cv
::
SURF
surf
;
std
::
vector
<
cv
::
KeyPoint
>
kp
;
TEST_CYCLE
()
d_surf
(
d_src
,
oclMat
(),
d_keypoints
,
d_descriptors
);
TEST_CYCLE
()
surf
(
src
,
Mat
(),
kp
,
cpu_dp
);
}
Mat
cpu_kp
;
Mat
cpu_dp
;
d_keypoints
.
download
(
cpu_kp
);
d_descriptors
.
download
(
cpu_dp
);
SANITY_CHECK
(
cpu_kp
,
1
);
SANITY_CHECK
(
cpu_dp
,
1
);
SANITY_CHECK_NOTHING
();
}
#endif // HAVE_OPENCV_OCL
modules/nonfree/src/surf
.
ocl.cpp
→
modules/nonfree/src/surf
_
ocl.cpp
View file @
a1ad1f08
File moved
modules/nonfree/test/test_surf
.
ocl.cpp
→
modules/nonfree/test/test_surf
_
ocl.cpp
View file @
a1ad1f08
File moved
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