简体   繁体   English

如何使用OpenCV计算图像中所有点的SURF点?

[英]How to calculate SURF points for ALL the points in an image using OpenCV?

I need to calculate SURF features of a single specific point in the image using OpenCV. 我需要使用OpenCV计算图像中单个特定点的SURF特征。 I am using SurfDescriptorExtractor to extract surf features, but it takes an array of keypoint as the arguemenet, which in turn was calculated by SurfFeatureDetector . 我正在使用SurfDescriptorExtractor来提取冲浪特征,但是它采用了一组关键点作为辩驳网络,而这又是由SurfFeatureDetector计算的。 Is there any way to use SurfDescriptorExtractor to calculate SURF feature of a single point? 有什么方法可以使用SurfDescriptorExtractor计算单个点的SURF特征吗?

Use push_back() function to fill the std::vector of cv::Keypoint . 使用push_back()函数填充cv::Keypointstd::vector In your case, this array contains only one element. 在您的情况下,此数组仅包含一个元素。 You can run compute function from class SurfDescriptorExtractor on this array with : 您可以使用以下SurfDescriptorExtractor在该数组上运行来自SurfDescriptorExtractor类的compute函数:

void compute( const cv::Mat& image, std::vector<cv::KeyPoint>& keypoints, cv::Mat& descriptors ) const;

Note that: Row i is the descriptor for keypoint i. 请注意:第i行是关键点i的描述符。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM