Ask Your Question
0

SURF detector error in opencv 2.4.2

asked 2013-03-08 03:18:49 -0600

Heshan Sandeepa gravatar image

updated 2013-03-08 03:20:20 -0600

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?

edit retag flag offensive close merge delete

2 answers

Sort by ยป oldest newest most voted
2

answered 2013-03-08 03:39:40 -0600

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.

edit flag offensive delete link more

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 ( 2013-03-08 07:11:37 -0600 )edit
2

answered 2013-03-08 03:44:02 -0600

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

edit flag offensive delete link more

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 ( 2013-03-08 07:15:39 -0600 )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 ( 2013-03-08 09:22:11 -0600 )edit

Question Tools

Stats

Asked: 2013-03-08 03:18:49 -0600

Seen: 1,865 times

Last updated: Mar 08 '13