我已经下载了opencv 3.0.0和opencv-contrib . 我需要使用opencv-contrib中的xfeatures2d额外模块 . 我能够获得opencv框架及其libs . 但是无法获得xfeatures2d lib . 第一;

~/Desktop/opencv-3.0.0/ (building below commands in this dir)

1-我正在运行cmake命令

$cmake -DOPENCV_EXTRA_MODULES_PATH=/Users/dicle/Desktop/opencv-3.0.0/xfeatures2d /Users/dicle/Desktop/opencv-3.0.0/

$make

键入这两个命令后我只获得opencv 3基本模块而不是额外的模块..而且只有基础库 .

我打算像btw那样使用这个额外的模块.1 . 在没有额外模块的情况下导入opencv3框架然后创建一个额外的模块文件夹并将xfeatures2d模块放入其中并在我的代码中调用此文件夹(#include)给出路径额外模块的 Headers ,但我有这个错误 . 我想也许原因可能与额外模块的lib有关 . 如果你可以帮助我,我将是appreacite . 谢谢 .

Undefined symbols for architecture x86_64:
"cv::xfeatures2d::SIFT::create(int, int, double, double, double)", referenced from:
  AnchorBasedValidation::validate(Anchor, cv::Mat, cv::Rect_<int>, cv::Point_<float>) in IDSmart(AnchorBasedValidation.o)
"cv::xfeatures2d::SURF::create(double, int, int, bool, bool)", referenced from:
  KeypointsExtractor::ComputeDescriptor(cv::Mat const&, std::__1::vector<cv::KeyPoint, std::__1::allocator<cv::KeyPoint> >, std::__1::vector<cv::KeyPoint, std::__1::allocator<cv::KeyPoint> >, cv::Mat&, cv::Mat&) in IDSmart(KeypointsExtractor.o)
  KeypointsExtractor::ExtractKeypoint(cv::Mat const&, std::__1::vector<cv::KeyPoint, std::__1::allocator<cv::KeyPoint> >&, std::__1::vector<cv::KeyPoint, std::__1::allocator<cv::KeyPoint> >&, std::__1::vector<cv::Rect_<int>, std::__1::allocator<cv::Rect_<int> > > const&) in IDSmart(KeypointsExtractor.o)
  KeypointsExtractor::ExtractClusterHistogram(cv::Mat const&, cv::Mat, std::__1::vector<cv::KeyPoint, std::__1::allocator<cv::KeyPoint> >) in IDSmart(KeypointsExtractor.o)
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)