Ask Your Question
1

class "cv::Tracker" has no member "create"?

asked 2018-09-21 08:09:39 -0600

Norah gravatar image

updated 2020-10-07 19:27:54 -0600

I tried to use the code form https://docs.opencv.org/3.1.0/d2/d0a/... and i have these errors: Error (active) class "cv::Tracker" has no member "create"
Error C2039 'create': is not a member of 'cv::Tracker'
Error C3861 'create': identifier not found
.I need help since I have no idea fixing these errors :(

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
1

answered 2018-09-21 08:19:35 -0600

berak gravatar image

updated 2018-09-21 08:20:41 -0600

please care to use most recent docs

the tracking interfaces were indeed changed, you have to use it like:

Ptr<Tracker> trk = TrackerMOSSE::create();
                   ^
                   it needs a real classname here !
edit flag offensive delete link more

Comments

Thanks I change it to Ptr<tracker> tracker = TrackerKCF::create(); but also I got errors even I put libraries in additional dependencies .

Error LNK2019 unresolved external symbol "public: bool __cdecl cv::Tracker::init(class cv::debug_build_guard::_InputArray const &,class cv::Rect_<double> const &)" (?init@Tracker@cv@@QEAA_NAEBV_InputArray@debug_build_guard@2@AEBV?$Rect_@N@2@@Z) referenced in function main

Error LNK1120 3 unresolved externals

Norah gravatar imageNorah ( 2018-09-21 09:54:04 -0600 )edit

you need to link -lopencv_tracking

berak gravatar imageberak ( 2018-09-21 10:05:36 -0600 )edit

sorry what is -lopencv_tracking ?

Norah gravatar imageNorah ( 2018-09-21 10:17:59 -0600 )edit

(facepalm) -- you need to link a library for this.

and sorry, i did not see (and you never told us) that you're using VS in windows, so you have to add something like

opencv_tracking34?.lib to your "additional libraries list"

berak gravatar imageberak ( 2018-09-21 10:21:21 -0600 )edit

sorry yes I am using VS 2015 in windows 10 I got that The program '[8864] tracking.exe' has exited with code -1073741515 (0xc0000135) 'A dependent dll was not found'

Norah gravatar imageNorah ( 2018-09-21 12:22:44 -0600 )edit

Question Tools

1 follower

Stats

Asked: 2018-09-21 08:09:39 -0600

Seen: 943 times

Last updated: Sep 21 '18