OpenCV failed to create more than one tracker at the time

226 Views Asked by At

I faced with strange problem when I trying to declare more than one OpenCV tracker. Code below compiles OK but failed with cv::Exception during execution.

// create a tracker object
Ptr<Tracker> tracker_kcf            = cv::TrackerKCF::create();
Ptr<Tracker> tracker_mil            = cv::TrackerMIL::create();
Ptr<Tracker> tracker_goturn         = cv::TrackerGOTURN::create();
Ptr<Tracker> tracker_csrt           = cv::TrackerCSRT::create();

No matter how many trackers are declared, if its quantity more than one, code doesn't work. If I'm declaring in addition legacy trackers, sources even cannot compile. OpenCV 4.5.2 MSVC 2019

Thank you

0

There are 0 best solutions below