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
68901ab4
Commit
68901ab4
authored
Sep 10, 2013
by
Roman Donchenko
Committed by
OpenCV Buildbot
Sep 10, 2013
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1420 from ilya-lavrenov:ocl_perf_hog
parents
260b283f
b07b9aca
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
0 deletions
+19
-0
perf_hog.cpp
modules/ocl/perf/perf_hog.cpp
+19
-0
No files found.
modules/ocl/perf/perf_hog.cpp
View file @
68901ab4
...
...
@@ -49,6 +49,23 @@ using namespace perf;
///////////// HOG////////////////////////
struct
RectLess
:
public
std
::
binary_function
<
cv
::
Rect
,
cv
::
Rect
,
bool
>
{
bool
operator
()(
const
cv
::
Rect
&
a
,
const
cv
::
Rect
&
b
)
const
{
if
(
a
.
x
!=
b
.
x
)
return
a
.
x
<
b
.
x
;
else
if
(
a
.
y
!=
b
.
y
)
return
a
.
y
<
b
.
y
;
else
if
(
a
.
width
!=
b
.
width
)
return
a
.
width
<
b
.
width
;
else
return
a
.
height
<
b
.
height
;
}
};
PERF_TEST
(
HOGFixture
,
HOG
)
{
Mat
src
=
imread
(
getDataPath
(
"gpu/hog/road.png"
),
cv
::
IMREAD_GRAYSCALE
);
...
...
@@ -64,6 +81,7 @@ PERF_TEST(HOGFixture, HOG)
TEST_CYCLE
()
hog
.
detectMultiScale
(
src
,
found_locations
);
std
::
sort
(
found_locations
.
begin
(),
found_locations
.
end
(),
RectLess
());
SANITY_CHECK
(
found_locations
,
1
+
DBL_EPSILON
);
}
else
if
(
RUN_OCL_IMPL
)
...
...
@@ -74,6 +92,7 @@ PERF_TEST(HOGFixture, HOG)
OCL_TEST_CYCLE
()
ocl_hog
.
detectMultiScale
(
oclSrc
,
found_locations
);
std
::
sort
(
found_locations
.
begin
(),
found_locations
.
end
(),
RectLess
());
SANITY_CHECK
(
found_locations
,
1
+
DBL_EPSILON
);
}
else
...
...
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