Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Tried to compile tracker from tutorial and got error "‘Tracker’ was not declared in this scope Ptr<tracker> tracker = TrackerKCF::create();"

Tried to compile tracker https://docs.opencv.org/3.1.0/d2/d0a/tutorial_introduction_to_tracker.html and got error "/home/vioh/tracker2/tracker2.cpp: In function ‘int main(int, char)’: /home/vioh/tracker2/tracker2.cpp:24:7: error: ‘Tracker’ was not declared in this scope Ptr<tracker> tracker = TrackerKCF::create(); ^ /home/vioh/tracker2/tracker2.cpp:24:14: error: template argument 1 is invalid Ptr<tracker> tracker = TrackerKCF::create(); ^ /home/vioh/tracker2/tracker2.cpp:24:26: error: ‘TrackerKCF’ has not been declared Ptr<tracker> tracker = TrackerKCF::create(); ^ /home/vioh/tracker2/tracker2.cpp:35:10: error: base operand of ‘->’ is not a pointer tracker->init(frame,roi); ^ /home/vioh/tracker2/tracker2.cpp:45:12: error: base operand of ‘->’ is not a pointer tracker->update(frame,roi); ^ CMakeFiles/tracker2.dir/build.make:62: recipe execution error for goal «CMakeFiles/tracker2.dir/tracker2.cpp.o» make[2]: [CMakeFiles/tracker2.dir/tracker2.cpp.o] Error 1 CMakeFiles/Makefile2:67: recipe execution error for goal «CMakeFiles/tracker2.dir/all» make[1]: [CMakeFiles/tracker2.dir/all] Error 2 Makefile:83: recipe execution error for goal «all» make: * [all] Error 2 "

Tried to compile tracker from tutorial and got error "‘Tracker’ was not declared in this scope Ptr<tracker> tracker = TrackerKCF::create();"

Tried to compile tracker https://docs.opencv.org/3.1.0/d2/d0a/tutorial_introduction_to_tracker.html and got error "/home/vioh/tracker2/tracker2.cpp: In function ‘int main(int, char)’: /home/vioh/tracker2/tracker2.cpp:24:7: error: ‘Tracker’ was not declared in this scope Ptr<tracker> tracker = TrackerKCF::create(); ^ /home/vioh/tracker2/tracker2.cpp:24:14: error: template argument 1 is invalid Ptr<tracker> tracker = TrackerKCF::create(); ^ /home/vioh/tracker2/tracker2.cpp:24:26: error: ‘TrackerKCF’ has not been declared Ptr<tracker> tracker = TrackerKCF::create(); ^ /home/vioh/tracker2/tracker2.cpp:35:10: error: base operand of ‘->’ is not a pointer tracker->init(frame,roi); ^ /home/vioh/tracker2/tracker2.cpp:45:12: error: base operand of ‘->’ is not a pointer tracker->update(frame,roi); ^ CMakeFiles/tracker2.dir/build.make:62: recipe execution error for goal «CMakeFiles/tracker2.dir/tracker2.cpp.o» make[2]: [CMakeFiles/tracker2.dir/tracker2.cpp.o] Error 1 CMakeFiles/Makefile2:67: recipe execution error for goal «CMakeFiles/tracker2.dir/all» make[1]: [CMakeFiles/tracker2.dir/all] Error 2 Makefile:83: recipe execution error for goal «all» make: * [all] Error 2 "

click to hide/show revision 3
None

updated 2018-10-25 23:01:50 -0600

berak gravatar image

Tried to compile tracker from tutorial and got error "‘Tracker’ was not declared in this scope Ptr<tracker> tracker = TrackerKCF::create();"

Tried to compile tracker https://docs.opencv.org/3.1.0/d2/d0a/tutorial_introduction_to_tracker.html and got error

"/home/vioh/tracker2/tracker2.cpp: In function ‘int main(int, char)’:
char**)’:
/home/vioh/tracker2/tracker2.cpp:24:7: error: ‘Tracker’ was not declared in this scope
   Ptr<tracker> Ptr<Tracker> tracker = TrackerKCF::create();
       ^
/home/vioh/tracker2/tracker2.cpp:24:14: error: template argument 1 is invalid
   Ptr<tracker> Ptr<Tracker> tracker = TrackerKCF::create();
              ^
/home/vioh/tracker2/tracker2.cpp:24:26: error: ‘TrackerKCF’ has not been declared
   Ptr<tracker> Ptr<Tracker> tracker = TrackerKCF::create();
                          ^
/home/vioh/tracker2/tracker2.cpp:35:10: error: base operand of ‘->’ is not a pointer
   tracker->init(frame,roi);
          ^
/home/vioh/tracker2/tracker2.cpp:45:12: error: base operand of ‘->’ is not a pointer
     tracker->update(frame,roi);
            ^
CMakeFiles/tracker2.dir/build.make:62: recipe execution error for goal «CMakeFiles/tracker2.dir/tracker2.cpp.o»
make[2]:  *** [CMakeFiles/tracker2.dir/tracker2.cpp.o] Error 1
CMakeFiles/Makefile2:67: recipe execution error for goal «CMakeFiles/tracker2.dir/all»
make[1]:  *** [CMakeFiles/tracker2.dir/all] Error 2
Makefile:83: recipe execution error for goal «all»
make: * *** [all] Error 2

"