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
6f2fea7e
Commit
6f2fea7e
authored
Jun 25, 2014
by
mlyashko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added perftest for moments
parent
ea222877
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
38 additions
and
0 deletions
+38
-0
perf_moments.cpp
modules/imgproc/perf/perf_moments.cpp
+38
-0
No files found.
modules/imgproc/perf/perf_moments.cpp
0 → 100644
View file @
6f2fea7e
// This file is part of OpenCV project.
// It is subject to the license terms in the LICENSE file found in the top-level directory
// of this distribution and at http://opencv.org/license.html.
// Copyright (C) 2014, Itseez, Inc., all rights reserved.
// Third party copyrights are property of their respective owners.
#include "perf_precomp.hpp"
using
namespace
std
;
using
namespace
cv
;
using
namespace
perf
;
using
namespace
testing
;
using
std
::
tr1
::
make_tuple
;
using
std
::
tr1
::
get
;
typedef
std
::
tr1
::
tuple
<
Size
,
MatDepth
,
bool
>
MomentsParams_t
;
typedef
perf
::
TestBaseWithParam
<
MomentsParams_t
>
MomentsFixture_val
;
PERF_TEST_P
(
MomentsFixture_val
,
Moments1
,
::
testing
::
Combine
(
testing
::
Values
(
TYPICAL_MAT_SIZES
),
testing
::
Values
(
CV_16U
,
CV_16S
,
CV_32F
,
CV_64F
),
testing
::
Bool
()))
{
const
MomentsParams_t
params
=
GetParam
();
const
Size
srcSize
=
get
<
0
>
(
params
);
const
MatDepth
srcDepth
=
get
<
1
>
(
params
);
const
bool
binaryImage
=
get
<
2
>
(
params
);
cv
::
Moments
m
;
Mat
src
(
srcSize
,
srcDepth
);
declare
.
in
(
src
,
WARMUP_RNG
);
TEST_CYCLE
()
m
=
cv
::
moments
(
src
,
binaryImage
);
SANITY_CHECK_MOMENTS
(
m
,
1e-4
,
ERROR_RELATIVE
);
}
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