2016-07-07 2 views
0

私はdrawKeypoints関数を使用しようとしています。 これは私がそれを呼んでいる方法です:OpenCV - features2d.hppのdrawKeypointsがコンパイラで見つかりませんか?

drawKeypoints(img1, keypoints1, final, color, flags); 

img1 = my image (Mat) 
keypoints = vector<KeyPoint> generated from calling the ORB detector 
final = output Mat 
color = Scalar::all(-1) 
flags = DrawMatchesFlags::DEFAULT; 

しかし、私は、このリンクエラーが発生します。

#include <opencv2/core/core.hpp> 
#include "opencv2/imgcodecs/imgcodecs.hpp" 
#include "opencv2/features2d.hpp" 
#include "opencv2/opencv.hpp" 
#include "opencv2/highgui/highgui.hpp" 

Undefined symbols for architecture x86_64: 
    "cv::drawKeypoints(cv::_InputArray const&, std::vector<cv::KeyPoint, std::allocator<cv::KeyPoint> > const&, cv::_InputOutputArray const&, cv::Scalar_<double> const&, int)", referenced from: 

は、これらは私の含まれています

なぜ私のコンパイルができないのですか? er(XCode)その関数を見つけるか?

ありがとうございます!

答えて

0

あなたはcv::drawKeypoints機能を提供OpenCVのさん"opencv_features2d"ライブラリにリンクする必要があります。

赤と青で囲まれたボックスon this answerを参照してください。

関連する問題