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
248f39e1
Commit
248f39e1
authored
Jul 04, 2012
by
Marina Kolpakova
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added performance test for LBP classifier.
parent
51f6127e
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
57 additions
and
10 deletions
+57
-10
perf_objdetect.cpp
modules/gpu/perf/perf_objdetect.cpp
+27
-0
perf_objdetect.cpp
modules/gpu/perf_cpu/perf_objdetect.cpp
+22
-0
cascadeclassifier.cpp
modules/gpu/src/cascadeclassifier.cpp
+3
-1
TestRectStdDev.cpp
modules/gpu/test/nvidia/TestRectStdDev.cpp
+5
-5
test_warp_affine.cpp
modules/gpu/test/test_warp_affine.cpp
+0
-2
test_warp_perspective.cpp
modules/gpu/test/test_warp_perspective.cpp
+0
-2
No files found.
modules/gpu/perf/perf_objdetect.cpp
View file @
248f39e1
...
...
@@ -57,4 +57,31 @@ GPU_PERF_TEST_1(HaarClassifier, cv::gpu::DeviceInfo)
INSTANTIATE_TEST_CASE_P
(
ObjDetect
,
HaarClassifier
,
ALL_DEVICES
);
//===================== LBP cascade ==========================//
GPU_PERF_TEST_1
(
LBPClassifier
,
cv
::
gpu
::
DeviceInfo
)
{
cv
::
gpu
::
DeviceInfo
devInfo
=
GetParam
();
cv
::
gpu
::
setDevice
(
devInfo
.
deviceID
());
cv
::
Mat
img_host
=
readImage
(
"gpu/haarcascade/group_1_640x480_VGA.pgm"
,
cv
::
IMREAD_GRAYSCALE
);
ASSERT_FALSE
(
img_host
.
empty
());
cv
::
gpu
::
CascadeClassifier_GPU_LBP
cascade
;
ASSERT_TRUE
(
cascade
.
load
(
perf
::
TestBase
::
getDataPath
(
"gpu/lbpcascade/lbpcascade_frontalface.xml"
)));
cv
::
gpu
::
GpuMat
img
(
img_host
);
cv
::
gpu
::
GpuMat
gpu_rects
,
buffer
;
// cascade.detectMultiScale(img, objects_buffer);
cascade
.
detectMultiScale
(
img
,
buffer
,
gpu_rects
);
TEST_CYCLE
()
{
cascade
.
detectMultiScale
(
img
,
buffer
,
gpu_rects
);
}
}
INSTANTIATE_TEST_CASE_P
(
ObjDetect
,
LBPClassifier
,
ALL_DEVICES
);
#endif
modules/gpu/perf_cpu/perf_objdetect.cpp
View file @
248f39e1
...
...
@@ -49,4 +49,26 @@ GPU_PERF_TEST_1(HaarClassifier, cv::gpu::DeviceInfo)
INSTANTIATE_TEST_CASE_P
(
ObjDetect
,
HaarClassifier
,
ALL_DEVICES
);
//===================== LBP cascade ==========================//
GPU_PERF_TEST_1
(
LBPClassifier
,
cv
::
gpu
::
DeviceInfo
)
{
cv
::
Mat
img
=
readImage
(
"gpu/haarcascade/group_1_640x480_VGA.pgm"
,
cv
::
IMREAD_GRAYSCALE
);
ASSERT_FALSE
(
img
.
empty
());
cv
::
CascadeClassifier
cascade
;
ASSERT_TRUE
(
cascade
.
load
(
perf
::
TestBase
::
getDataPath
(
"gpu/lbpcascade/lbpcascade_frontalface.xml"
)));
std
::
vector
<
cv
::
Rect
>
rects
;
cascade
.
detectMultiScale
(
img
,
rects
);
TEST_CYCLE
()
{
cascade
.
detectMultiScale
(
img
,
rects
);
}
}
INSTANTIATE_TEST_CASE_P
(
ObjDetect
,
LBPClassifier
,
ALL_DEVICES
);
#endif
modules/gpu/src/cascadeclassifier.cpp
View file @
248f39e1
...
...
@@ -350,7 +350,9 @@ int cv::gpu::CascadeClassifier_GPU_LBP::detectMultiScale(const GpuMat& image, Gp
if
(
groupThreshold
<=
0
||
objects
.
empty
())
return
0
;
return
cv
::
gpu
::
device
::
lbp
::
connectedConmonents
(
candidates
,
groupThreshold
,
grouping_eps
,
dclassified
);
cv
::
gpu
::
device
::
lbp
::
connectedConmonents
(
candidates
,
groupThreshold
,
grouping_eps
,
dclassified
);
cudaSafeCall
(
cudaDeviceSynchronize
()
);
return
*
classified
;
}
// ============ old fashioned haar cascade ==============================================//
...
...
modules/gpu/test/nvidia/TestRectStdDev.cpp
View file @
248f39e1
/*
* Copyright 1993-2010 NVIDIA Corporation. All rights reserved.
*
* NVIDIA Corporation and its licensors retain all intellectual
* property and proprietary rights in and to this software and
* related documentation and any modifications thereto.
* Any use, reproduction, disclosure, or distribution of this
* software and related documentation without an express license
* NVIDIA Corporation and its licensors retain all intellectual
* property and proprietary rights in and to this software and
* related documentation and any modifications thereto.
* Any use, reproduction, disclosure, or distribution of this
* software and related documentation without an express license
* agreement from NVIDIA Corporation is strictly prohibited.
*/
...
...
modules/gpu/test/test_warp_affine.cpp
View file @
248f39e1
...
...
@@ -185,8 +185,6 @@ PARAM_TEST_CASE(WarpAffine, cv::gpu::DeviceInfo, cv::Size, MatType, Inverse, Int
int
borderType
;
bool
useRoi
;
cv
::
Mat
M
;
virtual
void
SetUp
()
{
devInfo
=
GET_PARAM
(
0
);
...
...
modules/gpu/test/test_warp_perspective.cpp
View file @
248f39e1
...
...
@@ -185,8 +185,6 @@ PARAM_TEST_CASE(WarpPerspective, cv::gpu::DeviceInfo, cv::Size, MatType, Inverse
int
borderType
;
bool
useRoi
;
cv
::
Mat
M
;
virtual
void
SetUp
()
{
devInfo
=
GET_PARAM
(
0
);
...
...
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