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
d5f0f039
Commit
d5f0f039
authored
Nov 25, 2010
by
Gary Bradski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
created help function, added more docs
parent
a92dab7d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
26 additions
and
16 deletions
+26
-16
descriptor_extractor_matcher.cpp
samples/cpp/descriptor_extractor_matcher.cpp
+26
-16
No files found.
samples/cpp/descriptor_extractor_matcher.cpp
View file @
d5f0f039
...
...
@@ -8,6 +8,30 @@
using
namespace
cv
;
using
namespace
std
;
void
help
(
char
**
argv
)
{
cout
<<
"Program demonstrating keypoint finding and matching between 2 images using features2d framework.
\n
"
<<
" In one case, the 2nd image is synthesized by homography from the first, in the second case, there are 2 images
\n
"
<<
"
\n
"
<<
"case1: second image is obtained from the first (given) image using random generated homography matrix
\n
"
<<
argv
[
0
]
<<
" [detectorType] [descriptorType] [matcherType] [matcherFilterType] [image] [evaluate(0 or 1)]
\n
"
<<
"Example of case1:
\n
"
<<
"./descriptor_extractor_matcher SURF SURF FlannBased NoneFilter cola.jpg 0
\n
"
<<
"
\n
"
<<
"case2: both images are given. If ransacReprojThreshold>=0 then homography matrix are calculated
\n
"
<<
"Example of case2:
\n
"
<<
argv
[
0
]
<<
" [detectorType] [descriptorType] [matcherType] [matcherFilterType] [image1] [image2] [ransacReprojThreshold]
\n
"
<<
"
\n
"
<<
"Matches are filtered using homography matrix in case1 and case2 (if ransacReprojThreshold>=0)
\n
"
<<
"Example:
\n
"
<<
"./descriptor_extractor_matcher SURF SURF BruteForce CrossCheckFilter cola1.jpg cola2.jpg 3
\n
"
<<
"
\n
"
<<
"Possible detectorType values: see in documentation on createFeatureDetector().
\n
"
<<
"Possible descriptorType values: see in documentation on createDescriptorExtractor().
\n
"
<<
"Possible matcherType values: see in documentation on createDescriptorMatcher().
\n
"
<<
"Possible matcherFilterType values: NoneFilter, CrossCheckFilter."
<<
endl
;
}
#define DRAW_RICH_KEYPOINTS_MODE 0
#define DRAW_OUTLIERS_MODE 0
...
...
@@ -185,26 +209,12 @@ void doIteration( const Mat& img1, Mat& img2, bool isWarpPerspective,
imshow
(
winName
,
drawImg
);
}
int
main
(
int
argc
,
char
**
argv
)
{
if
(
argc
!=
7
&&
argc
!=
8
)
{
cout
<<
"Format:"
<<
endl
;
cout
<<
"case1: second image is obtained from the first (given) image using random generated homography matrix"
<<
endl
;
cout
<<
argv
[
0
]
<<
" [detectorType] [descriptorType] [matcherType] [matcherFilterType] [image] [evaluate(0 or 1)]"
<<
endl
;
cout
<<
"Example:"
<<
endl
;
cout
<<
"./descriptor_extractor_matcher SURF SURF FlannBased NoneFilter cola.jpg 0"
<<
endl
;
cout
<<
endl
;
cout
<<
"case2: both images are given. If ransacReprojThreshold>=0 then homography matrix are calculated"
<<
endl
;
cout
<<
argv
[
0
]
<<
" [detectorType] [descriptorType] [matcherType] [matcherFilterType] [image1] [image2] [ransacReprojThreshold]"
<<
endl
;
cout
<<
endl
<<
"Mathes are filtered using homography matrix in case1 and case2 (if ransacReprojThreshold>=0)"
<<
endl
;
cout
<<
"Example:"
<<
endl
;
cout
<<
"./descriptor_extractor_matcher SURF SURF BruteForce CrossCheckFilter cola1.jpg cola2.jpg 3"
<<
endl
;
cout
<<
endl
<<
"Possible detectorType values: see in documentation on createFeatureDetector()."
<<
endl
<<
"Possible descriptorType values: see in documentation on createDescriptorExtractor()."
<<
endl
<<
"Possible matcherType values: see in documentation on createDescriptorMatcher()."
<<
endl
<<
"Possible matcherFilterType values: NoneFilter, CrossCheckFilter."
<<
endl
;
help
(
argv
);
return
-
1
;
}
bool
isWarpPerspective
=
argc
==
7
;
...
...
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