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
8b86f05d
Commit
8b86f05d
authored
Jun 18, 2010
by
Ilya Lysenkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed assert generation in descriptors evaluation due to many-to-many matching
parent
3d2ec987
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
10 deletions
+9
-10
adetectordescriptor_evaluation.cpp
tests/cv/src/adetectordescriptor_evaluation.cpp
+9
-10
No files found.
tests/cv/src/adetectordescriptor_evaluation.cpp
View file @
8b86f05d
...
...
@@ -447,7 +447,7 @@ struct DMatchForEvaluation : public DMatch
void
evaluateDescriptors
(
const
vector
<
EllipticKeyPoint
>&
keypoints1
,
const
vector
<
EllipticKeyPoint
>&
keypoints2
,
vector
<
DMatchForEvaluation
>&
matches1to2
,
const
vector
<
vector
<
DMatch
>
>&
matches1to2
,
vector
<
DMatchForEvaluation
>
&
allMatches
,
const
Mat
&
img1
,
const
Mat
&
img2
,
const
Mat
&
H1to2
,
int
&
correctMatchCount
,
int
&
falseMatchCount
,
int
&
correspondenceCount
)
{
...
...
@@ -468,18 +468,23 @@ void evaluateDescriptors( const vector<EllipticKeyPoint>& keypoints1, const vect
for
(
size_t
i
=
0
;
i
<
matches1to2
.
size
();
i
++
)
{
for
(
size_t
j
=
0
;
j
<
matches1to2
[
i
].
size
();
j
++
)
{
//if( matches1to2[i].match.indexTrain > 0 )
//{
matches1to2
[
i
].
isCorrect
=
thresholdedOverlapMask
(
matches1to2
[
i
].
indexQuery
,
matches1to2
[
i
].
indexTrain
);
if
(
matches1to2
[
i
].
isCorrect
)
DMatchForEvaluation
match
=
matches1to2
[
i
][
j
];
match
.
isCorrect
=
thresholdedOverlapMask
(
match
.
indexQuery
,
match
.
indexTrain
);
if
(
match
.
isCorrect
)
correctMatchCount
++
;
else
falseMatchCount
++
;
allMatches
.
push_back
(
match
);
//}
//else
//{
// matches1to2[i].isCorrect = -1;
//}
}
}
}
...
...
@@ -1448,20 +1453,14 @@ void DescriptorQualityTest::runDatasetTest (const vector<Mat> &imgs, const vecto
vector
<
vector
<
DMatch
>
>
matches1to2
;
//TODO: use more sophisticated strategy to choose threshold
descMatch
->
match
(
imgs
[
0
],
keypoints1
,
matches1to2
,
std
::
numeric_limits
<
float
>::
max
()
);
vector
<
DMatchForEvaluation
>
matches
;
for
(
size_t
i
=
0
;
i
<
matches1to2
.
size
();
i
++
)
{
std
::
copy
(
matches1to2
[
i
].
begin
(),
matches1to2
[
i
].
end
(),
std
::
back_inserter
(
matches
)
);
}
// TODO if( commRunParams[di].matchFilter )
int
correspCount
;
int
correctMatchCount
=
0
,
falseMatchCount
=
0
;
evaluateDescriptors
(
ekeypoints1
,
ekeypoints2
,
matches
,
imgs
[
0
],
imgs
[
ci
+
1
],
Hs
[
ci
],
evaluateDescriptors
(
ekeypoints1
,
ekeypoints2
,
matches
1to2
,
allMatches
,
imgs
[
0
],
imgs
[
ci
+
1
],
Hs
[
ci
],
correctMatchCount
,
falseMatchCount
,
correspCount
);
allCorrespCount
+=
correspCount
;
std
::
copy
(
matches
.
begin
(),
matches
.
end
(),
std
::
back_inserter
(
allMatches
)
);
descMatch
->
clear
();
}
...
...
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