error: 'create' is not a member of 'cv::Tracker'

Viewed 6305

İn this official tutorial I got the error in title. What should be the reason?

Ptr<Tracker> tracker = Tracker::create( "KCF" );

Here the part of tracking.hpp:

    @endcode
    of course, you can also add any additional methods of your choice. It should be pointed out,
    however, that it is not expected to have a constructor declared, as creation should be done via
    the corresponding createTracker() method.
   In src/tracker.cpp file add BOILERPLATE_CODE(name,classname) line to the body of
    Tracker::create() method you will find there, like :
@code
        Ptr<Tracker> Tracker::create( const String& trackerType )
        {
          BOILERPLATE_CODE("BOOSTING",TrackerBoosting);
          BOILERPLATE_CODE("MIL",TrackerMIL);
          return Ptr<Tracker>();
        }
@endcode
-   Finally, you should implement the function with signature :
@code
        Ptr<classname> classname::createTracker(const classname::Params &parameters){
            ...
        }
@endcode

I am using 3.2.0 release.

1 Answers
Related