为什么我的cv中只有feature2d而没有xfeature2d
时间: 2023-11-16 19:05:56 浏览: 10
可能是因为你使用的是不同的计算机视觉库或者版本。一些计算机视觉库在提取特征时可能只会生成feature2d,而不会生成xfeature2d。有些计算机视觉库也可能会生成xfeature2d,它通常是在feature2d的基础上加上一些扩展信息,比如尺度或方向等。因此,如果你需要使用xfeature2d,你可以查看你使用的计算机视觉库的文档,看看它是否支持生成xfeature2d,并了解如何使用它。
相关问题
error C2039: “detectAndCompute”: 不是“cv::Feature2D”的成员
这个错误提示是因为你在调用 cv::Feature2D 的 detectAndCompute 函数时出错了。这个函数可能在你使用的 OpenCV 版本中不存在或者被重命名了。
你可以尝试使用其他的函数替换 detectAndCompute 函数,比如 detect 和 compute 函数。另外,你也可以查看一下你使用的 OpenCV 版本的文档,确认一下 detectAndCompute 函数的正确名称和参数。
xfeatures2d.hpp(934): error C2039: “detectAndCompute”: 不是“cv::Feature2D”的成员
这个错误提示意味着在 `cv::Feature2D` 这个类中并没有 `detectAndCompute` 这个成员函数。你的代码中可能有误。
`detectAndCompute` 是一个在 `cv::FeatureDetector` 或 `cv::DescriptorExtractor` 中定义的函数,你可以检查一下是否正确包含了相关的头文件,并且使用了正确的命名空间。
相关推荐
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)