2012-08-28 18 views
7

OpenCV'den eğitim örneklerinden birini çalıştırmaya çalışıyorum. Flann tabanlı anahtar noktası eşleştirmesi kullanımıyla bilinen bir nesne bulmakla ilgilidir. Kod Features2D + Homography to find a known object'da bulunabilir.Flann, çözümlenmemiş harici işlevler

"Kütüphaneleri bağladınız mı?" Diye soracaktır. ya da benzer bir soru. Evet, neredeyse tüm kütüphaneleri kullanan çeşitli örneklerle 3 hafta boyunca OpenCV kullanıyordum. Ve bu güne kadar sorun yoktu.

Bu kütüphane bağımlılıklarını Visual Studio'nun bağlayıcı giriş ayarlarına ekledim. Dahil dizinleri de iyi çalışıyor.

C:\OpenCV2.4\lib\opencv_core242d.lib 
C:\OpenCV2.4\lib\opencv_highgui242d.lib 
C:\OpenCV2.4\lib\opencv_video242d.lib 
C:\OpenCV2.4\lib\opencv_ml242d.lib 
C:\OpenCV2.4\lib\opencv_legacy242d.lib 
C:\OpenCV2.4\lib\opencv_imgproc242d.lib 
C:\OpenCV2.4\lib\opencv_objdetect242d.lib 
C:\OpenCV2.4\lib\opencv_flann242d.lib 
C:\OpenCV2.4\lib\opencv_nonfree242d.lib 
C:\OpenCV2.4\lib\opencv_calib3d242d.lib 

Elimde hata bir bağlayıcı hatasıdır. Flann'ın işlevlerini çözemez.

1>------ Build started: Project: flannMatch, Configuration: Debug Win32 ------ 
1>flannMatch.obj : error LNK2019: unresolved external symbol "void __cdecl cv::drawMatches(class cv::Mat const &,class std::vector<class cv::KeyPoint,class std::allocator<class cv::KeyPoint> > const &,class cv::Mat const &,class std::vector<class cv::KeyPoint,class std::allocator<class cv::KeyPoint> > const &,class std::vector<struct cv::DMatch,class std::allocator<struct cv::DMatch> > const &,class cv::Mat &,class cv::Scalar_<double> const &,class cv::Scalar_<double> const &,class std::vector<char,class std::allocator<char> > const &,int)" ([email protected]@@[email protected]@[email protected]@[email protected]@[email protected]@[email protected]@@[email protected]@@[email protected]@[email protected]@[email protected]@[email protected]@[email protected]@@[email protected]@@[email protected]@[email protected]@[email protected][email protected][email protected]@[email protected]@@[email protected]@Z) referenced in function _main 
1>flannMatch.obj : error LNK2019: unresolved external symbol "public: void __thiscall cv::DescriptorMatcher::match(class cv::Mat const &,class cv::Mat const &,class std::vector<struct cv::DMatch,class std::allocator<struct cv::DMatch> > &,class cv::Mat const &)const " ([email protected]@[email protected]@[email protected]@[email protected]@[email protected]@[email protected]@[email protected]@@[email protected]@@[email protected]@[email protected]) referenced in function_main 
1>flannMatch.obj : error LNK2019: unresolved external symbol "public: __thiscall cv::FlannBasedMatcher::FlannBasedMatcher(class cv::Ptr<struct cv::flann::IndexParams> const &,class cv::Ptr<struct cv::flann::SearchParams> const &)" ([email protected]@@[email protected][email protected]@[email protected]@@@[email protected][email protected]@[email protected]@@@[email protected]@Z) referenced in function _main 
1>flannMatch.obj : error LNK2019: unresolved external symbol "public: void __thiscall cv::DescriptorExtractor::compute(class cv::Mat const &,class std::vector<class cv::KeyPoint,class std::allocator<class cv::KeyPoint> > &,class cv::Mat &)const " ([email protected]@[email protected]@[email protected]@[email protected]@[email protected]@[email protected]@[email protected]@@[email protected]@@[email protected]@[email protected]@Z) referenced in function _main 
1>flannMatch.obj : error LNK2019: unresolved external symbol "public: void __thiscall cv::FeatureDetector::detect(class cv::Mat const &,class std::vector<class cv::KeyPoint,class std::allocator<class cv::KeyPoint> > &,class cv::Mat const &)const " ([email protected]@[email protected]@[email protected]@[email protected]@[email protected]@[email protected]@[email protected]@@[email protected]@@[email protected]@[email protected]) referenced in function _main 
1>flannMatch.obj : error LNK2019: unresolved external symbol "public: virtual __thiscall cv::DescriptorMatcher::~DescriptorMatcher(void)" ([email protected]@@[email protected]) referenced in function "public: virtual __thiscall cv::FlannBasedMatcher::~FlannBasedMatcher(void)" ([email protected]@@[email protected]) 
1>flannMatch.obj : error LNK2019: unresolved external symbol "public: virtual __thiscall cv::DescriptorMatcher::DescriptorCollection::~DescriptorCollection(void)" ([email protected]@[email protected]@[email protected]) referenced in function "public: virtual __thiscall cv::FlannBasedMatcher::~FlannBasedMatcher(void)" ([email protected]@@[email protected]) 
1>flannMatch.obj : error LNK2019: unresolved external symbol "public: virtual __thiscall cv::FeatureDetector::~FeatureDetector(void)" ([email protected]@@[email protected]) referenced in function "public: virtual __thiscall cv::Feature2D::~Feature2D(void)" ([email protected]@@[email protected]) 
1>flannMatch.obj : error LNK2019: unresolved external symbol "public: virtual __thiscall cv::DescriptorExtractor::~DescriptorExtractor(void)" ([email protected]@@[email protected]) referenced in function "public: virtual __thiscall cv::Feature2D::~Feature2D(void)" ([email protected]@@[email protected]) 

