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
671233cd
Commit
671233cd
authored
May 22, 2012
by
Anatoly Baksheev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gpu: added Cascade and mulAndScaleSpectrums perf tests
parent
e703e8f5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
200 additions
and
0 deletions
+200
-0
perf_imgproc.cpp
modules/gpu/perf/perf_imgproc.cpp
+69
-0
perf_objdetect.cpp
modules/gpu/perf/perf_objdetect.cpp
+28
-0
perf_arithm.cpp
modules/gpu/perf_cpu/perf_arithm.cpp
+53
-0
perf_imgproc.cpp
modules/gpu/perf_cpu/perf_imgproc.cpp
+27
-0
perf_objdetect.cpp
modules/gpu/perf_cpu/perf_objdetect.cpp
+23
-0
No files found.
modules/gpu/perf/perf_imgproc.cpp
View file @
671233cd
...
@@ -1020,4 +1020,73 @@ INSTANTIATE_TEST_CASE_P(ImgProc, ImagePyramid_getLayer, testing::Combine(
...
@@ -1020,4 +1020,73 @@ INSTANTIATE_TEST_CASE_P(ImgProc, ImagePyramid_getLayer, testing::Combine(
GPU_TYPICAL_MAT_SIZES
,
GPU_TYPICAL_MAT_SIZES
,
testing
::
Values
(
CV_8UC1
,
CV_8UC3
,
CV_8UC4
,
CV_16UC1
,
CV_16UC3
,
CV_16UC4
,
CV_32FC1
,
CV_32FC3
,
CV_32FC4
)));
testing
::
Values
(
CV_8UC1
,
CV_8UC3
,
CV_8UC4
,
CV_16UC1
,
CV_16UC3
,
CV_16UC4
,
CV_32FC1
,
CV_32FC3
,
CV_32FC4
)));
//////////////////////////////////////////////////////////////////////
// MulAndScaleSpectrums
GPU_PERF_TEST
(
MulAndScaleSpectrums
,
cv
::
gpu
::
DeviceInfo
,
cv
::
Size
)
{
cv
::
gpu
::
DeviceInfo
devInfo
=
GET_PARAM
(
0
);
cv
::
Size
size
=
GET_PARAM
(
1
);
cv
::
gpu
::
setDevice
(
devInfo
.
deviceID
());
int
type
=
CV_32FC2
;
cv
::
Mat
src1_host
(
size
,
type
);
cv
::
Mat
src2_host
(
size
,
type
);
declare
.
in
(
src1_host
,
src2_host
,
WARMUP_RNG
);
cv
::
gpu
::
GpuMat
src1
(
src1_host
);
cv
::
gpu
::
GpuMat
src2
(
src2_host
);
cv
::
gpu
::
GpuMat
dst
(
size
,
type
);
TEST_CYCLE
()
{
cv
::
gpu
::
mulSpectrums
(
src1
,
src2
,
dst
,
cv
::
DFT_ROWS
,
false
);
}
}
INSTANTIATE_TEST_CASE_P
(
ImgProc
,
MulAndScaleSpectrums
,
testing
::
Combine
(
ALL_DEVICES
,
GPU_TYPICAL_MAT_SIZES
));
//////////////////////////////////////////////////////////////////////
// MulAndScaleSpectrumsScale
GPU_PERF_TEST
(
MulAndScaleSpectrumsScale
,
cv
::
gpu
::
DeviceInfo
,
cv
::
Size
)
{
cv
::
gpu
::
DeviceInfo
devInfo
=
GET_PARAM
(
0
);
cv
::
Size
size
=
GET_PARAM
(
1
);
float
scale
=
1.
f
/
size
.
area
();
int
type
=
CV_32FC2
;
cv
::
gpu
::
setDevice
(
devInfo
.
deviceID
());
cv
::
Mat
src1_host
(
size
,
type
);
cv
::
Mat
src2_host
(
size
,
type
);
declare
.
in
(
src1_host
,
src2_host
,
WARMUP_RNG
);
cv
::
gpu
::
GpuMat
src1
(
src1_host
);
cv
::
gpu
::
GpuMat
src2
(
src2_host
);
cv
::
gpu
::
GpuMat
dst
(
size
,
type
);
TEST_CYCLE
()
{
cv
::
gpu
::
mulAndScaleSpectrums
(
src1
,
src2
,
dst
,
cv
::
DFT_ROWS
,
scale
,
false
);
}
}
INSTANTIATE_TEST_CASE_P
(
ImgProc
,
MulAndScaleSpectrumsScale
,
testing
::
Combine
(
ALL_DEVICES
,
GPU_TYPICAL_MAT_SIZES
));
#endif
#endif
modules/gpu/perf/perf_objdetect.cpp
View file @
671233cd
...
@@ -24,4 +24,32 @@ GPU_PERF_TEST_1(HOG, cv::gpu::DeviceInfo)
...
@@ -24,4 +24,32 @@ GPU_PERF_TEST_1(HOG, cv::gpu::DeviceInfo)
INSTANTIATE_TEST_CASE_P
(
ObjDetect
,
HOG
,
ALL_DEVICES
);
INSTANTIATE_TEST_CASE_P
(
ObjDetect
,
HOG
,
ALL_DEVICES
);
CV_FLAGS
(
DftFlags
,
0
,
cv
::
DFT_INVERSE
,
cv
::
DFT_SCALE
,
cv
::
DFT_ROWS
,
cv
::
DFT_COMPLEX_OUTPUT
,
cv
::
DFT_REAL_OUTPUT
)
GPU_PERF_TEST_1
(
HaarClassifier
,
cv
::
gpu
::
DeviceInfo
,
DftFlags
)
{
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
);
cv
::
gpu
::
CascadeClassifier_GPU
cascade
;
if
(
!
cascade
.
load
(
"haarcascade_frontalface_alt.xml"
))
CV_Error
(
0
,
"Can't load cascade"
);
cv
::
gpu
::
GpuMat
img
(
img_host
);
cv
::
gpu
::
GpuMat
objects_buffer
(
1
,
100
,
cv
::
DataType
<
cv
::
Rect
>::
type
);
TEST_CYCLE
()
{
cascade
.
detectMultiScale
(
img
,
objects_buffer
);
}
}
INSTANTIATE_TEST_CASE_P
(
ObjDetect
,
HaarClassifier
,
ALL_DEVICES
);
#endif
#endif
modules/gpu/perf_cpu/perf_arithm.cpp
View file @
671233cd
...
@@ -636,6 +636,59 @@ INSTANTIATE_TEST_CASE_P(Arithm, BitwiseScalarOr, testing::Combine(
...
@@ -636,6 +636,59 @@ INSTANTIATE_TEST_CASE_P(Arithm, BitwiseScalarOr, testing::Combine(
testing
::
Values
(
CV_8UC1
,
CV_8UC3
,
CV_8UC4
,
CV_16UC1
,
CV_16UC3
,
CV_16UC4
,
CV_32SC1
,
CV_32SC3
,
CV_32SC4
)));
testing
::
Values
(
CV_8UC1
,
CV_8UC3
,
CV_8UC4
,
CV_16UC1
,
CV_16UC3
,
CV_16UC4
,
CV_32SC1
,
CV_32SC3
,
CV_32SC4
)));
//////////////////////////////////////////////////////////////////////
// BitwiseXor
GPU_PERF_TEST
(
BitwiseXor
,
cv
::
gpu
::
DeviceInfo
,
cv
::
Size
,
perf
::
MatType
)
{
cv
::
Size
size
=
GET_PARAM
(
1
);
int
type
=
GET_PARAM
(
2
);
cv
::
Mat
src1
(
size
,
type
);
cv
::
Mat
src2
(
size
,
type
);
declare
.
in
(
src1
,
src2
,
WARMUP_RNG
);
cv
::
Mat
dst
;
TEST_CYCLE
()
{
cv
::
bitwise_xor
(
src1
,
src2
,
dst
);
}
}
INSTANTIATE_TEST_CASE_P
(
Arithm
,
BitwiseXor
,
testing
::
Combine
(
ALL_DEVICES
,
GPU_TYPICAL_MAT_SIZES
,
testing
::
Values
(
CV_8UC1
,
CV_16UC1
,
CV_32SC1
)));
//////////////////////////////////////////////////////////////////////
// BitwiseScalarXor
GPU_PERF_TEST
(
BitwiseScalarXor
,
cv
::
gpu
::
DeviceInfo
,
cv
::
Size
,
perf
::
MatType
)
{
cv
::
Size
size
=
GET_PARAM
(
1
);
int
type
=
GET_PARAM
(
2
);
cv
::
Mat
src
(
size
,
type
);
declare
.
in
(
src
,
WARMUP_RNG
);
cv
::
Mat
dst
;
cv
::
Scalar
sc
=
cv
::
Scalar
(
123
,
123
,
123
,
123
);
TEST_CYCLE
()
{
cv
::
bitwise_xor
(
src
,
sc
,
dst
);
}
}
INSTANTIATE_TEST_CASE_P
(
Arithm
,
BitwiseScalarXor
,
testing
::
Combine
(
ALL_DEVICES
,
GPU_TYPICAL_MAT_SIZES
,
testing
::
Values
(
CV_8UC1
,
CV_8UC3
,
CV_8UC4
,
CV_16UC1
,
CV_16UC3
,
CV_16UC4
,
CV_32SC1
,
CV_32SC3
,
CV_32SC4
)));
//////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////
// Min
// Min
...
...
modules/gpu/perf_cpu/perf_imgproc.cpp
View file @
671233cd
...
@@ -533,4 +533,31 @@ INSTANTIATE_TEST_CASE_P(ImgProc, EqualizeHist, testing::Combine(
...
@@ -533,4 +533,31 @@ INSTANTIATE_TEST_CASE_P(ImgProc, EqualizeHist, testing::Combine(
ALL_DEVICES
,
ALL_DEVICES
,
GPU_TYPICAL_MAT_SIZES
));
GPU_TYPICAL_MAT_SIZES
));
//////////////////////////////////////////////////////////////////////
// MulAndScaleSpectrums
GPU_PERF_TEST
(
MulAndScaleSpectrums
,
cv
::
gpu
::
DeviceInfo
,
cv
::
Size
)
{
cv
::
Size
size
=
GET_PARAM
(
1
);
int
type
=
CV_32FC2
;
cv
::
Mat
src1
(
size
,
type
);
cv
::
Mat
src2
(
size
,
type
);
cv
::
Mat
dst
(
size
,
type
);
declare
.
in
(
src1
,
src2
,
WARMUP_RNG
);
TEST_CYCLE
()
{
cv
::
mulSpectrums
(
src1
,
src2
,
dst
,
cv
::
DFT_ROWS
,
false
);
}
}
INSTANTIATE_TEST_CASE_P
(
ImgProc
,
MulAndScaleSpectrums
,
testing
::
Combine
(
ALL_DEVICES
,
GPU_TYPICAL_MAT_SIZES
));
#endif
#endif
modules/gpu/perf_cpu/perf_objdetect.cpp
View file @
671233cd
...
@@ -19,4 +19,27 @@ GPU_PERF_TEST_1(HOG, cv::gpu::DeviceInfo)
...
@@ -19,4 +19,27 @@ GPU_PERF_TEST_1(HOG, cv::gpu::DeviceInfo)
INSTANTIATE_TEST_CASE_P
(
ObjDetect
,
HOG
,
ALL_DEVICES
);
INSTANTIATE_TEST_CASE_P
(
ObjDetect
,
HOG
,
ALL_DEVICES
);
GPU_PERF_TEST_1
(
HaarClassifier
,
cv
::
gpu
::
DeviceInfo
)
{
cv
::
Mat
img
=
readImage
(
"gpu/haarcascade/group_1_640x480_VGA.pgm"
,
cv
::
IMREAD_GRAYSCALE
);
cv
::
CascadeClassifier
cascade
;
if
(
!
cascade
.
load
(
"haarcascade_frontalface_alt.xml"
))
CV_Error
(
0
,
"Can't load cascade"
);
std
::
vector
<
cv
::
Rect
>
rects
;
rects
.
reserve
(
1000
);
TEST_CYCLE
()
{
cascade
.
detectMultiScale
(
img
,
rects
);
}
}
INSTANTIATE_TEST_CASE_P
(
ObjDetect
,
HaarClassifier
,
ALL_DEVICES
);
#endif
#endif
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