特征点检测需要用到 OpenCV扩展包。
SURF 算子
OpenCV 中关于 SURF 算法的部分,常常涉及到的是 SURF、SurfFeatureDetector、SurfDescriptorExtractor 这三个类。
typedef SURF SurfFeatureDetector;
typedef SURF SurfDescriptorExtractor;
因此三者其实等价。
1. drawKeyPoints() 函数,绘制关键点。函数原型如下:
void drawKeyPoints(const Mat& image,
const vector<KeyPoint>& keyPoints,
Mat& outImage,
const Scalar& color = Scalar::all(-1),