Ayrıca, buradaki sorulardan biri sayesinde, sörf ve siftin serbest kalmaya da gittiğini biliyorum. İlk bakışta, OpenCV'nin (2.2 ve 2.4) iki versiyonuna sahip olduğumu ve bu yüzden bir fark yarattığını düşündüm. Böylece 2.2'yi çıkardım ve başka bir program çalıştırmayı denedim. İyi çalışıyordu ama yine de bu hata gitmedi.

Benim sorum, burada neyi özlüyorum? Başka bir kütüphane bağımlılığı var mı? Göremediğim şey nedir? Herhangi bir yardım takdir edilir.

- DÜZENLEME -

nasıl göremedim? Böyle kolay bir soru göndermek için çok üzgünüm. Kendimi çok aptalım. Bu bağımlılığı eklemeyi unutmuştum.

C:\OpenCV2.4\lib\opencv_features2d242d.lib 

Bunu kimsenin özlemeyeceğini sanmıyorum.

+0

Soruyu gönderdikten kısa bir süre sonra cevabı bulan ilk kişi, ne de son kişi siz değilsiniz :). Cevabı bizimle paylaştığınız için teşekkür ederiz. – bjoernz

+0

Bununla birlikte, bir cevap, sorunun bir parçası olarak değil, * cevap * olarak paylaşılmalıdır. –

+0

Biliyorum, ancak itibar yüzünden, 8 saat geçene kadar sorularımı cevaplayamıyorum. Hala 6 saat kaldı: D – yutasrobot

cevap

2

Bunu nasıl göremedim? Böyle kolay bir soru göndermek için çok üzgünüm. Kendimi çok aptalım. Bu bağımlılığı eklemeyi unutmuştum.

C:\OpenCV2.4\lib\opencv_features2d242d.lib 

Bunu kimsenin özlemeyeceğini sanmıyorum.

İlgili konular