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
172b4554
Commit
172b4554
authored
Mar 21, 2013
by
Andrey Kamaev
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #675 from jet47/gpu-test-fixes
GPU test fixes
parents
d756de17
d87b709c
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
109 additions
and
20 deletions
+109
-20
perf_calib3d.cpp
modules/gpu/perf/perf_calib3d.cpp
+3
-3
perf_core.cpp
modules/gpu/perf/perf_core.cpp
+12
-3
perf_denoising.cpp
modules/gpu/perf/perf_denoising.cpp
+1
-1
perf_features2d.cpp
modules/gpu/perf/perf_features2d.cpp
+2
-0
perf_imgproc.cpp
modules/gpu/perf/perf_imgproc.cpp
+9
-5
perf_objdetect.cpp
modules/gpu/perf/perf_objdetect.cpp
+2
-0
perf_video.cpp
modules/gpu/perf/perf_video.cpp
+40
-8
test_bgfg.cpp
modules/gpu/test/test_bgfg.cpp
+24
-0
perf_gpu.cpp
modules/nonfree/perf/perf_gpu.cpp
+16
-0
No files found.
modules/gpu/perf/perf_calib3d.cpp
View file @
172b4554
...
...
@@ -13,7 +13,7 @@ DEF_PARAM_TEST_1(ImagePair, pair_string);
PERF_TEST_P
(
ImagePair
,
Calib3D_StereoBM
,
Values
(
pair_string
(
"gpu/perf/aloe.png"
,
"gpu/perf/aloeR.png"
)))
{
declare
.
time
(
5
.0
);
declare
.
time
(
300
.0
);
const
cv
::
Mat
imgLeft
=
readImage
(
GET_PARAM
(
0
),
cv
::
IMREAD_GRAYSCALE
);
ASSERT_FALSE
(
imgLeft
.
empty
());
...
...
@@ -54,7 +54,7 @@ PERF_TEST_P(ImagePair, Calib3D_StereoBM,
PERF_TEST_P
(
ImagePair
,
Calib3D_StereoBeliefPropagation
,
Values
(
pair_string
(
"gpu/stereobp/aloe-L.png"
,
"gpu/stereobp/aloe-R.png"
)))
{
declare
.
time
(
1
0.0
);
declare
.
time
(
30
0.0
);
const
cv
::
Mat
imgLeft
=
readImage
(
GET_PARAM
(
0
));
ASSERT_FALSE
(
imgLeft
.
empty
());
...
...
@@ -88,7 +88,7 @@ PERF_TEST_P(ImagePair, Calib3D_StereoBeliefPropagation,
PERF_TEST_P
(
ImagePair
,
Calib3D_StereoConstantSpaceBP
,
Values
(
pair_string
(
"gpu/stereobm/aloe-L.png"
,
"gpu/stereobm/aloe-R.png"
)))
{
declare
.
time
(
1
0.0
);
declare
.
time
(
30
0.0
);
const
cv
::
Mat
imgLeft
=
readImage
(
GET_PARAM
(
0
),
cv
::
IMREAD_GRAYSCALE
);
ASSERT_FALSE
(
imgLeft
.
empty
());
...
...
modules/gpu/perf/perf_core.cpp
View file @
172b4554
...
...
@@ -1748,7 +1748,10 @@ PERF_TEST_P(Sz_Depth_Norm, Core_Norm,
const
int
normType
=
GET_PARAM
(
2
);
cv
::
Mat
src
(
size
,
depth
);
declare
.
in
(
src
,
WARMUP_RNG
);
if
(
depth
==
CV_8U
)
cv
::
randu
(
src
,
0
,
254
);
else
declare
.
in
(
src
,
WARMUP_RNG
);
if
(
PERF_RUN_GPU
())
{
...
...
@@ -1923,7 +1926,10 @@ PERF_TEST_P(Sz_Depth, Core_MinMax,
const
int
depth
=
GET_PARAM
(
1
);
cv
::
Mat
src
(
size
,
depth
);
declare
.
in
(
src
,
WARMUP_RNG
);
if
(
depth
==
CV_8U
)
cv
::
randu
(
src
,
0
,
254
);
else
declare
.
in
(
src
,
WARMUP_RNG
);
if
(
PERF_RUN_GPU
())
{
...
...
@@ -1958,7 +1964,10 @@ PERF_TEST_P(Sz_Depth, Core_MinMaxLoc,
const
int
depth
=
GET_PARAM
(
1
);
cv
::
Mat
src
(
size
,
depth
);
declare
.
in
(
src
,
WARMUP_RNG
);
if
(
depth
==
CV_8U
)
cv
::
randu
(
src
,
0
,
254
);
else
declare
.
in
(
src
,
WARMUP_RNG
);
if
(
PERF_RUN_GPU
())
{
...
...
modules/gpu/perf/perf_denoising.cpp
View file @
172b4554
...
...
@@ -64,7 +64,7 @@ PERF_TEST_P(Sz_Depth_Cn_WinSz_BlockSz, Denoising_NonLocalMeans,
Values
(
21
),
Values
(
5
)))
{
declare
.
time
(
60.0
);
declare
.
time
(
60
0
.0
);
const
cv
::
Size
size
=
GET_PARAM
(
0
);
const
int
depth
=
GET_PARAM
(
1
);
...
...
modules/gpu/perf/perf_features2d.cpp
View file @
172b4554
...
...
@@ -55,6 +55,8 @@ PERF_TEST_P(Image_NFeatures, Features2D_ORB,
Combine
(
Values
<
string
>
(
"gpu/perf/aloe.png"
),
Values
(
4000
)))
{
declare
.
time
(
300.0
);
const
cv
::
Mat
img
=
readImage
(
GET_PARAM
(
0
),
cv
::
IMREAD_GRAYSCALE
);
ASSERT_FALSE
(
img
.
empty
());
...
...
modules/gpu/perf/perf_imgproc.cpp
View file @
172b4554
...
...
@@ -632,7 +632,7 @@ DEF_PARAM_TEST_1(Image, string);
PERF_TEST_P
(
Image
,
ImgProc_MeanShiftFiltering
,
Values
<
string
>
(
"gpu/meanshift/cones.png"
))
{
declare
.
time
(
15
.0
);
declare
.
time
(
300
.0
);
const
cv
::
Mat
img
=
readImage
(
GetParam
());
ASSERT_FALSE
(
img
.
empty
());
...
...
@@ -668,7 +668,7 @@ PERF_TEST_P(Image, ImgProc_MeanShiftFiltering,
PERF_TEST_P
(
Image
,
ImgProc_MeanShiftProc
,
Values
<
string
>
(
"gpu/meanshift/cones.png"
))
{
declare
.
time
(
5
.0
);
declare
.
time
(
300
.0
);
const
cv
::
Mat
img
=
readImage
(
GetParam
());
ASSERT_FALSE
(
img
.
empty
());
...
...
@@ -702,7 +702,7 @@ PERF_TEST_P(Image, ImgProc_MeanShiftProc,
PERF_TEST_P
(
Image
,
ImgProc_MeanShiftSegmentation
,
Values
<
string
>
(
"gpu/meanshift/cones.png"
))
{
declare
.
time
(
5
.0
);
declare
.
time
(
300
.0
);
const
cv
::
Mat
img
=
readImage
(
GetParam
());
ASSERT_FALSE
(
img
.
empty
());
...
...
@@ -830,6 +830,8 @@ PERF_TEST_P(Sz_TemplateSz_Cn_Method, ImgProc_MatchTemplate8U,
GPU_CHANNELS_1_3_4
,
ALL_TEMPLATE_METHODS
))
{
declare
.
time
(
300.0
);
const
cv
::
Size
size
=
GET_PARAM
(
0
);
const
cv
::
Size
templ_size
=
GET_PARAM
(
1
);
const
int
cn
=
GET_PARAM
(
2
);
...
...
@@ -868,6 +870,8 @@ PERF_TEST_P(Sz_TemplateSz_Cn_Method, ImgProc_MatchTemplate32F,
GPU_CHANNELS_1_3_4
,
Values
(
TemplateMethod
(
cv
::
TM_SQDIFF
),
TemplateMethod
(
cv
::
TM_CCORR
))))
{
declare
.
time
(
300.0
);
const
cv
::
Size
size
=
GET_PARAM
(
0
);
const
cv
::
Size
templ_size
=
GET_PARAM
(
1
);
const
int
cn
=
GET_PARAM
(
2
);
...
...
@@ -1034,7 +1038,7 @@ PERF_TEST_P(Image_Type_Border_BlockSz_ApertureSz, ImgProc_CornerHarris,
TEST_CYCLE
()
cv
::
gpu
::
cornerHarris
(
d_img
,
dst
,
d_Dx
,
d_Dy
,
d_buf
,
blockSize
,
apertureSize
,
k
,
borderMode
);
GPU_SANITY_CHECK
(
dst
);
GPU_SANITY_CHECK
(
dst
,
1e-4
);
}
else
{
...
...
@@ -1077,7 +1081,7 @@ PERF_TEST_P(Image_Type_Border_BlockSz_ApertureSz, ImgProc_CornerMinEigenVal,
TEST_CYCLE
()
cv
::
gpu
::
cornerMinEigenVal
(
d_img
,
dst
,
d_Dx
,
d_Dy
,
d_buf
,
blockSize
,
apertureSize
,
borderMode
);
GPU_SANITY_CHECK
(
dst
);
GPU_SANITY_CHECK
(
dst
,
1e-4
);
}
else
{
...
...
modules/gpu/perf/perf_objdetect.cpp
View file @
172b4554
...
...
@@ -19,6 +19,8 @@ PERF_TEST_P(Image, ObjDetect_HOG,
"gpu/caltech/image_00000527_0.png"
,
"gpu/caltech/image_00000574_0.png"
))
{
declare
.
time
(
300.0
);
const
cv
::
Mat
img
=
readImage
(
GetParam
(),
cv
::
IMREAD_GRAYSCALE
);
ASSERT_FALSE
(
img
.
empty
());
...
...
modules/gpu/perf/perf_video.cpp
View file @
172b4554
...
...
@@ -4,6 +4,18 @@ using namespace std;
using
namespace
testing
;
using
namespace
perf
;
#if defined(HAVE_XINE) || \
defined(HAVE_GSTREAMER) || \
defined(HAVE_QUICKTIME) || \
defined(HAVE_AVFOUNDATION) || \
defined(HAVE_FFMPEG) || \
defined(WIN32)
/* assume that we have ffmpeg */
# define BUILD_WITH_VIDEO_INPUT_SUPPORT 1
#else
# define BUILD_WITH_VIDEO_INPUT_SUPPORT 0
#endif
namespace
cv
{
template
<>
void
Ptr
<
CvBGStatModel
>::
delete_obj
()
...
...
@@ -142,7 +154,7 @@ PERF_TEST_P(Image_MinDistance, Video_GoodFeaturesToTrack,
PERF_TEST_P
(
ImagePair
,
Video_BroxOpticalFlow
,
Values
<
pair_string
>
(
make_pair
(
"gpu/opticalflow/frame0.png"
,
"gpu/opticalflow/frame1.png"
)))
{
declare
.
time
(
1
0
);
declare
.
time
(
30
0
);
cv
::
Mat
frame0
=
readImage
(
GetParam
().
first
,
cv
::
IMREAD_GRAYSCALE
);
ASSERT_FALSE
(
frame0
.
empty
());
...
...
@@ -372,8 +384,8 @@ PERF_TEST_P(ImagePair, Video_OpticalFlowDual_TVL1,
TEST_CYCLE
()
d_alg
(
d_frame0
,
d_frame1
,
u
,
v
);
GPU_SANITY_CHECK
(
u
,
1e-
4
);
GPU_SANITY_CHECK
(
v
,
1e-
4
);
GPU_SANITY_CHECK
(
u
,
1e-
2
);
GPU_SANITY_CHECK
(
v
,
1e-
2
);
}
else
{
...
...
@@ -482,6 +494,8 @@ PERF_TEST_P(ImagePair, Video_FastOpticalFlowBM,
//////////////////////////////////////////////////////
// FGDStatModel
#if BUILD_WITH_VIDEO_INPUT_SUPPORT
DEF_PARAM_TEST_1
(
Video
,
string
);
PERF_TEST_P
(
Video
,
Video_FGDStatModel
,
...
...
@@ -548,9 +562,13 @@ PERF_TEST_P(Video, Video_FGDStatModel,
}
}
#endif
//////////////////////////////////////////////////////
// MOG
#if BUILD_WITH_VIDEO_INPUT_SUPPORT
DEF_PARAM_TEST
(
Video_Cn_LearningRate
,
string
,
MatCn
,
double
);
PERF_TEST_P
(
Video_Cn_LearningRate
,
Video_MOG
,
...
...
@@ -643,9 +661,13 @@ PERF_TEST_P(Video_Cn_LearningRate, Video_MOG,
}
}
#endif
//////////////////////////////////////////////////////
// MOG2
#if BUILD_WITH_VIDEO_INPUT_SUPPORT
DEF_PARAM_TEST
(
Video_Cn
,
string
,
int
);
PERF_TEST_P
(
Video_Cn
,
Video_MOG2
,
...
...
@@ -740,9 +762,13 @@ PERF_TEST_P(Video_Cn, Video_MOG2,
}
}
#endif
//////////////////////////////////////////////////////
// MOG2GetBackgroundImage
#if BUILD_WITH_VIDEO_INPUT_SUPPORT
PERF_TEST_P
(
Video_Cn
,
Video_MOG2GetBackgroundImage
,
Combine
(
Values
(
"gpu/video/768x576.avi"
,
"gpu/video/1920x1080.avi"
),
GPU_CHANNELS_1_3_4
))
...
...
@@ -818,9 +844,13 @@ PERF_TEST_P(Video_Cn, Video_MOG2GetBackgroundImage,
}
}
#endif
//////////////////////////////////////////////////////
// GMG
#if BUILD_WITH_VIDEO_INPUT_SUPPORT
DEF_PARAM_TEST
(
Video_Cn_MaxFeatures
,
string
,
MatCn
,
int
);
PERF_TEST_P
(
Video_Cn_MaxFeatures
,
Video_GMG
,
...
...
@@ -928,11 +958,13 @@ PERF_TEST_P(Video_Cn_MaxFeatures, Video_GMG,
}
}
#
ifdef HAVE_NVCUVID
#
endif
//////////////////////////////////////////////////////
// VideoReader
#if defined(HAVE_NVCUVID) && BUILD_WITH_VIDEO_INPUT_SUPPORT
PERF_TEST_P
(
Video
,
Video_VideoReader
,
Values
(
"gpu/video/768x576.avi"
,
"gpu/video/1920x1080.avi"
))
{
declare
.
time
(
20
);
...
...
@@ -963,10 +995,12 @@ PERF_TEST_P(Video, Video_VideoReader, Values("gpu/video/768x576.avi", "gpu/video
}
}
#endif
//////////////////////////////////////////////////////
// VideoWriter
#if
def WIN32
#if
defined(HAVE_NVCUVID) && defined(WIN32)
PERF_TEST_P
(
Video
,
Video_VideoWriter
,
Values
(
"gpu/video/768x576.avi"
,
"gpu/video/1920x1080.avi"
))
{
...
...
@@ -1024,6 +1058,4 @@ PERF_TEST_P(Video, Video_VideoWriter, Values("gpu/video/768x576.avi", "gpu/video
SANITY_CHECK
(
frame
);
}
#endif // WIN32
#endif // HAVE_NVCUVID
#endif
modules/gpu/test/test_bgfg.cpp
View file @
172b4554
...
...
@@ -45,9 +45,23 @@
using
namespace
cvtest
;
#if defined(HAVE_XINE) || \
defined(HAVE_GSTREAMER) || \
defined(HAVE_QUICKTIME) || \
defined(HAVE_AVFOUNDATION) || \
defined(HAVE_FFMPEG) || \
defined(WIN32)
/* assume that we have ffmpeg */
# define BUILD_WITH_VIDEO_INPUT_SUPPORT 1
#else
# define BUILD_WITH_VIDEO_INPUT_SUPPORT 0
#endif
//////////////////////////////////////////////////////
// FGDStatModel
#if BUILD_WITH_VIDEO_INPUT_SUPPORT
namespace
cv
{
template
<>
void
Ptr
<
CvBGStatModel
>::
delete_obj
()
...
...
@@ -132,9 +146,13 @@ INSTANTIATE_TEST_CASE_P(GPU_Video, FGDStatModel, testing::Combine(
testing
::
Values
(
std
::
string
(
"768x576.avi"
)),
testing
::
Values
(
Channels
(
3
),
Channels
(
4
))));
#endif
//////////////////////////////////////////////////////
// MOG
#if BUILD_WITH_VIDEO_INPUT_SUPPORT
namespace
{
IMPLEMENT_PARAM_CLASS
(
UseGray
,
bool
)
...
...
@@ -206,9 +224,13 @@ INSTANTIATE_TEST_CASE_P(GPU_Video, MOG, testing::Combine(
testing
::
Values
(
LearningRate
(
0.0
),
LearningRate
(
0.01
)),
WHOLE_SUBMAT
));
#endif
//////////////////////////////////////////////////////
// MOG2
#if BUILD_WITH_VIDEO_INPUT_SUPPORT
namespace
{
IMPLEMENT_PARAM_CLASS
(
DetectShadow
,
bool
)
...
...
@@ -322,6 +344,8 @@ INSTANTIATE_TEST_CASE_P(GPU_Video, MOG2, testing::Combine(
testing
::
Values
(
DetectShadow
(
true
),
DetectShadow
(
false
)),
WHOLE_SUBMAT
));
#endif
//////////////////////////////////////////////////////
// GMG
...
...
modules/nonfree/perf/perf_gpu.cpp
View file @
172b4554
...
...
@@ -4,6 +4,18 @@ using namespace std;
using
namespace
testing
;
using
namespace
perf
;
#if defined(HAVE_XINE) || \
defined(HAVE_GSTREAMER) || \
defined(HAVE_QUICKTIME) || \
defined(HAVE_AVFOUNDATION) || \
defined(HAVE_FFMPEG) || \
defined(WIN32)
/* assume that we have ffmpeg */
# define BUILD_WITH_VIDEO_INPUT_SUPPORT 1
#else
# define BUILD_WITH_VIDEO_INPUT_SUPPORT 0
#endif
#if defined(HAVE_OPENCV_GPU) && defined(HAVE_CUDA)
//////////////////////////////////////////////////////////////////////
...
...
@@ -55,6 +67,8 @@ PERF_TEST_P(Image, GPU_SURF,
//////////////////////////////////////////////////////
// VIBE
#if BUILD_WITH_VIDEO_INPUT_SUPPORT
DEF_PARAM_TEST
(
Video_Cn
,
string
,
int
);
PERF_TEST_P
(
Video_Cn
,
GPU_VIBE
,
...
...
@@ -120,3 +134,5 @@ PERF_TEST_P(Video_Cn, GPU_VIBE,
}
#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