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
39d6eb73
Commit
39d6eb73
authored
Oct 09, 2012
by
Andrey Kamaev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add sanity check support for vector<DMatch>
parent
d970a915
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
0 deletions
+16
-0
ts_perf.hpp
modules/ts/include/opencv2/ts/ts_perf.hpp
+2
-0
ts_perf.cpp
modules/ts/src/ts_perf.cpp
+14
-0
No files found.
modules/ts/include/opencv2/ts/ts_perf.hpp
View file @
39d6eb73
...
...
@@ -167,6 +167,7 @@ class CV_EXPORTS Regression
public
:
static
Regression
&
add
(
TestBase
*
test
,
const
std
::
string
&
name
,
cv
::
InputArray
array
,
double
eps
=
DBL_EPSILON
,
ERROR_TYPE
err
=
ERROR_ABSOLUTE
);
static
Regression
&
addKeypoints
(
TestBase
*
test
,
const
std
::
string
&
name
,
const
std
::
vector
<
cv
::
KeyPoint
>&
array
,
double
eps
=
DBL_EPSILON
,
ERROR_TYPE
err
=
ERROR_ABSOLUTE
);
static
Regression
&
addMatches
(
TestBase
*
test
,
const
std
::
string
&
name
,
const
std
::
vector
<
cv
::
DMatch
>&
array
,
double
eps
=
DBL_EPSILON
,
ERROR_TYPE
err
=
ERROR_ABSOLUTE
);
static
void
Init
(
const
std
::
string
&
testSuitName
,
const
std
::
string
&
ext
=
".xml"
);
Regression
&
operator
()
(
const
std
::
string
&
name
,
cv
::
InputArray
array
,
double
eps
=
DBL_EPSILON
,
ERROR_TYPE
err
=
ERROR_ABSOLUTE
);
...
...
@@ -202,6 +203,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__)
/*****************************************************************************************\
...
...
modules/ts/src/ts_perf.cpp
View file @
39d6eb73
...
...
@@ -121,6 +121,20 @@ Regression& Regression::addKeypoints(TestBase* test, const std::string& name, co
(
name
+
"-class_id"
,
class_id
,
eps
,
ERROR_ABSOLUTE
);
}
Regression
&
Regression
::
addMatches
(
TestBase
*
test
,
const
std
::
string
&
name
,
const
std
::
vector
<
cv
::
DMatch
>&
array
,
double
eps
,
ERROR_TYPE
err
)
{
int
len
=
(
int
)
array
.
size
();
cv
::
Mat
queryIdx
(
len
,
1
,
CV_32SC1
,
(
void
*
)
&
array
[
0
].
queryIdx
,
sizeof
(
cv
::
DMatch
));
cv
::
Mat
trainIdx
(
len
,
1
,
CV_32SC1
,
(
void
*
)
&
array
[
0
].
trainIdx
,
sizeof
(
cv
::
DMatch
));
cv
::
Mat
imgIdx
(
len
,
1
,
CV_32SC1
,
(
void
*
)
&
array
[
0
].
imgIdx
,
sizeof
(
cv
::
DMatch
));
cv
::
Mat
distance
(
len
,
1
,
CV_32FC1
,
(
void
*
)
&
array
[
0
].
distance
,
sizeof
(
cv
::
DMatch
));
return
Regression
::
add
(
test
,
name
+
"-queryIdx"
,
queryIdx
,
DBL_EPSILON
,
ERROR_ABSOLUTE
)
(
name
+
"-trainIdx"
,
trainIdx
,
DBL_EPSILON
,
ERROR_ABSOLUTE
)
(
name
+
"-imgIdx"
,
imgIdx
,
DBL_EPSILON
,
ERROR_ABSOLUTE
)
(
name
+
"-distance"
,
distance
,
eps
,
err
);
}
void
Regression
::
Init
(
const
std
::
string
&
testSuitName
,
const
std
::
string
&
ext
)
{
instance
().
init
(
testSuitName
,
ext
);
...
...
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