Ask Your Question
0

SURF in opencv3 [closed]

asked 2016-11-25 14:49:41 -0600

Hassam gravatar image

Hello. I'm trying to do the LEAF Detection for my FYP. I'm using surf with opencv3 (visual studio 2016 , c++). But, SURF feature/code is not working. I need to build opencv_contrib but I don't exactly know how to. Can anyone please give me tutorial or instructions so that I can use the SURF detection in my project? Thanks in advance.

edit retag flag offensive reopen merge delete

Closed for the following reason the question is answered, right answer was accepted by LBerger
close date 2016-11-26 09:55:11.485060

Comments

LBerger gravatar imageLBerger ( 2016-11-26 02:20:17 -0600 )edit

2015*, sorry typo. Visual studio is an IDE.

Hassam gravatar imageHassam ( 2016-11-26 05:44:57 -0600 )edit

1 answer

Sort by ยป oldest newest most voted
0

answered 2016-11-26 02:04:27 -0600

LBerger gravatar image

updated 2016-11-26 02:05:51 -0600

To build opencv_contrib follow theses instructions and don't forget to set OPENCV_ENABLE_NONFREE to true

edit flag offensive delete link more

Comments

Hi. Thanks for the answer. I'm done with configuring the opencv_contrib modules. Now, i'm using the surf code and it's giving me the error on this line: Ptr<surf> detector = SURF::create(minHessian);

it says: Severity Code Description Project File Suppression State Line Error LNK2019 unresolved external symbol "public: static struct cv::Ptr<class cv::xfeatures2d::surf=""> __cdecl cv::xfeatures2d::SURF::create(double,int,int,bool,bool)" (?create@SURF@xfeatures2d@cv@@SA?AU?$Ptr@VSURF@xfeatures2d@cv@@@3@NHH_N0@Z) referenced in function "public: __thiscall SURFDetector::SURFDetector(double)" (??0SURFDetector@@QAE@N@Z) OpencvSURF C:\Users\Hassam\documents\visual studio 2015\Projects\OpencvSURF\OpencvSURF\Source.obj 1

Can you tell me the solution?

Hassam gravatar imageHassam ( 2016-11-26 05:48:19 -0600 )edit

In link option you must have opencv_xfeatures2d310.lib

LBerger gravatar imageLBerger ( 2016-11-26 06:20:07 -0600 )edit

Hey, thank you very much. I downloaded the opencv_xfeatures2d310.lib and paste it in the lib folder and linked it to VS2015 by going in additional dependencies of DEBUG and RELEASE mode. The build was successful, but an error occurred saying : 'The program can't start because opencv_xfeatures2d310.dll is missing from your computer. Try reinstalling the program to fix this problem' Can you help? please?

Hassam gravatar imageHassam ( 2016-11-26 06:29:09 -0600 )edit

You should installed opencv in open solution and add opencv path in system environement. If you want to solve faster your problem copy opencv_xfeatures2d310.dll where is your exe it's not good way because you will have to copy this dll for every new project...

LBerger gravatar imageLBerger ( 2016-11-26 06:39:38 -0600 )edit

Thanks for replying. I've used cmake software to work with the extra modules. I found that way on youtube. Anyways, sir I've copied the opencv_xfeatures2d310 file to the folder where my visual studio project exe is located. It is still giving me the error. Nothing changes. Can you help?

Hassam gravatar imageHassam ( 2016-11-26 06:49:32 -0600 )edit

I've fixed the issue. Thanks for your help Berger. :)

Hassam gravatar imageHassam ( 2016-11-26 07:21:22 -0600 )edit

How have you fixed the issue ?

tushing gravatar imagetushing ( 2016-12-14 14:19:35 -0600 )edit

Question Tools

2 followers

Stats

Asked: 2016-11-25 14:49:41 -0600

Seen: 1,894 times

Last updated: Nov 26 '16