OpenCV中ORB实时匹配
来源:互联网 发布:vr unity3d 比ue4清晰 编辑:程序博客网 时间:2024/06/08 15:09
// SIFT跟踪
#include "StdAfx.h"#include <opencv2/core/core.hpp> #include <opencv2/highgui/highgui.hpp> #include <opencv2/imgproc/imgproc.hpp> #include <opencv2/features2d/features2d.hpp>using namespace cv;int main(int argc, char** argv) { CvCapture* capture = cvCreateCameraCapture(0);IplImage* frame;while (1){frame = cvQueryFrame(capture);Mat img_1 = imread("C:\\Users\\lijunliang\\Desktop\\book.png"); Mat img_2(frame); // -- Step 1: Detect the keypoints using STAR Detector std::vector<KeyPoint> keypoints_1,keypoints_2; ORB orb; orb.detect(img_1, keypoints_1); orb.detect(img_2, keypoints_2);// -- Stpe 2: Calculate descriptors (feature vectors) Mat descriptors_1, descriptors_2; orb.compute(img_1, keypoints_1, descriptors_1); orb.compute(img_2, keypoints_2, descriptors_2);//-- Step 3: Matching descriptor vectors with a brute force matcher BFMatcher matcher(NORM_HAMMING); std::vector<DMatch> mathces; matcher.match(descriptors_1, descriptors_2, mathces); // -- dwaw matches Mat img_mathes; drawMatches(img_1, keypoints_1, img_2, keypoints_2, mathces, img_mathes); // -- show imshow("Mathces", img_mathes);waitKey(1); }cvReleaseCapture(&capture);cvDestroyWindow("Mathces"); return 0; }
二、结果
阅读全文
0 0
- OpenCV中ORB实时匹配
- OpenCV中ORB特征点检测和匹配简单用法
- OpenCV图像匹配算法之orb
- opencv-基于ORB特征点匹配
- opencv3中ORB算法描述与匹配
- OpenCV中ORB代码的参数
- opencv做的ORB实现的目标匹配
- opencv ORB特征检测+FLANN匹配程序报错问题
- Android Jni OpenCV-基于ORB算法特征点匹配
- SLAM学习笔记4: ORB-SLAM中BOW特征匹配
- ORB图像匹配
- Orb匹配算法代码
- ORB+暴力匹配
- ORB算法特征匹配
- OpenCV中feature2D学习——ORB和BruteForceMatcher
- OpenCV中feature2D学习——ORB和BruteForceMatcher
- OpenCV中feature2D学习——ORB和BruteForceMatcher
- OpenCv ORB例子代码
- BOM基础二
- linux 下解压命令大全
- D.8前导0的数字
- Java线程模型
- 【jzoj3773】【NOI2015模拟8.15】【小 P 的烦恼】【动态规划】
- OpenCV中ORB实时匹配
- 沃顿商学院自我管理课——技能与练习
- 《Angular之简介》
- IO流——自定义装饰类
- android的应用架构和常用库
- python高级特性
- [python]你有一个目录,放了你一个月的日记,都是 txt,为了避免分词的问题,假设内容都是英文,请统计出你认为每篇日记最重要的词。
- CI框架多文件上传以及优化上传方法
- BOM基础三