• 大小: 195KB
    文件类型: .zip
    金币: 1
    下载: 0 次
    发布日期: 2021-05-12
  • 语言: 其他
  • 标签: opencv  SURF  SIFT  ORB  

资源简介

SURF、SIFT、ORB特征提取的opencv程序,代码使用opencv2.4.9的库,用cmake编写的,cmakelists也在里面。

资源截图

代码片段和文件信息

#include 
#include 
#include 
#include 

#include   
#include   

using namespace cv;  
using namespace std;  

int main()  
{  
    Mat img_1 = imread(“../demo1.jpeg“);  
    Mat img_2 = imread(“../demo2.jpeg“); 

    if (!img_1.data || !img_2.data)  
    {  
        cout << “error reading images “ << endl;  
        return -1;  
    }  
    
    // 声明特征子
    ORB orb;  
    vector keyPoints_1 keyPoints_2;  
    Mat descriptors_1 descriptors_2;  
    
    // 开始检测
    orb(img_1 Mat() keyPoints_1 descriptors_1);  
    orb(img_2 Mat() keyPoints_2 descriptors_2);  

    // 检测完成后进行匹配
    BruteForceMatcher matcher;  
    vector matches;  
    matcher.match(descriptors_1 descriptors_2 matches);  
    
    // 显示匹配的结果
    Mat img_matches;  
    drawMatches(img_1 keyPoints_1 img_2 keyPoints_2 matches img_matches Scalar::all(-1) Scalar::all(-1)  
    vector() DrawMatchesFlags::NOT_DRAW_SINGLE_POINTS);

    cv::namedWindow(“ORB Features“);  // 可以不写
    imshow(“ORB Features“ img_matches);  

    cvWaitKey(0);  
    return 0;  
}

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2017-04-01 15:30  opencv_demo\
     文件        6148  2017-04-01 18:45  opencv_demo\.DS_Store
     目录           0  2017-04-08 14:13  __MACOSX\
     目录           0  2017-04-08 14:13  __MACOSX\opencv_demo\
     文件         120  2017-04-01 18:45  __MACOSX\opencv_demo\._.DS_Store
     目录           0  2017-04-01 15:34  opencv_demo\build\
     文件        1292  2017-04-01 15:07  opencv_demo\build\cmake_install.cmake
     文件       14097  2017-04-01 15:07  opencv_demo\build\CMakeCache.txt
     目录           0  2017-04-01 15:34  opencv_demo\build\CMakeFiles\
     目录           0  2017-04-01 15:07  opencv_demo\build\CMakeFiles\3.7.2\
     文件        2433  2017-04-01 15:07  opencv_demo\build\CMakeFiles\3.7.2\CMakeCCompiler.cmake
     文件        4981  2017-04-01 15:07  opencv_demo\build\CMakeFiles\3.7.2\CMakeCXXCompiler.cmake
     文件        4304  2017-04-01 15:07  opencv_demo\build\CMakeFiles\3.7.2\CMakeDetermineCompilerABI_C.bin
     文件        4288  2017-04-01 15:07  opencv_demo\build\CMakeFiles\3.7.2\CMakeDetermineCompilerABI_CXX.bin
     文件         362  2017-04-01 15:07  opencv_demo\build\CMakeFiles\3.7.2\CMakeSystem.cmake
     目录           0  2017-04-01 15:07  opencv_demo\build\CMakeFiles\3.7.2\CompilerIdC\
     文件        8616  2017-04-01 15:07  opencv_demo\build\CMakeFiles\3.7.2\CompilerIdC\a.out
     文件       16826  2017-04-01 15:07  opencv_demo\build\CMakeFiles\3.7.2\CompilerIdC\CMakeCCompilerId.c
     目录           0  2017-04-01 15:07  opencv_demo\build\CMakeFiles\3.7.2\CompilerIdCXX\
     文件        8600  2017-04-01 15:07  opencv_demo\build\CMakeFiles\3.7.2\CompilerIdCXX\a.out
     文件       16397  2017-04-01 15:07  opencv_demo\build\CMakeFiles\3.7.2\CompilerIdCXX\CMakeCXXCompilerId.cpp
     文件          85  2017-04-01 15:27  opencv_demo\build\CMakeFiles\cmake.check_cache
     文件         695  2017-04-01 15:07  opencv_demo\build\CMakeFiles\CMakeDirectoryInformation.cmake
     文件       34917  2017-04-01 15:07  opencv_demo\build\CMakeFiles\CMakeOutput.log
     目录           0  2017-04-01 15:07  opencv_demo\build\CMakeFiles\CMakeTmp\
     文件        8376  2017-04-01 15:07  opencv_demo\build\CMakeFiles\feature_tests.bin
     文件         728  2017-04-01 15:07  opencv_demo\build\CMakeFiles\feature_tests.c
     文件        8844  2017-04-01 15:07  opencv_demo\build\CMakeFiles\feature_tests.cxx
     文件        2689  2017-04-01 15:27  opencv_demo\build\CMakeFiles\Makefile.cmake
     文件        7412  2017-04-01 15:27  opencv_demo\build\CMakeFiles\Makefile2
     目录           0  2017-04-01 15:34  opencv_demo\build\CMakeFiles\orb.dir\
............此处省略64个文件信息

评论

共有 条评论