初识API
在之前的Harris角点检测中,进行非极大值抑制是比较好的选择。因此,一个角点的强度定义如下:中心点灰度值与周围灰度值差的绝对值的和。
荷枪实弹
#include <opencv2/core/core.hpp> #include <opencv2/features2d/features2d.hpp> #include <opencv2/highgui/highgui.hpp> #include <vector> using namespace cv; void main(int argv, char **argc) { Mat image; image = imread(argc[1]); std::vector<KeyPoint> keyPoints; FastFeatureDetector fast(40,true,TYPE_9_16); fast.detect(image,keyPoints); drawKeypoints(image, keyPoints, image, Scalar::all(255), DrawMatchesFlags::DRAW_OVER_OUTIMG); imshow("FAST feature", image); cvWaitKey(0); }
OpenCV2马拉松第26圈——FAST特征点检测,布布扣,bubuko.com
原文地址:http://blog.csdn.net/abcd1992719g/article/details/28424579