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
4d28e824
Commit
4d28e824
authored
Jan 09, 2014
by
Andrey Pavlenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
'master'-like Haar perf test
parent
7acea487
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
50 additions
and
0 deletions
+50
-0
perf_haar.cpp
modules/ocl/perf/perf_haar.cpp
+50
-0
No files found.
modules/ocl/perf/perf_haar.cpp
View file @
4d28e824
...
...
@@ -83,3 +83,53 @@ PERF_TEST(HaarFixture, Haar)
else
OCL_PERF_ELSE
}
using
namespace
std
;
using
namespace
cv
;
using
namespace
perf
;
using
std
::
tr1
::
make_tuple
;
using
std
::
tr1
::
get
;
typedef
std
::
tr1
::
tuple
<
std
::
string
,
std
::
string
,
int
>
Cascade_Image_MinSize_t
;
typedef
perf
::
TestBaseWithParam
<
Cascade_Image_MinSize_t
>
Cascade_Image_MinSize
;
PERF_TEST_P
(
Cascade_Image_MinSize
,
CascadeClassifier_UMat
,
testing
::
Combine
(
testing
::
Values
(
string
(
"cv/cascadeandhog/cascades/haarcascade_frontalface_alt.xml"
)
),
testing
::
Values
(
string
(
"cv/shared/lena.png"
),
string
(
"cv/cascadeandhog/images/bttf301.png"
),
string
(
"cv/cascadeandhog/images/class57.png"
)
),
testing
::
Values
(
30
,
64
,
90
)
)
)
{
const
string
cascasePath
=
get
<
0
>
(
GetParam
());
const
string
imagePath
=
get
<
1
>
(
GetParam
());
const
int
min_size
=
get
<
2
>
(
GetParam
());
Size
minSize
(
min_size
,
min_size
);
ocl
::
OclCascadeClassifier
cc
;
if
(
!
cc
.
load
(
getDataPath
(
cascasePath
)
))
FAIL
()
<<
"Can't load cascade file: "
<<
getDataPath
(
cascasePath
);
Mat
img
=
imread
(
getDataPath
(
imagePath
),
IMREAD_GRAYSCALE
);
if
(
img
.
empty
())
FAIL
()
<<
"Can't load source image: "
<<
getDataPath
(
imagePath
);
vector
<
Rect
>
faces
;
equalizeHist
(
img
,
img
);
declare
.
in
(
img
).
time
(
60
);
ocl
::
oclMat
uimg
(
img
);
while
(
next
())
{
faces
.
clear
();
startTimer
();
cc
.
detectMultiScale
(
uimg
,
faces
,
1.1
,
3
,
0
,
minSize
);
stopTimer
();
}
//sort(faces.begin(), faces.end(), comparators::RectLess());
SANITY_CHECK_NOTHING
();
//(faces, min_size/5);
}
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