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
09c26d68
Commit
09c26d68
authored
May 12, 2015
by
Vadim Pisarevsky
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #3999 from berak:features2d_tutorial_fix
parents
939c1d24
3fe69f4e
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
12 additions
and
11 deletions
+12
-11
feature_description.markdown
...atures2d/feature_description/feature_description.markdown
+3
-3
feature_flann_matcher.markdown
...es2d/feature_flann_matcher/feature_flann_matcher.markdown
+3
-3
feature_homography.markdown
...features2d/feature_homography/feature_homography.markdown
+5
-4
good_features_to_track.markdown
...on/good_features_to_track/good_features_to_track.markdown
+1
-1
No files found.
doc/tutorials/features2d/feature_description/feature_description.markdown
View file @
09c26d68
...
...
@@ -49,13 +49,13 @@ int main( int argc, char** argv )
int minHessian = 400;
Ptr
<SURF>
detector = SURF::create();
detector->set
MinHessian
(minHessian);
detector->set
HessianThreshold
(minHessian);
std::vector
<KeyPoint>
keypoints_1, keypoints_2;
Mat descriptors_1, descriptors_2;
detector->detectAndCompute( img_1, keypoints_1, descriptors_1 );
detector->detectAndCompute( img_2, keypoints_2, descriptors_2 );
detector->detectAndCompute( img_1,
Mat(),
keypoints_1, descriptors_1 );
detector->detectAndCompute( img_2,
Mat(),
keypoints_2, descriptors_2 );
//-- Step 2: Matching descriptor vectors with a brute force matcher
BFMatcher matcher(NORM_L2);
...
...
doc/tutorials/features2d/feature_flann_matcher/feature_flann_matcher.markdown
View file @
09c26d68
...
...
@@ -58,13 +58,13 @@ int main( int argc, char** argv )
int minHessian = 400;
Ptr
<SURF>
detector = SURF::create();
detector->set
MinHessian
(minHessian);
detector->set
HessianThreshold
(minHessian);
std::vector
<KeyPoint>
keypoints_1, keypoints_2;
Mat descriptors_1, descriptors_2;
detector->detectAndCompute( img_1, keypoints_1, descriptors_1 );
detector->detectAndCompute( img_2, keypoints_2, descriptors_2 );
detector->detectAndCompute( img_1,
Mat(),
keypoints_1, descriptors_1 );
detector->detectAndCompute( img_2,
Mat(),
keypoints_2, descriptors_2 );
//-- Step 2: Matching descriptor vectors using FLANN matcher
FlannBasedMatcher matcher;
...
...
doc/tutorials/features2d/feature_homography/feature_homography.markdown
View file @
09c26d68
...
...
@@ -20,6 +20,7 @@ This tutorial code's is shown lines below.
#include <stdio.h>
#include <iostream>
#include "opencv2/core.hpp"
#include "opencv2/imgproc.hpp"
#include "opencv2/features2d.hpp"
#include "opencv2/highgui.hpp"
#include "opencv2/calib3d.hpp"
...
...
@@ -50,8 +51,8 @@ int main( int argc, char** argv )
std::vector
<KeyPoint>
keypoints_object, keypoints_scene;
Mat descriptors_object, descriptors_scene;
detector->detectAndCompute( img_object, keypoints_object, descriptors_object );
detector->detectAndCompute( img_scene, keypoints_scene, descriptors_scene );
detector->detectAndCompute( img_object,
Mat(),
keypoints_object, descriptors_object );
detector->detectAndCompute( img_scene,
Mat(),
keypoints_scene, descriptors_scene );
//-- Step 2: Matching descriptor vectors using FLANN matcher
FlannBasedMatcher matcher;
...
...
@@ -81,13 +82,13 @@ int main( int argc, char** argv )
Mat img_matches;
drawMatches( img_object, keypoints_object, img_scene, keypoints_scene,
good_matches, img_matches, Scalar::all(-1), Scalar::all(-1),
vector
<char>
(), DrawMatchesFlags::NOT_DRAW_SINGLE_POINTS );
std::
vector
<char>
(), DrawMatchesFlags::NOT_DRAW_SINGLE_POINTS );
//-- Localize the object
std::vector
<Point2f>
obj;
std::vector
<Point2f>
scene;
for(
in
t i = 0; i < good_matches.size(); i++ )
for(
size_
t i = 0; i < good_matches.size(); i++ )
{
//-- Get the keypoints from the good matches
obj.push_back( keypoints_object
[
good_matches[i
]
.queryIdx ].pt );
...
...
doc/tutorials/features2d/trackingmotion/good_features_to_track/good_features_to_track.markdown
View file @
09c26d68
...
...
@@ -96,7 +96,7 @@ void goodFeaturesToTrack_Demo( int, void* )
/// Draw corners detected
cout<<"
**
Number of corners detected: "<<corners.size()<<endl;
int r = 4;
for(
in
t i = 0; i < corners.size(); i++ )
for(
size_
t i = 0; i < corners.size(); i++ )
{ circle( copy, corners
[
i
]
, r, Scalar(rng.uniform(0,255), rng.uniform(0,255),
rng.uniform(0,255)), -1, 8, 0 ); }
...
...
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