FAST,2006年提出并在2010年稍作修改后发表,若某像素与其周围邻域内足够多的像素点相差较大,则该像素可能是角点。

【函数】

Ptr<FastFeatureDetector> create( int threshold=10,bool nonmaxSuppression=true,int type=FastFeatureDetector::TYPE_9_16 );

【参数】原理链接

threshold——阈值

nonmaxSuppression——非极大值抑制

type——邻域类型

【案例】

FAST特征点,FastFeatureDetectorFAST特征点,FastFeatureDetector

#include <opencv2/opencv.hpp>
#include <iostream>
using namespace std;
using namespace cv;

int main()
{
    Mat srcImage = imread("D:/sunflower.png");
        Mat srcGrayImage;
        if (srcImage.channels() == 3)
        {
            cvtColor(srcImage,srcGrayImage,CV_RGB2GRAY);
        }
        else
        {
            srcImage.copyTo(srcGrayImage);
        }
        vector<KeyPoint>detectKeyPoint;
        Mat keyPointImage;

        Ptr<FastFeatureDetector> fast = FastFeatureDetector::create();
        fast->detect(srcGrayImage,detectKeyPoint);
        drawKeypoints(srcImage,detectKeyPoint,keyPointImage,Scalar(0,0,255),DrawMatchesFlags::DEFAULT);

        imshow("src image",srcImage);
        imshow("keyPoint",keyPointImage);

        waitKey(0);
        return 0;
}

 

相关文章:

  • 2022-01-13
  • 2022-12-23
  • 2021-11-27
  • 2022-01-24
  • 2022-12-23
  • 2022-01-16
猜你喜欢
  • 2022-12-23
  • 2021-08-11
  • 2021-12-22
  • 2021-11-13
  • 2021-11-26
  • 2022-02-03
相关资源
相似解决方案