opencv / opencv_contrib

Repository for OpenCV's extra modules
Apache License 2.0
9.31k stars 5.74k forks source link

how to clear or delete the MultiTracker object results #2368

Open WANGYong-NJ opened 4 years ago

WANGYong-NJ commented 4 years ago

OpenCV 3.4 Operating System / Platform Windows 64 Bit Compiler Visual Studio 2015

i use the Ptr multiTracker to track multiobjects, i want to update the track result with new detect result(applied by yolo), how should I achieve this process ?

My current method is to first save the current track results( multiTracker->getObjects() ) to a temporary variables, then clear the track results( multiTracker->clear() ), and then compare the detection results with the target results of track( multiTracker->getObjects() ), and finally reassign the track with the closer detection results (multiTracker->add ).

But I found that there are more and more tracking targets. The debugger found that the multiTracker did not clear the data, that means the multiTracker->clear() did not work.

How can I solve this problem.

Damon2019 commented 3 years ago

hi i also want to solve it. has you succeed?