SIFT算法调优
来源:互联网 发布:建立网络共享 编辑:程序博客网 时间:2024/06/15 13:06
// SIFTCalibration.cpp : 定义控制台应用程序的入口点。//#include "stdafx.h"#include<iostream>#include <opencv2/opencv.hpp>#include <opencv2/xfeatures2d/nonfree.hpp>using namespace std;using namespace cv;void main() { cv::Mat source_1 = cv::imread("D:\\python_opencv\\source_image\\1123\\1\\1.jpg"); cv::Mat source_2 = cv::imread("D:\\python_opencv\\source_image\\1123\\1\\2.jpg"); cv::imshow("source_1", source_1); cv::imshow("source_2", source_2); cout << source_1.size() << endl; vector<KeyPoint> key_points_1, key_points_2; cv::Mat descriptor_1, descripter_2; cv::Mat imgShow1, imgShow2; cv::Ptr<Feature2D> sift = xfeatures2d::SIFT::create(0, 1, 0.04, 10); double start = double(getTickCount()); sift->detectAndCompute(source_1, noArray(), key_points_1, descriptor_1); double duration_ms = (double(getTickCount()) - start) * 1000 / getTickFrequency();//计时 std::cout << "It took " << duration_ms << " ms to detect features in pic1 using AKAZE." << std::endl; sift->detectAndCompute(source_2, noArray(), key_points_2, descripter_2); cv::drawKeypoints(source_1, key_points_1, imgShow1, cv::Scalar::all(-1), cv::DrawMatchesFlags::DRAW_RICH_KEYPOINTS); cv::drawKeypoints(source_2, key_points_2, imgShow2, cv::Scalar::all(-1), cv::DrawMatchesFlags::DRAW_RICH_KEYPOINTS); //cv::resize(imgShow2, imgShow2, cv::Size(imgShow2.cols, imgShow2.rows)); //cv::resize(imgShow1, imgShow1, cv::Size(imgShow1.cols, imgShow1.rows)); cv::imshow("SIFTKeypoints1", imgShow1); cv::imshow("SIFTKeypoints2", imgShow2); cv::waitKey(0);}
阅读全文
0 0
- SIFT算法调优
- sift算法
- SIFT算法
- sift算法
- SIFT 算法
- sift算法
- SIFT算法
- SIFT 算法
- SIFT算法
- SIFT算法
- SIFT算法
- SIFT算法
- SIFT算法
- SIFT算法
- SIFT算法
- sift算法
- SIFT算法
- SIFT算法
- 利用python画词云图(wordcloud)
- 信号处理和模式识别方面的 toolbox
- 沉浸式
- 902A-Visiting a Friend
- ijkplayer播放视频
- SIFT算法调优
- Core ML 与 Vision:iOS 11 机器学习教程
- 云计算Q&A
- Android 图片加载 Error:Failed to allocate a 36018012 byte allocation with 16777216
- Hadoop 序列化
- 博弈问题总集第二类----Anti-Nim
- 在浏览器端用JS创建和下载文件
- 谁知道Flyerinternational外汇
- day01