#include <stdio.h>
#include <iostream>
#include "opencv2/core/core.hpp"
#include "opencv2/features2d/features2d.hpp"
#include "opencv2/highgui/highgui.hpp" using namespace cv; void readme(); /** @function main */
int main( int argc, char** argv )
{
if( argc != )
{ readme(); return -; } Mat img_1 = imread( argv[], CV_LOAD_IMAGE_GRAYSCALE );
Mat img_2 = imread( argv[], CV_LOAD_IMAGE_GRAYSCALE ); if( !img_1.data || !img_2.data )
{ std::cout<< " --(!) Error reading images " << std::endl; return -; } //-- Step 1: Detect the keypoints using SURF Detector
int minHessian = ; SurfFeatureDetector detector( minHessian ); std::vector<KeyPoint> keypoints_1, keypoints_2; detector.detect( img_1, keypoints_1 );
detector.detect( img_2, keypoints_2 ); //-- Draw keypoints
Mat img_keypoints_1; Mat img_keypoints_2; drawKeypoints( img_1, keypoints_1, img_keypoints_1, Scalar::all(-), DrawMatchesFlags::DEFAULT );
drawKeypoints( img_2, keypoints_2, img_keypoints_2, Scalar::all(-), DrawMatchesFlags::DEFAULT ); //-- Show detected (drawn) keypoints
imshow("Keypoints 1", img_keypoints_1 );
imshow("Keypoints 2", img_keypoints_2 ); waitKey(); return ;
} /** @function readme */
void readme()
{ std::cout << " Usage: ./SURF_detector <img1> <img2>" << std::endl; }

最新文章

  1. JavaScript的基本语法
  2. core dump 是什么意思?
  3. LDAP 中 CN, OU, DC 的含义
  4. android 获取设备拔插状态广播事件易漏掉的一行属性!
  5. 【转】 深入main函数中的参数argc,argv的使用详解
  6. Can jxta be used to develop online card game (p2p style)?
  7. Apple Pay强势来袭,开发者应做的事情
  8. N3292系列资料之RTC介绍
  9. ajax切换明星头像!
  10. Spring简单的文件配置
  11. 图解 Monad
  12. 在linux环境下tomcat 指定 jdk或jre版本
  13. centos6.5安装禅道
  14. python-进程之间通信、多线程介绍
  15. Spark基础
  16. spring-boot 多线程
  17. extjs分页
  18. 带你从零学ReactNative开发跨平台App开发[expo 打包发布](八)
  19. Executor , ExecutorService 和 Executors
  20. JAVA问题定位跟踪技术

热门文章

  1. php封装一个接口类
  2. 黑客攻防技术宝典web实战篇:测试后端组件习题答案
  3. Linux--shell 计算时间差
  4. Bug(1)
  5. 【记录】YAML 简易入门教程
  6. LeetCode——456.132模式
  7. sublime3激活方法
  8. tensroflow中如何计算特征图的输出及padding大小
  9. python_pycharm控制台输出带颜色
  10. 18)PHP,可变函数,匿名函数 变量的作用域