1 | initial version |
You can release the old tracker and create a new tracker and initiate it with your new ROI. That is:
tracker.release();
tracker = cv::TrackerKCF::create();
tracker->init(frame, newRoi);
2 | No.2 Revision |
You can release the old tracker and create a new tracker and initiate it with your new ROI. That is:
tracker.release();
tracker = cv::TrackerKCF::create();
tracker->init(frame, newRoi);
It may not be the right or the prettiest way to do it, but it does the job.