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
3e589069
Commit
3e589069
authored
Feb 21, 2014
by
Andrey Pavlenko
Committed by
OpenCV Buildbot
Feb 21, 2014
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #2384 from ilya-lavrenov:perf_match
parents
efafd4a9
aa5311ea
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
58 additions
and
1 deletion
+58
-1
perf_match_template.cpp
modules/ocl/perf/perf_match_template.cpp
+57
-0
ts_perf.hpp
modules/ts/include/opencv2/ts/ts_perf.hpp
+1
-1
No files found.
modules/ocl/perf/perf_match_template.cpp
View file @
3e589069
...
...
@@ -119,3 +119,60 @@ PERF_TEST_P(CV_TM_CCORR_NORMEDFixture, matchTemplate, OCL_TYPICAL_MAT_SIZES)
else
OCL_PERF_ELSE
}
CV_ENUM
(
MethodType
,
TM_SQDIFF
,
TM_SQDIFF_NORMED
,
TM_CCORR
,
TM_CCORR_NORMED
,
TM_CCOEFF
,
TM_CCOEFF_NORMED
)
typedef
std
::
tr1
::
tuple
<
Size
,
Size
,
MethodType
>
ImgSize_TmplSize_Method_t
;
typedef
TestBaseWithParam
<
ImgSize_TmplSize_Method_t
>
ImgSize_TmplSize_Method
;
PERF_TEST_P
(
ImgSize_TmplSize_Method
,
MatchTemplate
,
::
testing
::
Combine
(
testing
::
Values
(
szSmall128
,
cv
::
Size
(
320
,
240
),
cv
::
Size
(
640
,
480
),
cv
::
Size
(
800
,
600
),
cv
::
Size
(
1024
,
768
),
cv
::
Size
(
1280
,
1024
)),
testing
::
Values
(
cv
::
Size
(
12
,
12
),
cv
::
Size
(
28
,
9
),
cv
::
Size
(
8
,
30
),
cv
::
Size
(
16
,
16
)),
MethodType
::
all
()
)
)
{
Size
imgSz
=
get
<
0
>
(
GetParam
());
Size
tmplSz
=
get
<
1
>
(
GetParam
());
int
method
=
get
<
2
>
(
GetParam
());
Mat
img
(
imgSz
,
CV_8UC1
);
Mat
tmpl
(
tmplSz
,
CV_8UC1
);
Mat
result
(
imgSz
-
tmplSz
+
Size
(
1
,
1
),
CV_32F
);
bool
isNormed
=
method
==
TM_CCORR_NORMED
||
method
==
TM_SQDIFF_NORMED
||
method
==
TM_CCOEFF_NORMED
;
declare
.
in
(
img
,
tmpl
,
WARMUP_RNG
).
out
(
result
).
time
(
30
);
if
(
RUN_OCL_IMPL
)
{
ocl
::
oclMat
oclImg
(
img
),
oclTmpl
(
tmpl
),
oclResult
(
result
.
size
(),
CV_32F
);
OCL_TEST_CYCLE
()
matchTemplate
(
oclImg
,
oclTmpl
,
oclResult
,
method
);
oclResult
.
download
(
result
);
}
else
if
(
RUN_PLAIN_IMPL
)
{
OCL_TEST_CYCLE
()
matchTemplate
(
img
,
tmpl
,
result
,
method
);
}
else
OCL_PERF_ELSE
double
eps
=
isNormed
?
3e-2
:
255
*
255
*
tmpl
.
total
()
*
1e-4
;
if
(
method
==
TM_SQDIFF_NORMED
)
SANITY_CHECK_NOTHING
();
else
if
(
isNormed
)
SANITY_CHECK
(
result
,
eps
,
ERROR_RELATIVE
);
else
SANITY_CHECK
(
result
,
eps
);
}
modules/ts/include/opencv2/ts/ts_perf.hpp
View file @
3e589069
...
...
@@ -209,7 +209,7 @@ private:
#define SANITY_CHECK(array, ...) ::perf::Regression::add(this, #array, array , ## __VA_ARGS__)
#define SANITY_CHECK_KEYPOINTS(array, ...) ::perf::Regression::addKeypoints(this, #array, array , ## __VA_ARGS__)
#define SANITY_CHECK_MATCHES(array, ...) ::perf::Regression::addMatches(this, #array, array , ## __VA_ARGS__)
#define SANITY_CHECK_NOTHING() this->setVerified()
;
#define SANITY_CHECK_NOTHING() this->setVerified()
class
CV_EXPORTS
GpuPerf
{
...
...
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