Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Creating my own tracker using tracker module in opencv-contrib

I am trying to create my own tracker using opencv-contrib tracker module. For that I am first trying to replicate the MIL Tracker provided in the contrib. I added my tracker class to the tracking/opencv2/tracker.cpp file. Then, I build the files. I copied the files trackerMIL.cpp, trackerMILModel.hpp, trackerMILModel.cpp and edited the files to suit my own tracker name. I am using the same target estimation method used in MIL. I get the error:

error: (-1) The model is not initialized in function init. How should I resolve this error?

Creating my own tracker using tracker module in opencv-contrib

I am trying to create my own tracker using opencv-contrib tracker module. For that I am first trying to replicate the MIL Tracker provided in the contrib. I added my tracker class to the tracking/opencv2/tracker.cpptracking/opencv2/tracker.hpp file. Then, I build the files. I copied the files trackerMIL.cpp, trackerMILModel.hpp, trackerMILModel.cpp and edited the files to suit my own tracker name. I am using the same target estimation method used in MIL. I get the error:

error: (-1) The model is not initialized in function init. How should I resolve this error?error? The error originates from here (tracker.cpp)

  sampler = Ptr<TrackerSampler>( new TrackerSampler() );
  featureSet = Ptr<TrackerFeatureSet>( new TrackerFeatureSet() );
  model = Ptr<TrackerModel>();

  bool initTracker = initImpl( image.getMat(), boundingBox );

  //check if the model component is initialized
  if( model == 0 )
  {
    CV_Error( -1, "The model is not initialized" );
    return false;
  }