Goal
In this tutorial you will learn how to:
Theory
Code
This tutorial code's is shown lines below.
#include <stdio.h>
#include <iostream>
void readme();
int main( int argc, char** argv )
{
if( argc != 3 )
{ readme(); return -1; }
{ std::cout<< " --(!) Error reading images " << std::endl; return -1; }
int minHessian = 400;
std::vector<KeyPoint> keypoints_1, keypoints_2;
detector->
detect( img_1, keypoints_1 );
detector->
detect( img_2, keypoints_2 );
Mat img_keypoints_1;
Mat img_keypoints_2;
imshow(
"Keypoints 1", img_keypoints_1 );
imshow(
"Keypoints 2", img_keypoints_2 );
return 0;
}
void readme()
{ std::cout << " Usage: ./SURF_detector <img1> <img2>" << std::endl; }
Explanation
Result
Here is the result of the feature detection applied to the first image:
And here is the result for the second image: