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
b8de8174
Commit
b8de8174
authored
Nov 13, 2013
by
moodoki
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Slight modification to example code for FLANN matcher with comment on #3344
parent
a81efdbb
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
4 deletions
+8
-4
feature_flann_matcher.rst
...eatures2d/feature_flann_matcher/feature_flann_matcher.rst
+4
-2
SURF_FlannMatcher.cpp
samples/cpp/tutorial_code/features2D/SURF_FlannMatcher.cpp
+4
-2
No files found.
doc/tutorials/features2d/feature_flann_matcher/feature_flann_matcher.rst
View file @
b8de8174
...
...
@@ -81,12 +81,14 @@ This tutorial code's is shown lines below. You can also download it from `here <
printf("-- Max dist : %f \n", max_dist );
printf("-- Min dist : %f \n", min_dist );
//-- Draw only "good" matches (i.e. whose distance is less than 2*min_dist )
//-- Draw only "good" matches (i.e. whose distance is less than 2*min_dist,
//-- or a small arbitary value ( 0.02 ) in the event that min_dist is very
//-- small)
//-- PS.- radiusMatch can also be used here.
std::vector< DMatch > good_matches;
for( int i = 0; i < descriptors_1.rows; i++ )
{ if( matches[i].distance <=
2*min_dist
)
{ if( matches[i].distance <=
max(2*min_dist, 0.02)
)
{ good_matches.push_back( matches[i]); }
}
...
...
samples/cpp/tutorial_code/features2D/SURF_FlannMatcher.cpp
View file @
b8de8174
...
...
@@ -65,12 +65,14 @@ int main( int argc, char** argv )
printf
(
"-- Max dist : %f
\n
"
,
max_dist
);
printf
(
"-- Min dist : %f
\n
"
,
min_dist
);
//-- Draw only "good" matches (i.e. whose distance is less than 2*min_dist )
//-- Draw only "good" matches (i.e. whose distance is less than 2*min_dist,
//-- or a small arbitary value ( 0.02 ) in the event that min_dist is very
//-- small)
//-- PS.- radiusMatch can also be used here.
std
::
vector
<
DMatch
>
good_matches
;
for
(
int
i
=
0
;
i
<
descriptors_1
.
rows
;
i
++
)
{
if
(
matches
[
i
].
distance
<=
2
*
min_dist
)
{
if
(
matches
[
i
].
distance
<=
max
(
2
*
min_dist
,
0.02
)
)
{
good_matches
.
push_back
(
matches
[
i
]);
}
}
...
...
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