Ask Your Question
0

SURF detector error in opencv 2.4.2

asked Mar 8 '13

Heshan Sandeepa gravatar image

updated Mar 8 '13

hi ,

i tried the following tutorial here. link text

that gives me following 2 errors when running the code, i am using opencv 2.4.2 in visual studio 2010.

  1. error LNK1120: 1 unresolved externals
  2. error LNK2019: unresolved external symbol "public: __cdecl cv::SURF::SURF(double,int,int,bool,bool)" (??0SURF@cv@@QEAA@NHH_N0@Z) referenced in function main

can any one tell me what kind of problem is that?

Preview: (hide)

2 answers

Sort by » oldest newest most voted
2

answered Mar 8 '13

Guanta gravatar image

Did you maybe forgot to call cv::initModule_nonfree() ? Also note that you should consider to switch to the latest OpenCV version since several bugs have been fixed since 2.4.2.

Preview: (hide)

Comments

thank you very much for considering my problem and spent your time to solve that. It helped me a lot.

Heshan Sandeepa gravatar imageHeshan Sandeepa (Mar 8 '13)edit
2

answered Mar 8 '13

berak gravatar image

the demo would not even compile for me (with 242), save link.

it needed the following additions:

#include "opencv2/nonfree/nonfree.hpp"   // SURF is nonfree

before doing anything else in main():

cv::initModule_nonfree();

and ofc link to opencv_nonfree242.lib

Preview: (hide)

Comments

thank you very much for considering my problem and spent your time to solve that. it worked. do you think that opencv 2.4.4 is always better than 2.4.2?

Heshan Sandeepa gravatar imageHeshan Sandeepa (Mar 8 '13)edit

BRISK detectors, mjpg streams were the reasons for me to upgrade. but i went for compiling from github master this time (2.4.9) so i don't know if 2.4.4 really stable already(they removed the 'beta' tag only days ago.. )

berak gravatar imageberak (Mar 8 '13)edit

Question Tools

Stats

Asked: Mar 8 '13

Seen: 1,878 times

Last updated: Mar 08 '13