首页 > 其他 > 详细

OpenCV3 角点检测

时间:2020-02-12 17:51:01      阅读:83      评论:0      收藏:0      [点我收藏+]

OpenCV3中,角点检测的几个方法(SURF,SIFT,ORB)都被转移到opencv_contrib中了,需要自己编译。

这些算法都在xfeatures2d库中,#include<opencv2\xfeatures2d.hpp>。

转移前的写法:

cv::SurfFeatureDetector surf(15);
vector<KeyPoint> key_points;
surf.detect(img, key_points);

新写法:

    Ptr<FeatureDetector> surf = SurfFeatureDetector::create(200);
    vector<KeyPoint> key_points;
    surf->detect(src, key_points);      // 检测src图像中的SURF特征

推荐如下写法:不用检测器

    // SURF特征检测
    Ptr<SURF> surf = SURF::create(minHessian);
    vector<KeyPoint> key_points;
    surf->detect(src, key_points);      // 检测src图像中的SURF特征

 

OpenCV3 角点检测

原文:https://www.cnblogs.com/xixixing/p/12299677.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!