OpenCV 3.0 中缺少非自由模块

2023-01-21C/C++开发问题
2

本文介绍了OpenCV 3.0 中缺少非自由模块的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

问题描述

我已经从源代码构建了 openCV 3.0 alpha 版本,支持 CUDA 和 TBB.现在,我想使用 SURF 算法进行特征检测和特征匹配.SurfFeatureDetector 存在于包含文件中

I have built the openCV 3.0 alpha version from source with support for CUDA and TBB. Now, I want to do feature detection and feature matching using SURF algorithm. SurfFeatureDetector is present in the include file

opencv2/nonfree/features2d.hpp &opencv2/nonfree/features2d.hpp

opencv2/nonfree/features2d.hpp & opencv2/nonfree/features2d.hpp

但是这个版本的 openCV 中缺少 nonfree 模块.我尝试在 answers.opencv.org 上查看 opencv 论坛,但该站点正在建设中.

But the module nonfree is missing in this version of openCV. I tried checking the opencv forums at answers.opencv.org but the site is under construction.

如何使用非免费模块?

推荐答案

with opencv3.0, SURF/SIFT 和其他一些东西已经移到一个单独的 opencv_contrib repo .

with opencv3.0, SURF/SIFT and some other things have been moved to a seperate opencv_contrib repo .

您必须下载它,将其添加到您的主要 opencv cmake 设置(请查看那里的自述文件),然后重新运行 cmake/make.

you will have to download that, add it to your main opencv cmake settings (please look at the readme there), and rerun cmake/make.

然后:

#include "opencv2/xfeatures2d.hpp"

...
Ptr<SIFT> sift = cv::xfeatures2d::SIFT::create(...);
sift->detect(...);

这篇关于OpenCV 3.0 中缺少非自由模块的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

The End

相关推荐

无法访问 C++ std::set 中对象的非常量成员函数
Unable to access non-const member functions of objects in C++ std::set(无法访问 C++ std::set 中对象的非常量成员函数)...
2024-08-14 C/C++开发问题
17

从 lambda 构造 std::function 参数
Constructing std::function argument from lambda(从 lambda 构造 std::function 参数)...
2024-08-14 C/C++开发问题
25

STL BigInt 类实现
STL BigInt class implementation(STL BigInt 类实现)...
2024-08-14 C/C++开发问题
3

使用 std::atomic 和 std::condition_variable 同步不可靠
Sync is unreliable using std::atomic and std::condition_variable(使用 std::atomic 和 std::condition_variable 同步不可靠)...
2024-08-14 C/C++开发问题
17

在 STL 中将列表元素移动到末尾
Move list element to the end in STL(在 STL 中将列表元素移动到末尾)...
2024-08-14 C/C++开发问题
9

为什么禁止对存储在 STL 容器中的类重载 operator&amp;()?
Why is overloading operatoramp;() prohibited for classes stored in STL containers?(为什么禁止对存储在 STL 容器中的类重载 operatoramp;()?)...
2024-08-14 C/C++开发问题
6