如何从图像中提取FAST功能? [英] How can I extract FAST features from an image?

查看:419
本文介绍了如何从图像中提取FAST功能?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我要提取FAST功能,具体取决于 Features2D +查找已知对象的同位图

I want to extract FAST features, based on Features2D + Homography to find a known object

  SurfFeatureDetector detector( minHessian );

  std::vector<KeyPoint> keypoints_object, keypoints_scene;

  detector.detect( img_object, keypoints_object );
  detector.detect( img_scene, keypoints_scene );

  //-- Step 2: Calculate descriptors (feature vectors)
  SurfDescriptorExtractor extractor;

类SurfFeatureDetector和FastFeatureDetector继承自Detector,可以交换。但我找不到一个匹配的类SurfDescriptorExtractor我希望找到像FastDescriptorExtractor,但类似这样的类不可用。似乎很奇怪的是,如果我只更改检测器FastFeatureDetector的例子似乎工作正常。

The classes SurfFeatureDetector and FastFeatureDetector are inherited from Detector and can be exchanged. But I couldn't find a matching class for SurfDescriptorExtractor I expected to find something like FastDescriptorExtractor but a class like this isn't available. What seems to be strange is that if I only change the Detector to FastFeatureDetector the example seems to work correctly.

我的问题是:上述序列应该如何看起来像快功能?

My question is: How should the above sequence look like for Fast features?

推荐答案

据我所知,OpenCV中没有FAST特性提取器。
与SURF不同,SURF可用于特征检测和特征向量计算,FAST主要用于检测特征点。获得特征点后,您需要使用一些其他特征提取器来生成特征向量并进行匹配。
或者,如果您关心速度,在OpenCV 2.3中,引入了ORB功能,它实际上使用多尺度FAST(加上一些Harris角点测量)作为其检测器。用法类似于SURF:

To my knowledge, there is no FAST feature extractor in OpenCV. Unlike SURF, which can be used for both feature detection and feature vector computation, FAST is mainly used for detecting feature points. After getting feature points, you need to use some other feature extractor to generate feature vectors and do the matching. Alternatively, if you are concern about speed, in OpenCV 2.3, ORB feature is introduced, which actually uses multi-scale FAST (plus some Harris corner measurement) as its detector. The usage is similar to SURF:

OrbFeatureDetector detector(n_features);

OrbDescriptorExtractor extractor(patch_size);

您需要将示例中的匹配器更改为基于Hamming距离的匹配器。希望这有助于。

You would need to change the matcher in the example to some Hamming distance based matcher. Hope this helps.

这篇关于如何从图像中提取FAST功能?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